/* ============================================
   BiciHamster — Design System
   @author Lucas Nieto (lucasnieto@gmail.com)
   ============================================ */

/* Las fuentes (Inter, Orbitron) se cargan vía <link> en index.html para evitar
   el bloqueo de renderizado que provoca @import dentro del CSS. */

/* ── CSS Custom Properties ── */
:root {
    /* Colors — Dark theme with amber/orange energy accents */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.6);
    --bg-card-hover: rgba(36, 36, 60, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-border: rgba(255, 255, 255, 0.08);

    --accent-primary: #ff8c00;
    --accent-secondary: #ffaa33;
    --accent-tertiary: #ff6600;
    --accent-glow: rgba(255, 140, 0, 0.3);
    --accent-glow-strong: rgba(255, 140, 0, 0.5);

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --text-accent: #ffaa33;

    --success: #00e676;
    --success-bg: rgba(0, 230, 118, 0.1);
    --warning: #ffc107;
    --warning-bg: rgba(255, 193, 7, 0.1);
    --danger: #ff5252;
    --danger-bg: rgba(255, 82, 82, 0.1);
    --info: #448aff;
    --info-bg: rgba(68, 138, 255, 0.1);

    /* Segment colors */
    --color-warmup: #4fc3f7;
    --color-interval: #ff5252;
    --color-recovery: #66bb6a;
    --color-cooldown: #ab47bc;
    --color-steady: #ffaa33;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --shadow-glow-strong: 0 0 40px var(--accent-glow-strong);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 140, 0, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 100, 0, 0.05), transparent),
        radial-gradient(ellipse 40% 30% at 10% 60%, rgba(255, 170, 51, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ── Layout ── */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header / Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bg-glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.navbar-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.navbar-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.navbar-nav {
    display: flex;
    gap: var(--space-xs);
    list-style: none;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.nav-btn.active {
    color: var(--accent-primary);
    background: rgba(255, 140, 0, 0.1);
    box-shadow: inset 0 -2px 0 var(--accent-primary);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Connection Status (Navbar) ── */
.bt-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid;
    transition: all var(--transition-base);
}

.bt-status.disconnected {
    color: var(--text-muted);
    border-color: var(--bg-glass-border);
    background: var(--bg-glass);
}

.bt-status.connecting {
    color: var(--warning);
    border-color: rgba(255, 193, 7, 0.3);
    background: var(--warning-bg);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.bt-status.connected {
    color: var(--success);
    border-color: rgba(0, 230, 118, 0.3);
    background: var(--success-bg);
}

.bt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.bt-status.connecting .bt-dot {
    animation: blink 1s ease-in-out infinite;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ── Screens ── */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

/* ── Cards (Glass) ── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

/* ── Dashboard Grid ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.dashboard-full {
    grid-column: 1 / -1;
}

/* ── Metric Cards ── */
.metric-card {
    text-align: center;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

.metric-value {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-xs);
}

.metric-value .metric-unit {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: var(--space-xs);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Resistance Control ── */
.resistance-control {
    padding: var(--space-xl);
}

.resistance-slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.resistance-value-display {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-glow);
    min-width: 80px;
    text-align: center;
}

.resistance-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    outline: none;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.resistance-slider:hover {
    opacity: 1;
}

.resistance-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    box-shadow:
        0 0 12px var(--accent-glow),
        var(--shadow-md);
    border: 3px solid var(--accent-primary);
    transition: transform var(--transition-fast);
}

.resistance-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.resistance-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    box-shadow:
        0 0 12px var(--accent-glow),
        var(--shadow-md);
    border: 3px solid var(--accent-primary);
}

.resistance-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0 4px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--bg-glass-border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #ff3333;
    box-shadow: 0 0 20px rgba(255, 82, 82, 0.3);
}

.btn-success {
    background: var(--success);
    color: #000;
}

.btn-success:hover {
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Connect Button (special) ── */
.connect-section {
    text-align: center;
    padding: var(--space-2xl);
}

.connect-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    animation: float 3s ease-in-out infinite;
}

.connect-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.connect-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* ── Training Plans Grid ── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.plan-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.plan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: border-color var(--transition-base);
    pointer-events: none;
}

.plan-card:hover::after {
    border-color: var(--accent-primary);
}

.plan-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.plan-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.plan-icon.warmup {
    background: rgba(79, 195, 247, 0.15);
}

.plan-icon.interval {
    background: rgba(255, 82, 82, 0.15);
}

.plan-icon.recovery {
    background: rgba(102, 187, 106, 0.15);
}

.plan-icon.endurance {
    background: rgba(255, 170, 51, 0.15);
}

.plan-icon.strength {
    background: rgba(171, 71, 188, 0.15);
}

.plan-icon.custom {
    background: rgba(68, 138, 255, 0.15);
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.plan-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.plan-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.plan-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.plan-tag {
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-tag.easy {
    background: var(--success-bg);
    color: var(--success);
}

.plan-tag.medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.plan-tag.hard {
    background: var(--danger-bg);
    color: var(--danger);
}

.plan-preview-chart {
    height: 60px;
    margin-top: var(--space-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ── Session Active Screen ── */
.session-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.session-velodrome {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
}

.session-velodrome canvas {
    width: 100%;
    height: 350px;
    display: block;
}

.session-metrics-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
}

.session-metric {
    text-align: center;
    padding: var(--space-md);
}

.session-metric .metric-value {
    font-size: 2rem;
}

.session-metric .metric-label {
    font-size: 0.75rem;
}

.session-controls {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    padding: var(--space-md);
}

.session-progress {
    padding: var(--space-lg);
}

.progress-segment-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: var(--space-sm);
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-full);
    transition: width 1s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.session-plan-profile {
    padding: var(--space-lg);
}

.session-plan-profile canvas {
    width: 100%;
    height: 100px;
    display: block;
    border-radius: var(--radius-sm);
}

/* ── Race Position Overlay ── */
.race-overlay {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

/* ═══════ AUTH SCREEN ═══════ */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.auth-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    font-size: 4rem;
    margin-bottom: 8px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 900;
    color: #ff8c00;
    letter-spacing: 4px;
    margin: 0;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
    border-color: #ff8c00;
    color: #ff8c00;
}

.auth-switch {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 20px;
}

.auth-switch a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.auth-message.error {
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: #ff5252;
}

.auth-message.success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

/* Badge de usuario en la navbar */
/* Botón fullscreen global en navbar */
.nav-fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    margin-left: 8px;
    transition: all var(--transition-base);
}

.nav-fullscreen-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 198, 255, 0.1);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.user-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.race-overlay-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.race-position-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 3px 0;
    font-size: 0.8rem;
}

.race-position-item.user {
    color: var(--accent-primary);
    font-weight: 700;
}

.race-pos-number {
    width: 20px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.75rem;
}

.race-pos-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Plan Editor / Creator ── */
.plan-editor {
    margin-top: var(--space-lg);
}

.editor-form {
    display: grid;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input,
.form-select {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Segment editor rows */
.segment-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.segment-row {
    display: grid;
    grid-template-columns: 1fr 100px 80px 80px auto;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-glass-border);
}

.segment-row .form-input,
.segment-row .form-select {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
}

.segment-type-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: var(--space-xs);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* ── History ── */
.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.history-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-lg);
    align-items: center;
    padding: var(--space-lg);
}

