/* ============================================
   Training Zones - 2026 Premium Design System
   Clean, Fitness-focused, Professional
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

:root {
    --primary: #e97319;
    --primary-dark: #c2600f;
    --primary-light: #f59e4b;
    --primary-subtle: rgba(233, 115, 25, 0.12);

    --white: #0a0a0a;
    --gray-50: #111111;
    --gray-100: #1a1a1a;
    --gray-200: #2a2a2a;
    --gray-300: #3a3a3a;
    --gray-400: #555555;
    --gray-500: #777777;
    --gray-600: #999999;
    --gray-700: #aaaaaa;
    --gray-800: #cccccc;
    --gray-900: #eeeeee;

    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #777777;
    --text-light: #999999;

    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --error: #ef4444;
    --error-light: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.15);

    --glass-bg: rgba(15, 15, 15, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 12px rgba(233, 115, 25, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
    --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
    --space-12: 48px; --space-16: 64px; --space-20: 80px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    --dark: #000000;
    --light: #1a1a1a;
    --gray: #141414;
    --gray-dark: #2a2a2a;
    --text: #e0e0e0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--white);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.15s ease;
}

body.i18n-ready {
    opacity: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Error and Success Messages */
.error-message {
    background: var(--error-light);
    border: 1px solid var(--error);
    color: var(--error);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    font-size: 0.9rem;
    text-align: center;
}

.success-message {
    background: var(--success-light);
    border: 1px solid var(--success);
    color: var(--success);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    font-size: 0.9rem;
    text-align: center;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-10);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

nav.scrolled {
    padding: var(--space-3) var(--space-10);
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.logo:hover { transform: none; }

.logo, .logo span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-base), opacity var(--transition-base);
    opacity: 0.85;
}

.nav-links a:hover { color: var(--primary); opacity: 1; }

.nav-links a.btn-primary { color: #ffffff; opacity: 1; }
.nav-links a.btn-primary:hover { color: #ffffff; opacity: 0.9; transform: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    outline: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover { transform: translateY(-2px); }

.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-full { width: 100%; padding: 16px; font-size: 1.1rem; }
.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--gray-300);
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-16) var(--space-6) var(--space-12);
    background: var(--white);
    position: relative;
}

.hero-bg {
    position: relative;
    background: transparent;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.7) 0%, rgba(10, 10, 10, 0.85) 100%),
        url('/images/Hyrox-header.jpg');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    z-index: -1;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--space-6);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 60%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: var(--space-12) var(--space-6) var(--space-20);
    background: linear-gradient(180deg, #111111 0%, #111111 40%, #0a0a0a 100%);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.features .section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--space-12);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    max-width: 1100px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: var(--space-8);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
}

