:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --on-primary: #ffffff;
    --secondary: #f472b6;
    --success: #22c55e;
    --success-light: #4ade80;
    --warning: #f97316;
    --error: #ef4444;
    --error-light: #f87171;
    --muted: #9ca3af;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-variant: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-family: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

#main-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#top-bar {
    background: var(--surface);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-content h2 {
    font-size: 18px;
    font-weight: 500;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--success);
}

.status-indicator .material-icons {
    font-size: 14px;
}

#main-content {
    flex: 1;
    padding-bottom: 70px;
}

.page {
    display: none;
    padding: 16px;
}

.page.active {
    display: block;
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--surface-variant);
}

.btn-outline.btn-danger {
    color: var(--error);
    border-color: var(--error);
}

.btn-outline.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-otp {
    background: var(--surface-variant);
    color: var(--primary);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.fab-btn {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 50;
    transition: transform 0.2s;
}

.fab-btn:hover {
    transform: scale(1.1);
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 80%;
    max-width: 320px;
    text-align: center;
}

.dialog-content h3 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 500;
}

.dialog-content p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 32px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 48px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-lg);
}

.login-header .logo .material-icons {
    font-size: 40px;
    color: var(--primary);
}

.login-header h1 {
    color: var(--surface);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

#login-form, #register-form, #otp-login-form {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--background);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 12px;
}

.form-options a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input {
    width: 16px;
    height: 16px;
}

.otp-row {
    display: flex;
    gap: 8px;
}

.otp-row input {
    flex: 1;
}