.history-date {
    text-align: center;
    min-width: 70px;
}

.history-date-day {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.history-date-month {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.history-stats {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-actions .btn {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-md);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
}

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

/* ── Animations ── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes pulse-glow {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.2);
    }

    50% {
        box-shadow: 0 0 15px 3px rgba(255, 193, 7, 0.15);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Section Headers ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-title svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

/* ── Responsive ── */

/* Tablets & small laptops (≤1024px) */
@media (max-width: 1024px) {
    .auth-container {
        max-width: 380px;
        padding: 32px 24px;
    }
    .access-container {
        padding: 32px 24px;
    }
    .plans-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .history-item {
        grid-template-columns: auto 1fr;
        gap: var(--space-md);
    }
    .history-actions {
        grid-column: 1 / -1;
        text-align: right;
    }
    .zwift-hud {
        right: var(--space-sm);
        top: var(--space-sm);
        transform: scale(0.85);
        transform-origin: top right;
    }
}

/* Tablets (≤768px) */
@media (max-width: 768px) {
    /* ── Layout ── */
    .main-content {
        padding: var(--space-md);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: var(--space-lg);
    }

    .section-title {
        font-size: 1.25rem;
    }

    .card {
        padding: var(--space-md);
    }

    /* ── Navbar ── */
    .navbar {
        flex-wrap: wrap;
        gap: var(--space-xs);
        padding: var(--space-sm) var(--space-md);
    }

    .navbar-title {
        font-size: 1.1rem;
    }

    .navbar-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px;
    }

    .nav-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8rem;
    }

    .nav-btn span {
        display: none;
    }

    .user-badge {
        margin-left: auto;
    }

    .user-name {
        display: none;
    }

    /* ── Auth / Access ── */
    .auth-container {
        max-width: 340px;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .auth-logo {
        font-size: 3rem;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .access-container {
        padding: 24px 20px;
        max-width: 98%;
        border-radius: 16px;
    }

    /* ── Dashboard ── */
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .metric-value {
        font-size: 2rem;
    }

    .metric-icon {
        font-size: 1.6rem;
    }

    .connect-section {
        padding: var(--space-lg);
    }

    .connect-section .btn-lg {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }

    .resistance-slider-container {
        flex-direction: column;
        gap: var(--space-md);
    }

    .resistance-value-display {
        font-size: 2.5rem;
    }

    /* ── Plans ── */
    .plans-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .plan-card-header {
        flex-wrap: wrap;
    }

    /* ── Session ── */
    .view-selector-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .view-selector {
        width: 100%;
    }

    .view-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.8rem;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .session-metrics-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .session-metric {
        padding: var(--space-sm);
    }

    .session-metric .metric-value {
        font-size: 1.5rem;
    }

    .session-metric .metric-icon {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    .session-velodrome canvas {
        height: 250px;
    }

    .session-controls {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .session-controls .btn {
        width: 100%;
    }

    .session-progress {
        padding: var(--space-md);
    }

    .session-plan-profile {
        padding: var(--space-md);
    }

    .session-plan-profile canvas {
        height: 80px;
    }

    /* ── History ── */
    .history-item {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        padding: var(--space-md);
        text-align: center;
    }

    .history-date {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-sm);
        min-width: auto;
    }

    .history-date-day {
        font-size: 1.2rem;
    }

    .history-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .history-stats span {
        font-size: 0.75rem;
    }

    .history-actions {
        text-align: center;
    }

    /* ── Social ── */
    .social-tabs {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .social-tab {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
    }

    .search-box {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .search-box input {
        width: 100%;
    }

    /* ── Compete ── */
    .compete-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }

    .modal-wide {
        max-width: 95%;
        padding: var(--space-md);
    }

    /* ── Pricing ── */
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .pricing-card--popular {
        transform: none;
    }

    .pricing-card--popular:hover {
        transform: translateY(-5px);
    }

    .pricing-amount {
        font-size: 2rem;
    }

    /* ── Segment Editor ── */
    .segment-row {
        grid-template-columns: 1fr 80px 70px;
        gap: var(--space-xs);
        font-size: 0.8rem;
    }

    .segment-row .form-input,
    .segment-row .form-select {
        font-size: 0.75rem;
        padding: 4px 6px;
    }

    /* ── Modals ── */
    .modal {
        padding: var(--space-md);
        max-width: 95%;
    }

    .modal-header {
        margin-bottom: var(--space-md);
    }

    .modal-title {
        font-size: 1rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* ── General ── */
    .btn-lg {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9rem;
    }
}

/* Phones (≤480px) */
@media (max-width: 480px) {
    /* ── Layout ── */
    .main-content {
        padding: var(--space-sm);
    }

    .section-title {
        font-size: 1.1rem;
    }

    .card {
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
    }

    /* ── Navbar ── */
    .navbar {
        padding: var(--space-xs) var(--space-sm);
        gap: 2px;
    }

    .navbar-logo {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }

    .navbar-title {
        font-size: 0.95rem;
        letter-spacing: 0;
    }

    .nav-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .bt-status {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    #btn-fullscreen-global {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    #btn-fullscreen-global svg {
        width: 16px;
        height: 16px;
    }

    /* ── Auth ── */
    .auth-container {
        max-width: 100%;
        margin: 0 12px;
        padding: 20px 16px;
    }

    .auth-logo {
        font-size: 2.5rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-subtitle {
        font-size: 0.85rem;
        margin-bottom: 24px;
    }

    .access-container {
        padding: 16px 12px;
        border-radius: 12px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* ── Dashboard ── */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .metric-value {
        font-size: 1.8rem;
    }

    .metric-card {
        padding: var(--space-md);
    }

    .metric-icon {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .metric-label {
        font-size: 0.75rem;
    }

    .connect-section {
        padding: var(--space-md);
    }

    .connect-icon {
        font-size: 3rem;
        margin-bottom: var(--space-md);
    }

    .connect-title {
        font-size: 1.1rem;
    }

    .connect-subtitle {
        font-size: 0.8rem;
        margin-bottom: var(--space-lg);
    }

    .resistance-value-display {
        font-size: 2rem;
    }

    .resistance-slider-container {
        gap: var(--space-sm);
    }

    .resistance-labels {
        font-size: 0.65rem;
    }

    /* ── Session ── */
    .session-metrics-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }

    .session-metric {
        padding: var(--space-xs) var(--space-sm);
        border-radius: var(--radius-sm);
    }

    .session-metric .metric-value {
        font-size: 1.2rem;
    }

    .session-metric .metric-label {
        font-size: 0.65rem;
    }

    .session-metric .metric-icon {
        font-size: 1rem;
    }

    .session-velodrome canvas {
        height: 200px;
    }

    .session-progress {
        padding: var(--space-sm) var(--space-md);
    }

    .progress-segment-name {
        font-size: 0.95rem;
    }

    .view-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
        border-radius: 4px;
    }

    .view-btn svg {
        display: none;
    }

    /* ── History ── */
    .history-item {
        padding: var(--space-sm) var(--space-md);
    }

    .history-date-day {
        font-size: 1rem;
    }

    .history-date-month {
        font-size: 0.65rem;
    }

    .history-info h3 {
        font-size: 0.9rem;
    }

    .history-stats {
        font-size: 0.7rem;
        gap: var(--space-sm);
    }

    .history-stats span {
        font-size: 0.7rem;
    }

    .history-actions .btn {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* ── Plans ── */
    .plan-name {
        font-size: 1rem;
    }

    .plan-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .plan-description {
        font-size: 0.8rem;
    }

    .plan-tag {
        font-size: 0.6rem;
        padding: 1px 6px;
    }

    /* ── Social ── */
    .social-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .social-tab {
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── Compete ── */
    .compete-header h2 {
        font-size: 1.2rem;
    }

    .comp-info-bar {
        flex-direction: column;
        gap: var(--space-xs);
        font-size: 0.8rem;
    }

    .friends-select {
        max-height: 150px;
        overflow-y: auto;
    }

    /* ── Modals ── */
    .modal {
        padding: var(--space-sm) var(--space-md);
        width: 98%;
    }

    .modal-header {
        margin-bottom: var(--space-sm);
    }

    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .modal-footer {
        margin-top: var(--space-lg);
    }

    .modal-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .modal-actions .btn {
        width: 100%;
    }

    /* ── Toast ── */
    .toast-container {
        bottom: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }

    .toast {
        max-width: 100%;
        font-size: 0.85rem;
        padding: var(--space-sm) var(--space-md);
    }

    /* ── Pricing ── */
    .pricing-card {
        padding: 16px;
    }

    .pricing-name {
        font-size: 1rem;
    }

    .pricing-features li {
        font-size: 0.8rem;
        padding: 4px 0;
    }

    /* ── Segment Editor ── */
    .segment-row {
        grid-template-columns: 1fr 60px;
        gap: 4px;
        padding: var(--space-xs);
    }

    .segment-row .btn-icon {
        width: 28px;
        height: 28px;
    }

    .editor-form {
        gap: var(--space-sm);
    }

    /* ── Race overlay ── */
    .race-overlay {
        top: var(--space-sm);
        right: var(--space-sm);
        padding: var(--space-sm);
        font-size: 0.75rem;
    }

    .race-position-item {
        font-size: 0.7rem;
    }

    .race-pos-number {
        width: 16px;
        font-size: 0.65rem;
    }

    /* ── Lap counter ── */
    .lap-counter {
        padding: 4px 8px;
    }

    .lap-counter-value {
        font-size: 0.9rem;
    }

    /* ── Session immersive ── */
    .session-immersive .immersive-toolbar {
        bottom: var(--space-sm);
        gap: 4px;
        padding: 4px 8px;
    }

    .session-immersive .toolbar-btn {
        width: 36px;
        height: 36px;
    }

    .session-immersive .toolbar-btn svg {
        width: 18px;
        height: 18px;
    }

    /* ── Zwift HUD ── */
    .zwift-hud {
        transform: scale(0.7);
        transform-origin: top right;
    }
}

/* Very small phones (≤360px) */
@media (max-width: 360px) {
    .navbar-title {
        display: none;
    }

    .navbar-nav {
        gap: 0;
    }

    .nav-btn {
        padding: 4px 6px;
    }

    .view-btn {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .session-metric .metric-value {
        font-size: 1rem;
    }

    .auth-container {
        padding: 16px 12px;
    }

    .zwift-hud {
        transform: scale(0.55);
    }
}

/* ── Toast notifications ── */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--bg-glass-border);
    box-shadow: var(--shadow-lg);
    animation:
        slideInRight 0.3s ease,
        fadeOut 0.3s ease 3.7s forwards;
    font-size: 0.9rem;
    max-width: 350px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--info);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ── Lap counter ── */
.lap-counter {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.lap-counter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.lap-counter-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ── View Selector (Sprint 6) ── */
.view-selector {
    display: inline-flex;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-glass-border);
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ── View Container ── */
.session-view-container {
    position: relative;
    width: 100%;
}

.session-view {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
}

.session-view.active {
    display: block;
}

/* ═══════ SESSION IMMERSIVE MODE ═══════ */
/* Applied via .session-immersive class on .session-layout when session starts */

body.session-active .navbar {
    display: none !important;
}

body.session-active .main-content {
    padding: 0;
    max-width: none;
}

.session-immersive {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
}

.session-immersive .view-selector-container,
.session-immersive .session-metrics-bar,
.session-immersive .session-progress,
.session-immersive .session-plan-profile,
.session-immersive #session-resistance-profile-card,
.session-immersive .session-controls {
    display: none !important;
}

.session-immersive .session-view-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.session-immersive .session-view.active {
    height: 100vh;
    position: relative;
}

.session-immersive .session-velodrome {
    border-radius: 0;
    border: none;
    height: 100vh;
}

.session-immersive .session-velodrome canvas,
.session-immersive #zwift-canvas,
.session-immersive #hamster-canvas {
    width: 100vw !important;
    height: 100vh !important;
    display: block;
}

.session-immersive .zwift-hud {
    display: block;
    z-index: 10;
}

.session-immersive .immersive-toolbar {
    display: flex;
    z-index: 20;
}

/* Ranking y overlays del velódromo */
.session-immersive .race-overlay {
    z-index: 50;
}

.session-immersive .lap-counter {
    z-index: 50;
}

/* ── Fullscreen extras (on top of immersive) ── */
:fullscreen .navbar {
    display: none !important;
}

/* ═══════ ACCESS SCREEN (Sprint 5 & 6) ═══════ */
.access-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: opacity 0.4s ease;
}

.access-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 900px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.access-subtitle {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    margin-bottom: 32px;
}

/* ═══════ PRICING (Sprint 6) ═══════ */
.pricing-divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.pricing-divider::before,
.pricing-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.pricing-divider span {
    padding: 0 16px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.pricing-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.pricing-card--popular {
    border-color: rgba(255, 140, 0, 0.4);
    background: rgba(255, 140, 0, 0.05);
    transform: scale(1.03);
    z-index: 1;
}

.pricing-card--popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff8c00;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.3);
}

.pricing-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 8px 0;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ff8c00;
}

.pricing-interval {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.pricing-features li {
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ── Password Strength ── */
.password-strength {
    margin-top: 4px;
    font-size: 0.8rem;
}

.strength-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.strength-fill {
    height: 100%;
    transition:
        width 0.3s,
        background 0.3s;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #ef4444;
}

.strength-fill.fair {
    width: 50%;
    background: #f59e0b;
}

.strength-fill.good {
    width: 75%;
    background: #22c55e;
}

.strength-fill.strong {
    width: 100%;
    background: #10b981;
}