.feature:hover::before { opacity: 1; }

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-5);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(233, 115, 25, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(233, 115, 25, 0.2);
    color: var(--primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
}

.feature h3 {
    margin-bottom: var(--space-3);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Screenshots Slideshow */
.screenshots {
    padding: var(--space-12) var(--space-6) var(--space-16);
    background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.screenshots h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.screenshots .section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--space-10);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.slideshow {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.slide-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    aspect-ratio: 16/9;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide-arrow {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ccc;
    transition: all 0.2s;
    flex-shrink: 0;
}

.slide-arrow:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.slide-dots {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.2s;
}

.slide-dot.active {
    background: var(--primary);
}

.slide-nav-row {
    display: none;
}

.slide-container {
    cursor: pointer;
}

.slide-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.slide-fullscreen img {
    max-width: 85vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.slide-fullscreen .slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
}

.slide-fullscreen .slide-arrow:hover {
    background: rgba(255,255,255,0.25);
}

.slide-fullscreen .fs-prev {
    left: 16px;
}

.slide-fullscreen .fs-next {
    right: 16px;
}

.slide-fullscreen .fs-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ccc;
    font-size: 18px;
    transition: all 0.2s;
}

.slide-fullscreen .fs-close:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* CTA Section */
.cta-section {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Footer */
footer {
    padding: var(--space-12) var(--space-6);
    text-align: center;
    color: var(--text-secondary);
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer p { font-size: 0.9rem; color: var(--text-secondary); margin: var(--space-2) 0; }

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

footer a:hover { color: var(--primary); }

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

.footer-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: var(--space-4);
}

.footer-logo-container {
    display: flex;
    justify-content: center;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 4px;
    vertical-align: middle;
}

/* Mobile Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--space-3);
    border-radius: var(--radius-sm);
}

.menu-toggle:hover { background: rgba(255, 255, 255, 0.08); }

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: #e0e0e0;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    nav { padding: var(--space-4) var(--space-5); }
    .menu-toggle { display: flex; z-index: 1001; }

    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: #0a0a0a;
        padding: var(--space-5);
        gap: var(--space-3);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }

    .nav-links.active {
        display: flex !important;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links li { width: 100%; text-align: center; }
    .nav-links .btn { width: 100%; display: block; }

    .hero { min-height: auto; padding: var(--space-16) var(--space-5); }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }

    .features { padding: var(--space-10) var(--space-5) var(--space-16); }
    .features h2 { font-size: 1.8rem; }
    .features-grid { gap: var(--space-4); }
    .feature { padding: var(--space-6); }

    .screenshots { padding: var(--space-10) var(--space-4); }
    .screenshots h2 { font-size: 1.8rem; }

    .slideshow {
        flex-direction: column;
        gap: 0;
    }

    .slide-arrow {
        display: none;
    }

    .slide-container {
        width: 100%;
    }

    .slide-dots {
        position: static;
        transform: none;
        margin-top: 12px;
    }

    .slide-prev, .slide-next {
        display: none;
    }

    .slide-nav-row {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 12px;
    }
}

/* Dashboard Styles */
.dashboard {
    padding: var(--space-10) var(--space-6);
    min-height: calc(100vh - 80px);
    background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.dashboard h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--space-8);
    color: var(--text-primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-6);
    max-width: 1100px;
}

.card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-5);
    color: var(--text-primary);
}

/* Your Zones Card */
.zones-auto-toggle {
    margin-bottom: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Error Logs Card */
.error-log-item {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 8px;
    border-left: 3px solid #FF4444;
}

.error-log-type {
    font-size: 0.85rem;
    font-weight: 600;
    color: #FF6666;
}

.error-log-endpoint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.error-log-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    word-break: break-word;
}

.error-log-date {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
}

.zone-stacked-bar {
    display: flex;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}

.zone-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.4s ease;
}

.zone-segment span {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(0,0,0,0.6);
}