.login-otp {
    margin-top: 16px;
    text-align: center;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.welcome-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.today-training-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    color: var(--on-primary);
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.day-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.training-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.training-info p {
    font-size: 14px;
    opacity: 0.8;
}

.weekly-overview-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.weekly-overview-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-item .material-icons {
    font-size: 24px;
    color: var(--primary);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 8px;
}

.empty-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-card .material-icons {
    font-size: 48px;
    color: rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.empty-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-card .hint {
    font-size: 12px;
    opacity: 0.6;
}

.session-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.session-card:hover {
    transform: translateY(-2px);
}

.session-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.session-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.session-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.session-activation {
    text-align: center;
}

.session-activation .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.session-activation .label {
    font-size: 10px;
    color: var(--text-secondary);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-aborted {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.status-in-progress {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.quick-action-card:hover {
    transform: translateY(-2px);
}

.quick-action-card .material-icons {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-card div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.action-title {
    font-size: 14px;
    font-weight: 600;
}

.action-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.category-tabs {
    display: flex;
    gap: 8px;
    padding-bottom: 16px;
    overflow-x: auto;
    white-space: nowrap;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
}

.tab-btn:hover:not(.active) {
    background: var(--surface-variant);
}

.quick-start-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: var(--on-primary);
}

.quick-start-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-start-card p {
    font-size: 12px;
    opacity: 0.8;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-info {
    flex: 1;
}

.action-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.action-card .material-icons:last-child {
    color: var(--muted);
}

.device-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.device-tab {
    display: none;
}

.device-tab.active {
    display: block;
}

.device-list {
    margin-top: 16px;
}

.device-item {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.device-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.device-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.device-item button {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.mvc-display {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.progress-ring {
    position: relative;
    width: 280px;
    height: 280px;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-track {
    fill: none;
    stroke: rgba(0, 0, 0, 0.05);
    stroke-width: 18;
}

.ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 18;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s, stroke 0.3s;
}

.ring-target {
    fill: none;
    stroke: rgba(0, 0, 0, 0.2);
    stroke-width: 4;
    stroke-linecap: round;
}

.ring-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ring-content span:first-child {
    font-size: 52px;
    font-weight: 700;
}

.mvc-unit {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-secondary);
}

.ring-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.metrics-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    width: 100px;
    text-align: center;
    box-shadow: var(--shadow);
}

.metric-card .material-icons {
    font-size: 24px;
    margin-bottom: 8px;
}

.metric-title {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.calibration-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.calibration-warning {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.calibration-warning .material-icons {
    font-size: 24px;
    color: var(--error);
    flex-shrink: 0;
}

.calibration-warning div p:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--error);
    margin-bottom: 4px;
}

.calibration-warning div p:last-child {
    font-size: 12px;
    color: var(--text-secondary);
}

.calibration-card.calibrated {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.1);
}

.calibration-card.calibrated .calibration-warning {
    color: var(--success);
}

.calibration-card.calibrated .calibration-warning .material-icons {
    color: var(--success);
}

.calibration-card.calibrated .calibration-warning div p:first-child {
    color: var(--success);
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.action-buttons button {
    flex: 1;
    justify-content: center;
}

.calibration-progress {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.calibration-progress h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.calibration-progress p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-row span {
    font-size: 12px;
    color: var(--text-secondary);
    width: 30px;
}

.slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.settings-card p {
    text-align: center;
    font-size: 14px;
    color: var(--primary);
    margin-top: 8px;
}

.debug-info-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.debug-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.debug-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.debug-row:first-child {
    padding-top: 0;
}

.debug-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.debug-row span:first-child {
    font-size: 12px;
    color: var(--text-secondary);
}

.debug-row span:last-child {
    font-size: 12px;
    font-weight: 500;
}

.social-tabs {
    display: flex;
    margin-bottom: 16px;
}

.social-tabs .tab-btn {
    flex: 1;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
}

.social-tab {
    display: none;
}

.social-tab.active {
    display: block;
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-user-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.post-user-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-content {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.post-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 8px;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.post-stat .material-icons {
    font-size: 16px;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.post-action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-action-btn:hover {
    color: var(--primary);
}

.challenge-card, .team-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.challenge-card h4, .team-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.challenge-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.challenge-card .challenge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.challenge-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.challenge-status.upcoming {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.challenge-status.ended {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.challenge-card .challenge-footer, .team-card .team-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-card .challenge-meta, .team-card .team-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.team-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-avatar {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-info {
    flex: 1;
}

.profile-header {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.avatar {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.avatar .material-icons {
    font-size: 40px;
}

.profile-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-header p {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.profile-stats span {
    font-size: 14px;
    font-weight: 500;
}

.stats-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.menu-list {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--surface-variant);
}

.menu-item .material-icons:first-child {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.menu-item div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-title {
    font-size: 15px;
    font-weight: 500;
}

.menu-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.menu-item .material-icons:last-child {
    font-size: 20px;
    color: var(--muted);
}

.session-header {
    background: var(--surface);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.session-info h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.session-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.session-status {
    display: flex;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.calibrated {
    background: var(--success);
}

.status-dot.uncalibrated {
    background: var(--warning);
}

.status-dot.connected {
    background: var(--success);
}

.status-dot.disconnected {
    background: var(--error);
}

.session-mvc-display {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.session-mvc-display .progress-ring {
    width: 200px;
    height: 200px;
}

.warning-card {
    background: rgba(249, 115, 22, 0.05);
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.warning-card .material-icons {
    font-size: 20px;
    color: var(--warning);
    flex-shrink: 0;
}

.warning-card span {
    font-size: 12px;
    color: var(--warning);
}

.session-stats-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.session-stat {
    text-align: center;
}

.session-stat .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.session-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

.rms-chart-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    height: 120px;
    position: relative;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 100%;
}

.chart-bar {
    width: 8px;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s, background 0.3s;
}

.target-line {
    position: absolute;
    top: 50%;
    left: 16px;
    right: 16px;
    height: 2px;
    background: rgba(99, 102, 241, 0.3);
}

.rest-timer-card {
    background: rgba(249, 115, 22, 0.05);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}

.rest-timer-card p {
    font-size: 14px;
    color: var(--warning);
    margin-bottom: 8px;
}

.rest-timer-card span {
    font-size: 36px;
    font-weight: 700;
    color: var(--warning);
}

.session-controls {
    display: flex;
    gap: 12px;
}

.session-controls button:first-child {
    flex: 1;
    justify-content: center;
}

.session-controls button:last-child {
    flex: 2;
    justify-content: center;
}

.detail-header {
    background: var(--surface);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.detail-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.detail-content {
    padding: 16px;
}

.detail-info-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.detail-info-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.detail-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
}

.detail-stat {
    text-align: center;
}

.detail-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.detail-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.detail-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.ai-analysis-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.analysis-header .material-icons {
    font-size: 20px;
    color: var(--primary);
}

.analysis-header span {
    font-size: 14px;
    font-weight: 600;
}

.analysis-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    padding: 16px;
}

.data-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.data-row:last-child {
    border-bottom: none;
}

.data-row span:first-child {
    font-size: 14px;
    color: var(--text-secondary);
}

.data-row span:last-child {
    font-size: 14px;
    font-weight: 600;
}

#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item .material-icons {
    font-size: 24px;
}

.nav-item span {
    font-size: 10px;
}

@media (min-width: 600px) {
    #app {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }

    body {
        background: var(--surface-variant);
    }
}