.zone-segment.z1 { background: #888888; }
.zone-segment.z2 { background: #3399FF; }
.zone-segment.z3 { background: #33CC66; }
.zone-segment.z4 { background: #FF9933; }
.zone-segment.z5 { background: #FF3333; }

.zone-labels {
    position: relative;
    height: 18px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.zone-labels span {
    position: absolute;
    transform: translateX(-50%);
}

.zone-labels span:first-child {
    transform: translateX(0);
}

.zone-labels span:last-child {
    transform: translateX(-100%);
}

.zone-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.zone-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.zone-input-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.zone-input-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.zone-input-color.z1 { background: #888888; }
.zone-input-color.z2 { background: #3399FF; }
.zone-input-color.z3 { background: #33CC66; }
.zone-input-color.z4 { background: #FF9933; }
.zone-input-color.z5 { background: #FF3333; }

.zone-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zone-input-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
}

.zone-input {
    width: 60px;
    padding: 4px 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
    -moz-appearance: textfield;
}

.zone-input::-webkit-outer-spin-button,
.zone-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.zone-input:focus {
    outline: none;
    border-color: var(--primary);
}

.pairing-code {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-align: center;
    padding: var(--space-6);
    background: var(--primary-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.copy-code-btn:hover { background: rgba(255,255,255,0.15) !important; }
.copy-code-btn:active { transform: scale(0.95); }

.card-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-info a, .card ol a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Download Section */
.download-section {
    padding: var(--space-8) 0;
    text-align: center;
}

.download-section h2 {
    margin-bottom: var(--space-2);
}

.download-section .section-subtitle {
    margin-bottom: var(--space-6);
}

/* Download Apps Grid */
.download-apps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .download-apps-grid {
        grid-template-columns: 1fr;
    }
}

.download-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-5);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.download-app-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.download-app-badge {
    height: 70px;
    flex-shrink: 0;
}

.download-app-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
}

.download-app-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.download-app-type {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.download-app-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.status-connected {
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.loading-text { color: var(--text-muted); }

/* Zone bars for dashboard */
.zone-bar-container {
    margin-bottom: var(--space-3);
}

.zone-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.zone-bar {
    height: 24px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.zone-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--space-2);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    min-width: 0;
}

.zone-1 { background: #888888; }
.zone-2 { background: #3399FF; }
.zone-3 { background: #33CC66; }
.zone-4 { background: #FF9933; }
.zone-5 { background: #FF3333; }

/* ============================================
   Workout Chart Layout
   ============================================ */

.workout-chart-container {
    display: flex;
    gap: 20px;
    margin-top: -16px;
    flex: 1;
    align-items: stretch;
    height: 420px;
}

/* Card title row with controls */
.chart-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(255, 153, 51, 0.08);
    border: 1px solid rgba(255, 153, 51, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.chart-info-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.chart-info-close:hover {
    color: var(--text-primary);
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.card-title-row h3 {
    margin-bottom: 0;
}

.card-title-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.chart-title-left {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.chart-title-right {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.stack-percent-row {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

/* Chart Tooltip */
.chart-tooltip {
    display: none;
    position: fixed;
    z-index: 100;
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--text-primary);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.chart-tooltip-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.chart-tooltip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.6;
}

.chart-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.workout-chart-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chart-area-controls {
    position: absolute;
    right: 12px;
    top: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.workout-chart-area {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.zone-line-dropdown {
    position: relative;
}

.zone-line-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.zone-line-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.zone-line-btn.active {
    background: rgba(59,130,246,0.2);
    border-color: rgba(59,130,246,0.4);
    color: #7bb3f5;
}

.zone-line-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.zone-line-menu.open {
    display: block;
}

.zone-line-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    transition: background 0.1s;
}

.zone-line-item:hover {
    background: rgba(255,255,255,0.06);
}

.zone-line-item[data-action] {
    font-size: 12px;
    color: #888;
}

.zone-line-sep {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0;
}

.zone-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.workout-chart-area::-webkit-scrollbar {
    height: 4px;
}

.workout-chart-area::-webkit-scrollbar-track {
    background: transparent;
}

.workout-chart-area::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.workout-chart-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

/* Segmented Control */
.segment-control {
    display: inline-flex;
    align-self: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 3px;
}

.segment-btn {
    padding: 6px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.segment-btn:hover {
    color: var(--text-primary);
}

.segment-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.workout-controls-panel {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stack button */
.stack-btn {
    align-self: flex-start;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.stack-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.stack-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

#workoutChart {
    flex: 1;
    width: 100%;
    min-height: 280px;
    border-radius: 8px;
}

/* Date List */
.date-list-group {
    flex: 1 !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.date-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.date-list::-webkit-scrollbar {
    width: 4px;
}

.date-list::-webkit-scrollbar-track {
    background: transparent;
}

.date-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.date-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

.date-list-item {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.date-list-item:last-child {
    border-bottom: none;
}

.date-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.date-list-item.active {
    background: var(--primary-subtle);
    color: var(--primary-light);
    font-weight: 600;
}

.date-list-item .item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.delete-activity-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    opacity: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

.date-list-item:hover .delete-activity-btn {
    opacity: 0.5;
}

.delete-activity-btn:hover {
    opacity: 1 !important;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.date-list-item .item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.date-list.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Responsive: controls on top for mobile */
@media (max-width: 768px) {
    .workout-chart-container {
        flex-direction: column;
        height: auto;
        max-width: 100%;
        overflow: hidden;
        margin-top: -8px;
    }

    .card-title-controls {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: flex-end;
        margin-bottom: 0;
    }

    .stack-percent-row {
        margin-right: 0 !important;
    }

    .chart-title-left {
        flex: none;
        justify-content: center;
    }

    .chart-title-right {
        display: none;
    }

    .workout-chart-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin-top: 5px;
        margin-bottom: -12px;
    }

    .mobile-segment {
        display: flex !important;
        justify-content: center;
        padding: 0;
        margin: -4px 0 -4px 0;
    }

    .workout-chart-area {
        min-height: 300px;
        max-width: 100%;
    }

    .chart-area-controls {
        right: 0px;
        top: 0px;
    }

    .workout-controls-panel {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        margin-top: 2px;
    }

    .control-label {
        display: none;
    }

    .date-list-group {
        flex: 0 0 auto !important;
    }

    .date-list {
        min-height: 0;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.15) transparent;
    }

    .date-list::-webkit-scrollbar {
        height: 4px;
    }

    .date-list-item {
        flex: 0 0 auto;
        padding: 6px 14px;
    }

    .date-list-item .item-meta {
        display: none;
    }

    .date-list-item br {
        display: none;
    }

    .delete-activity-btn {
        opacity: 0.5;
    }

    .zone-line-menu {
        right: 0;
    }
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-small { padding: 10px 20px; font-size: 0.9rem; }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease;
}

.btn-secondary:hover { transform: translateY(-2px); }

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    border-radius: 16px;
    padding: 32px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .dashboard { padding: var(--space-6) 0; }
    .dashboard .container { padding: 0 14px; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
    .card { padding: var(--space-4); max-width: 100%; overflow: hidden; box-sizing: border-box; }
    .pairing-code { font-size: 2rem; }
}



/* ============================================
   Contact Section
   ============================================ */

.contact-section {
    padding: var(--space-10) var(--space-6);
    background: rgba(255, 255, 255, 0.02);
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.contact-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.contact-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.contact-form {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.contact-form .btn {
    width: 100%;
    margin-top: var(--space-2);
}

.contact-status {
    text-align: center;
    margin-top: var(--space-4);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .contact-form {
        padding: var(--space-4);
        max-width: 100%;
    }
    .contact-section {
        padding: var(--space-10) var(--space-3);
    }
}


/* ── Language Selector ── */
.lang-selector {
    position: fixed;
    bottom: var(--space-5);
    left: var(--space-5);
    z-index: 9999;
    list-style: none;
}

.lang-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    cursor: pointer;
    padding: var(--space-2) var(--space-3);
    line-height: 1;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.lang-btn:hover {
    background: var(--gray-100);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.lang-btn .lang-code {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.lang-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: var(--space-2);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    min-width: 110px;
    overflow: hidden;
}

.lang-dropdown.show {
    display: block;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-fast);
    color: var(--text-primary);
}

.lang-dropdown button:hover {
    background: var(--gray-200);
}

.lang-dropdown .lang-code {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   Passkey Banner
   ============================================ */

.passkey-banner {
    background: rgba(245, 158, 11, 0.12);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    padding: 12px 20px;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 998;
    transition: top 250ms ease;
}

.passkey-banner.scrolled {
    top: 64px;
}

.passkey-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.passkey-banner-icon {
    font-size: 1.5rem;
    color: #f59e0b;
}

.passkey-banner-text {
    flex: 1;
    min-width: 200px;
}

.passkey-banner-text strong {
    color: var(--text-primary);
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.passkey-banner-text span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.passkey-banner .btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.passkey-banner-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: opacity 0.2s;
}

.passkey-banner-close:hover {
    opacity: 0.6;
}

@media (max-width: 600px) {
    .passkey-banner {
        padding: 10px 15px;
    }

    .passkey-banner-content {
        gap: 10px;
        position: relative;
        padding-right: 30px;
    }

    .passkey-banner-text {
        flex: 1;
        order: 1;
    }

    .passkey-banner-icon {
        order: 0;
    }

    .passkey-banner .btn-sm {
        order: 2;
        flex: 1 1 100%;
        width: 100%;
    }

    .passkey-banner-close {
        order: 2;
        position: absolute;
        right: 0;
        top: 0;
    }

    .passkey-banner {
        position: fixed;
        top: 70px;
    }

    .passkey-banner.scrolled {
        top: 58px;
    }
}