/**
 * JOOJAI.COM - Main Stylesheet
 * English Mastery Learning Platform
 *
 * Table of Contents:
 * 1. CSS Variables & Theme
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout
 * 5. Components
 * 6. Landing Page
 * 7. Auth Pages
 * 8. App Layout
 * 9. Dashboard
 * 10. Study & Flashcards
 * 11. Lists & Tables
 * 12. Forms
 * 13. Utilities
 * 14. Responsive
 * 15. Animations
 */

/* ==========================================================================
   1. CSS Variables & Theme
   ========================================================================== */

:root {
    /* Colors - Light Theme */
    --color-primary: #4f46e5;
    --color-primary-dark: #4338ca;
    --color-primary-light: #818cf8;
    --color-primary-bg: #eef2ff;

    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-bg: #fef3c7;
    --color-error: #ef4444;
    --color-error-bg: #fee2e2;
    --color-info: #3b82f6;
    --color-info-bg: #dbeafe;

    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-hover: #f1f5f9;
    --color-bg-active: #e2e8f0;

    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #ffffff;

    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Rating Colors */
    --color-again: #ef4444;
    --color-hard: #f59e0b;
    --color-good: #10b981;
    --color-easy: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --max-content-width: 1200px;

    /* Font */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
}

/* Dark Theme */
[data-theme="dark"] {
    --color-primary: #818cf8;
    --color-primary-dark: #6366f1;
    --color-primary-light: #a5b4fc;
    --color-primary-bg: #1e1b4b;

    --color-success-bg: #064e3b;
    --color-warning-bg: #78350f;
    --color-error-bg: #7f1d1d;
    --color-info-bg: #1e3a5f;

    --color-bg: #0f172a;
    --color-bg-card: #1e293b;
    --color-bg-hover: #334155;
    --color-bg-active: #475569;

    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    --color-border: #334155;
    --color-border-light: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Dark theme - Name section adjustments */
[data-theme="dark"] .name-card {
    box-shadow:
        0 4px 6px -1px rgba(129, 140, 248, 0.15),
        0 10px 20px -5px rgba(129, 140, 248, 0.2),
        0 25px 50px -12px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .floating-circle {
    opacity: 0.12;
}

/* Dark theme - Mobile sidebar close button */
[data-theme="dark"] .sidebar-close {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .sidebar-close:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Dark theme - Audio buttons */
[data-theme="dark"] .audio-btn {
    background-color: rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .audio-btn:hover {
    background-color: var(--color-primary);
}

[data-theme="dark"] .audio-btn-sentence {
    background-color: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .audio-btn-sentence:hover {
    background-color: var(--color-success);
}

[data-theme="dark"] .content-item-example {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .construction-usage-note {
    background-color: rgba(59, 130, 246, 0.1);
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style: none;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-md);
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.highlight {
    color: var(--color-primary);
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ==========================================================================
   5. Components
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-dark);
    color: var(--color-text-inverse);
}

.btn-secondary {
    background-color: var(--color-bg-hover);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-bg-active);
    color: var(--color-text);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--color-bg-hover);
    color: var(--color-text);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.0625rem;
}

.btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

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

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

/* Cards */
.card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

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

.card-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    background-color: var(--color-bg-hover);
    color: var(--color-text-secondary);
}

.badge-primary {
    background-color: var(--color-primary-bg);
    color: var(--color-primary);
}

.badge-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
}

/* Alerts */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    margin-bottom: var(--space-lg);
}

.alert-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.alert-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.alert-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.alert-info {
    background-color: var(--color-info-bg);
    color: var(--color-info);
    border: 1px solid var(--color-info);
}

/* Progress Bar - Premium Design */
.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

[data-theme="light"] .progress-bar {
    background: rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-fill.success {
    background: linear-gradient(90deg, #22c55e 0%, #10b981 50%, #14b8a6 100%);
}

/* ==========================================================================
   6. Landing Page
   ========================================================================== */

.landing-page {
    background-color: var(--color-bg);
}

.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}

.landing-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.landing-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: contain;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.landing-nav a:not(.btn) {
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Login button - desktop shows text, mobile shows icon */
.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login svg {
    display: none;
    flex-shrink: 0;
}


.landing-nav a:not(.btn):hover {
    color: var(--color-text);
}

/* Hero Section */
.hero {
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

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

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

.hero-note {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.flashcard-demo {
    perspective: 1000px;
}

.flashcard-demo .flashcard {
    width: 320px;
    height: 200px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
}

.flashcard-demo .card-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flashcard-demo .card-pattern {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: var(--space-lg);
}

.flashcard-demo .card-example {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-sm);
}

/* Name Meaning Section - Joojai = You Enjoy */
.name-meaning {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-primary-bg) 50%, var(--color-bg) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Floating background effects */
.name-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    opacity: 0.08;
    animation: float 20s ease-in-out infinite;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
    animation-delay: -7s;
    animation-duration: 25s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    animation-duration: 18s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.name-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
    position: relative;
    z-index: 1;
}

/* Main card with name transformation */
.name-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 3px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-primary) 100%);
    box-shadow:
        0 4px 6px -1px rgba(79, 70, 229, 0.1),
        0 10px 20px -5px rgba(79, 70, 229, 0.15),
        0 25px 50px -12px rgba(79, 70, 229, 0.25);
    animation: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {
    0%, 100% {
        box-shadow:
            0 4px 6px -1px rgba(79, 70, 229, 0.1),
            0 10px 20px -5px rgba(79, 70, 229, 0.15),
            0 25px 50px -12px rgba(79, 70, 229, 0.25);
    }
    50% {
        box-shadow:
            0 4px 6px -1px rgba(79, 70, 229, 0.2),
            0 10px 20px -5px rgba(79, 70, 229, 0.25),
            0 25px 50px -12px rgba(79, 70, 229, 0.35);
    }
}

.name-card-inner {
    background: var(--color-bg-card);
    border-radius: calc(var(--radius-xl) - 3px);
    padding: var(--space-2xl) var(--space-3xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.say-it {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
}

.name-transform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.name-original {
    display: flex;
    gap: 0.05em;
}

.name-original .letter {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1;
    transition: all 0.3s ease;
    display: inline-block;
}

.name-original .letter:hover {
    color: var(--color-primary);
    transform: translateY(-5px);
}

.transform-arrow {
    color: var(--color-primary);
    animation: arrowPulse 2s ease-in-out infinite;
}

.transform-arrow svg {
    width: 32px;
    height: 32px;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(8px);
    }
}

.name-decoded {
    position: relative;
}

.decoded-text {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
}

/* Revelation box */
.revelation-box {
    max-width: 480px;
}

.revelation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

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

.revelation-main .en {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.revelation-main .sk {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
}

.revelation-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--color-primary) 50%, transparent 100%);
    border-radius: 2px;
}

.revelation-sub {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.revelation-sub strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Stats Section */
.stats {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-sm);
}

.stat-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* Features Section */
.features {
    padding: var(--space-3xl) 0;
}

.features h2 {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

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

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Method Section */
.method {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg-card);
}

.method h2 {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
}

.method-phases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

.phase-card {
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
}

.phase-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.phase-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.phase-card p {
    color: var(--color-text-secondary);
    margin: 0;
}

.learning-phases {
    max-width: 800px;
    margin: 0 auto;
}

.learning-phases h3 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.phases-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.learning-phase {
    background-color: var(--color-bg);
    border-radius: var(--radius);
    padding: var(--space-md) var(--space-lg);
    display: grid;
    grid-template-columns: auto 150px auto 1fr;
    gap: var(--space-md);
    align-items: center;
}

.phase-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
}

.phase-name {
    font-weight: 600;
}

.phase-count {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.learning-phase p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Timeline Section */
.timeline {
    padding: var(--space-3xl) 0;
}

.timeline h2 {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.checkpoint {
    flex: 1;
    text-align: center;
}

.checkpoint-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.checkpoint-content h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.checkpoint-content ul {
    text-align: left;
    display: inline-block;
}

.checkpoint-content li {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    padding-left: var(--space-lg);
    position: relative;
    margin-bottom: var(--space-xs);
}

.checkpoint-content li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
}

/* CTA Section */
.cta {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    text-align: center;
}

.cta h2 {
    color: #ffffff !important;
    margin-bottom: var(--space-md);
    font-size: 2rem;
    font-weight: 700;
}

.cta p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn-primary,
.cta .btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff !important;
    color: var(--color-primary) !important;
    border: none !important;
    border-radius: 9999px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.cta .btn-primary:hover,
.cta .btn-large:hover {
    background-color: #f8fafc !important;
    color: var(--color-primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
.landing-footer {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
}

/* Note: footer-brand and footer-tagline styles moved to Footer Top section below */

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ==========================================================================
   7. Auth Pages
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.auth-container {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.auth-header {
    margin-bottom: var(--space-xl);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: contain;
}

.auth-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

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

.form-checkbox {
    margin: var(--space-xs) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-text {
    user-select: none;
}

.auth-footer {
    margin-top: var(--space-lg);
    text-align: center;
}

.auth-footer p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.auth-benefits {
    padding: var(--space-xl);
    background-color: var(--color-primary-bg);
    border-radius: var(--radius-lg);
}

.auth-benefits h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.auth-benefits ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-benefits li {
    font-size: 0.9375rem;
    color: var(--color-text);
    padding-left: var(--space-lg);
    position: relative;
}

.auth-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* ==========================================================================
   8. App Layout
   ========================================================================== */

.app-page {
    min-height: 100vh;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
/* ==========================================================================
   Apple-Style Sidebar Container
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg,
        var(--color-bg-card) 0%,
        rgba(var(--color-bg-card-rgb, 255, 255, 255), 0.95) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(128, 128, 128, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 50;
    box-shadow: 1px 0 20px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg,
        rgba(28, 28, 30, 0.98) 0%,
        rgba(28, 28, 30, 0.95) 100%
    );
    border-right-color: rgba(255, 255, 255, 0.06);
    box-shadow: 1px 0 30px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

[data-theme="dark"] .sidebar-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Hide mobile elements on desktop */
.mobile-header,
.mobile-header-v2 {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.sidebar-close {
    display: none;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

/* ==========================================================================
   Apple-Style Sidebar Navigation
   ========================================================================== */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Navigation Sections */
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-text-muted);
    padding: 12px 12px 6px 12px;
    opacity: 0.7;
}

/* Navigation Items - Apple Style */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-item:hover {
    background: linear-gradient(135deg,
        rgba(128, 128, 128, 0.08) 0%,
        rgba(128, 128, 128, 0.04) 100%
    );
    color: var(--color-text);
}

.nav-item:active {
    transform: scale(0.98);
}

/* Active State - Apple Pill Indicator */
.nav-item.active {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.12) 0%,
        rgba(59, 130, 246, 0.08) 100%
    );
    color: var(--color-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 0 3px 3px 0;
}

/* Primary Action (Study) - Accent Style */
.nav-item-primary {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.1) 0%,
        rgba(16, 185, 129, 0.05) 100%
    );
    color: #10b981;
}

.nav-item-primary:hover {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.15) 0%,
        rgba(16, 185, 129, 0.1) 100%
    );
    color: #10b981;
}

.nav-item-primary.active {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.2) 0%,
        rgba(16, 185, 129, 0.12) 100%
    );
    color: #10b981;
}

.nav-item-primary.active::before {
    background: #10b981;
}

/* Navigation Icon */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover .nav-icon {
    opacity: 1;
    transform: scale(1.05);
}

.nav-item.active .nav-icon {
    opacity: 1;
}

/* Navigation Label */
.nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation Badge - Premium Pill */
.nav-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    background: linear-gradient(135deg,
        rgba(128, 128, 128, 0.1) 0%,
        rgba(128, 128, 128, 0.06) 100%
    );
    border-radius: 12px;
    color: var(--color-text-muted);
    min-width: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.nav-item:hover .nav-badge {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(59, 130, 246, 0.1) 100%
    );
    color: var(--color-primary);
}

.nav-item.active .nav-badge {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.2) 0%,
        rgba(59, 130, 246, 0.12) 100%
    );
    color: var(--color-primary);
}

/* Light Theme Adjustments */
[data-theme="light"] .nav-item:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.02) 100%
    );
}

[data-theme="light"] .nav-item.active {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(59, 130, 246, 0.06) 100%
    );
}

[data-theme="light"] .nav-item-primary {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.08) 0%,
        rgba(16, 185, 129, 0.04) 100%
    );
}

[data-theme="light"] .nav-item-primary:hover {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.12) 0%,
        rgba(16, 185, 129, 0.08) 100%
    );
}

[data-theme="light"] .nav-badge {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.06) 0%,
        rgba(0, 0, 0, 0.03) 100%
    );
}

/* Sidebar Stats - REMOVED, keeping class for backwards compatibility */
.sidebar-stats {
    display: none;
}

.streak-display {
    display: none;
}

.streak-icon {
    display: none;
}

.streak-count {
    display: none;
    color: var(--color-warning);
}

.streak-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.freeze-indicator {
    font-size: 1rem;
    cursor: help;
}

/* Old sidebar footer - hidden */
.sidebar-footer {
    display: none;
}

/* New minimalist 3-icon footer */
.sidebar-footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-md);
    margin-top: auto;
}

.footer-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--color-text-muted);
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-icon-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.footer-icon-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-icon-btn:hover svg {
    transform: scale(1.1);
}

.footer-icon-btn.active {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

/* Profile icon - Green on hover */
.footer-icon-btn[href*="profile"]:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.footer-icon-btn[href*="profile"].active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Settings icon - Blue on hover */
.footer-icon-btn[href*="settings"]:hover {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

/* Logout icon - Red on hover */
.footer-icon-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Collapsed sidebar - icons stay visible */
.sidebar.collapsed .sidebar-footer-icons {
    padding: var(--space-md) var(--space-xs);
    gap: var(--space-sm);
    flex-direction: column;
}

.sidebar.collapsed .footer-icon-btn {
    width: 40px;
    height: 40px;
}

.sidebar.collapsed .footer-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl) var(--space-2xl);
    max-width: calc(100% - var(--sidebar-width));
}

.page-header {
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
}

.page-header p {
    color: var(--color-text-secondary);
    margin: 0;
}

/* ==========================================================================
   9. Dashboard
   ========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-2xl);
    row-gap: 28px;
}

.dashboard-welcome {
    grid-column: span 8;
}

.dashboard-streak {
    grid-column: span 4;
}

.dashboard-stats {
    grid-column: span 12;
}

.dashboard-journey {
    grid-column: span 12;
}

.dashboard-progress {
    grid-column: span 6;
}

.dashboard-activity {
    grid-column: span 6;
}

.dashboard-due {
    grid-column: span 12;
}

.dashboard-dev {
    grid-column: span 12;
    order: 99; /* Always last */
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-text-inverse);
    border: none;
}

.welcome-card h2 {
    color: var(--color-text-inverse);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.welcome-card p {
    opacity: 0.9;
    margin-bottom: var(--space-lg);
}

.welcome-card .btn {
    background-color: var(--color-text-inverse);
    color: var(--color-primary);
}

.welcome-card .btn:hover {
    background-color: var(--color-bg);
}

/* Streak Card */
.streak-card {
    text-align: center;
}

.streak-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.streak-big .streak-icon {
    font-size: 3rem;
}

.streak-big .streak-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-warning);
    line-height: 1;
}

.streak-big .streak-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.streak-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.streak-meta-item {
    text-align: center;
}

.streak-meta-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.streak-meta-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Streak Metrics - Clean Professional Grid */
.streak-metrics {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.streak-metric-item {
    position: relative;
    flex: 1;
    min-width: 0; /* Prevent flex item overflow */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: help;
    transition: all var(--transition);
    overflow: hidden; /* Contain content within bounds */
}

.streak-metric-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.streak-metric-icon {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
    line-height: 1;
}

.streak-metric-data {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.streak-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.streak-metric-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
}

/* Tooltip for Streak Metrics */
.streak-metric-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 180px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

.streak-metric-item::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.streak-metric-item:hover::before,
.streak-metric-item:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Streak Motivation Message */
.streak-motivation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: 10px 16px;
    background: var(--color-warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: #92400e;
    font-weight: 500;
}

[data-theme="dark"] .streak-motivation {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.streak-motivation-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.streak-motivation-text {
    line-height: 1.4;
}

/* Freeze Melt - Apple Style */
.freeze-melt {
    margin-top: var(--space-lg);
    transition: opacity var(--transition);
}

.melt-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    padding: 14px 40px 14px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: var(--radius-lg);
    color: #92400e;
    cursor: pointer;
    transition: all var(--transition);
}

.melt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

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

.melt-btn.melted {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #065f46;
}

.melt-sparks {
    font-size: 1rem;
    letter-spacing: -2px;
}

.melt-text {
    font-size: 0.9375rem;
    font-weight: 700;
}

.melt-sub {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
}

.melt-arrow {
    font-size: 1.25rem;
    opacity: 0.6;
    position: absolute;
    right: 16px;
}

.melt-waiting {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 16px;
    background: var(--color-bg-hover);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

.melt-dots {
    display: flex;
    gap: 4px;
}

.melt-dot {
    font-size: 1rem;
    opacity: 0.3;
    transition: all var(--transition);
}

.melt-dot.lit {
    opacity: 1;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.melt-hint {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.melt-loading,
.melt-error {
    font-size: 1rem;
}

.melt-success-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    border-radius: var(--radius-lg);
}

.melt-done {
    font-weight: 600;
    color: #065f46;
}

.melt-undo {
    padding: 6px 12px;
    background: white;
    border: 1px solid #10b981;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    color: #065f46;
    cursor: pointer;
    transition: all var(--transition);
}

.melt-undo:hover {
    background: #f0fdf4;
}

[data-theme="dark"] .melt-success-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .melt-done {
    color: #34d399;
}

[data-theme="dark"] .melt-undo {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

[data-theme="dark"] .melt-undo:hover {
    background: rgba(255, 255, 255, 0.15);
}

.melt-complete {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--color-success-bg);
    border: 1px solid var(--color-success);
    border-radius: var(--radius-lg);
    color: var(--color-success);
    font-weight: 500;
}

[data-theme="dark"] .melt-complete {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Streak broken box - when freeze can't help */
.melt-broken-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    border-radius: var(--radius-lg);
}

.melt-broken {
    font-weight: 600;
    color: #991b1b;
    font-size: 0.875rem;
}

[data-theme="dark"] .melt-broken-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .melt-broken {
    color: #f87171;
}

/* Melt status info */
.melt-status {
    margin-bottom: 10px;
    text-align: center;
}

.melt-rule {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.melt-info {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.melt-warning {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #d97706;
}

[data-theme="dark"] .melt-warning {
    color: #fbbf24;
}

/* Small undo button */
.melt-undo-small {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.melt-undo-small:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text-secondary);
}

[data-theme="dark"] .melt-btn {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.25) 100%);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

[data-theme="dark"] .melt-btn.melted {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.25) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

[data-theme="dark"] .melt-waiting {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Streak Metrics - Tablet & Mobile (vertical stack) */
@media (max-width: 1100px) {
    .streak-metrics {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .streak-metric-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: var(--space-sm) var(--space-md);
    }

    .streak-metric-icon {
        margin-bottom: 0;
        margin-right: var(--space-sm);
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .streak-metric-data {
        align-items: flex-start;
        flex: 1;
        min-width: 0;
    }

    .streak-metric-value {
        font-size: 1.1rem;
    }

    .streak-metric-label {
        font-size: 0.6rem;
        white-space: nowrap;
    }

    .streak-metric-item::before,
    .streak-metric-item::after {
        display: none; /* Hide tooltips on tablet/mobile */
    }
}

/* ==========================================================================
   Freeze Power-Up System (Apple Style - Simple)
   ========================================================================== */

/* Power-Up Button on Freeze Card */
.freeze-metric.has-freeze {
    position: relative;
}

.freeze-powerup-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.freeze-powerup-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.5);
}

/* Simple Toast Notification */
.powerup-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.powerup-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.powerup-toast-icon {
    font-size: 1.25rem;
}

/* Double XP Active Indicator */
.double-xp-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 100;
    animation: xpPulse 2s ease-in-out infinite;
}

@keyframes xpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Stats Grid */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.stat-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

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

.stat-card-icon {
    font-size: 1.5rem;
}

.stat-card-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.stat-card-progress {
    margin-top: var(--space-md);
}

.stat-card-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* =====================================================
   PROGRESS CARD - Premium Phase Progress
   ===================================================== */

.progress-section {
    position: relative;
    margin-bottom: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.progress-section:last-child {
    margin-bottom: 0;
}

.progress-section:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.07) 100%
    );
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

[data-theme="light"] .progress-section {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.01) 0%,
        rgba(0, 0, 0, 0.03) 100%
    );
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .progress-section:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    border-color: rgba(0, 0, 0, 0.1);
}

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

.progress-section-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    letter-spacing: 0.01em;
}

.progress-section-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

/* Activity Graph */
.activity-graph {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.activity-day {
    aspect-ratio: 1;
    background-color: var(--color-bg-hover);
    border-radius: 2px;
}

.activity-day.level-1 { background-color: #c6e48b; }
.activity-day.level-2 { background-color: #7bc96f; }
.activity-day.level-3 { background-color: #239a3b; }
.activity-day.level-4 { background-color: #196127; }

[data-theme="dark"] .activity-day.level-1 { background-color: #0e4429; }
[data-theme="dark"] .activity-day.level-2 { background-color: #006d32; }
[data-theme="dark"] .activity-day.level-3 { background-color: #26a641; }
[data-theme="dark"] .activity-day.level-4 { background-color: #39d353; }

/* =====================================================
   DUE CARDS - Premium Study Cards
   ===================================================== */

.due-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.due-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.due-item:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.09) 100%
    );
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .due-item {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.04) 100%
    );
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .due-item:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.03) 0%,
        rgba(0, 0, 0, 0.06) 100%
    );
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.due-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.due-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 12px;
    font-size: 1.25rem;
}

.due-item-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 2px;
}

.due-item-type {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.due-item-count {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-primary);
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
}

.due-item .btn-primary {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.8125rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.due-item .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   10. Study & Flashcards
   ========================================================================== */

.main-content.study-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--space-3xl);
    /* iOS Safari toolbar fix - create scroll space */
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 80px;
}

/* ===== STUDY HEADER - Apple Style ===== */
.study-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    width: 100%;
    max-width: 540px;
    padding: 0 var(--space-md);
    padding-top: var(--space-lg);
}

.study-header h1 {
    font-size: 1.625rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    opacity: 0.95;
}

/* iOS-style Segmented Control */
.study-type-selector {
    display: inline-flex;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin-bottom: var(--space-lg);
}

.study-type-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.study-type-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
}

.study-type-btn.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Flashcard */
.flashcard-container {
    -webkit-perspective: 1000px;
    perspective: 1000px;
    width: 100%;
    max-width: 500px;
}

.flashcard {
    position: relative;
    width: 100%;
    min-height: 400px;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.flashcard.flipped {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
}

.flashcard-back {
    transform: rotateY(180deg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-type-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    padding: 6px 12px;
    background-color: rgba(99, 102, 241, 0.12);
    border-radius: 8px;
}

.card-category {
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.card-word {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.card-pronunciation {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.card-pattern {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.card-pattern-sk {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.card-translation {
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.card-example {
    background-color: var(--color-bg);
    padding: var(--space-md);
    border-radius: var(--radius);
    margin-top: var(--space-md);
}

.example-en {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.example-sk {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.card-note {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: var(--space-md);
}

.tense-structure {
    text-align: left;
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.tense-structure p {
    margin-bottom: var(--space-xs);
}

.time-signals {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: left;
}

.card-action {
    margin-top: auto;
    padding-top: var(--space-lg);
}

.btn-flip {
    width: 100%;
}

/* Rating Buttons */
.card-rating {
    margin-top: auto;
    padding-top: var(--space-lg);
}

.rating-prompt {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.rating-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

.btn-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm);
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn-again {
    background-color: var(--color-error-bg);
    color: var(--color-error);
}

.btn-again:hover {
    border-color: var(--color-error);
}

.btn-hard {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.btn-hard:hover {
    border-color: var(--color-warning);
}

.btn-good {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.btn-good:hover {
    border-color: var(--color-success);
}

.btn-easy {
    background-color: var(--color-info-bg);
    color: var(--color-info);
}

.btn-easy:hover {
    border-color: var(--color-info);
}

.rating-label {
    font-size: 0.8125rem;
}

.rating-interval {
    font-size: 0.6875rem;
    opacity: 0.8;
}

/* Rating Help Tooltip - Apple Style */
.rating-prompt-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.rating-prompt-row .rating-prompt {
    margin-bottom: 0;
}

.rating-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #2a3142;
    border: 1px solid #353e52;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
    padding: 0;
}

.rating-help-btn:hover {
    background-color: #353e52;
    border-color: #424d63;
    color: rgba(255, 255, 255, 0.85);
    transform: scale(1.08);
}

.rating-help-btn:active {
    transform: scale(0.95);
}

.rating-help-btn svg {
    width: 18px;
    height: 18px;
}

.rating-help-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 380px;
    max-width: calc(100vw - 24px);
    isolation: isolate;
}

.rating-help-tooltip.visible {
    display: block;
    animation: tooltipFadeIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.rating-help-content {
    background-color: #1e2433;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: visible;
    backdrop-filter: none;
    position: relative;
}

/* Arrow pointing down */
.rating-help-content::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1e2433;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.rating-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #222836;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px 16px 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
}

.rating-help-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background-color: #2a3142;
    cursor: pointer;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.rating-help-close:hover {
    background-color: #353e52;
    color: rgba(255, 255, 255, 0.9);
}

.rating-help-items {
    padding: 16px 18px;
    background-color: #1e2433;
}

.rating-help-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: #232938;
    transition: background-color 0.15s ease;
}

.rating-help-item:hover {
    background-color: #2a3142;
}

.rating-help-item:last-child {
    margin-bottom: 0;
}

.rating-help-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rating-help-wrong .rating-help-icon {
    background-color: #3d2020;
    color: #f87171;
}

.rating-help-learning .rating-help-icon {
    background-color: #2d2a1a;
    color: #fbbf24;
}

.rating-help-correct .rating-help-icon {
    background-color: #1a3323;
    color: #4ade80;
}

.rating-help-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1rem;
}

.rating-help-text strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.rating-help-text span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.rating-help-mastery {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0 14px 12px 14px;
    background-color: #1a2535;
    border: 1px solid rgba(99, 179, 237, 0.2);
    border-radius: 10px;
}

.rating-help-mastery .mastery-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rating-help-mastery .mastery-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rating-help-mastery .mastery-text strong {
    color: #63b3ed;
    font-size: 0.8125rem;
    font-weight: 600;
}

.rating-help-mastery .mastery-text span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Visual Timeline Progress */
.rating-help-progress {
    padding: 18px 20px;
    background-color: #1a1f2e;
}

.rating-help-progress .progress-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.progress-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 60px;
}

.step-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-dot.dot-new {
    background-color: #6b7280;
}

.step-dot.dot-learning {
    background-color: #f59e0b;
}

.step-dot.dot-review {
    background-color: #3b82f6;
}

.step-dot.dot-mastered {
    background-color: #10b981;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.step-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.timeline-arrow {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.4));
    position: relative;
    margin: 0 4px;
    margin-bottom: 28px;
}

.timeline-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    border: 4px solid transparent;
    border-left-color: rgba(255, 255, 255, 0.4);
}

.rating-help-footer {
    padding: 14px 20px;
    background-color: #171c28;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 16px 16px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.rating-help-footer .footer-wrong {
    color: #f87171;
    font-weight: 600;
}

.rating-help-footer .footer-easy {
    color: #4ade80;
    font-weight: 600;
}

/* Make card-rating position relative for tooltip positioning */
.card-rating {
    position: relative;
}

/* Study Progress - inside card */
.study-progress {
    width: 100%;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

#study-area {
    width: 100%;
    max-width: 540px;
    padding: 0 var(--space-md);
}

#flashcard-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.flashcard-container {
    width: 100% !important;
    max-width: 500px;
}

.progress-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.progress-separator {
    color: var(--color-border);
}

/* Empty State - Premium Design */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .empty-state {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.01) 0%,
        rgba(0, 0, 0, 0.02) 100%
    );
    border-color: rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-md);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.empty-state p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* ==========================================================================
   11. Lists & Tables
   ========================================================================== */

/* Vocabulary/Construction List */
.content-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.content-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.content-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.content-item-main {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.content-item-word {
    font-weight: 600;
    font-size: 1.0625rem;
    min-width: 150px;
}

.content-item-translation {
    color: var(--color-text-secondary);
}

.content-item-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.content-item-phase {
    font-size: 0.75rem;
    padding: 2px 8px;
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
}

.content-item-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
}

.status-indicator.new { background-color: var(--color-info); }
.status-indicator.learning { background-color: var(--color-warning); }
.status-indicator.review { background-color: var(--color-primary); }
.status-indicator.mastered { background-color: var(--color-success); }

/* Vocabulary Extended - with audio buttons */
.vocabulary-item-extended {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
}

.vocabulary-item-extended .content-item-main {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
}

.vocabulary-word-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.vocabulary-word-row .content-item-word {
    min-width: auto;
}

.content-item-pronunciation {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

.audio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: var(--color-primary-bg);
    color: var(--color-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.audio-btn:hover {
    background-color: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.audio-btn:active {
    transform: scale(0.95);
}

.audio-btn.playing {
    background-color: var(--color-primary);
    color: white;
    animation: pulse-audio 1s infinite;
}

@keyframes pulse-audio {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.audio-btn-sentence {
    width: 28px;
    height: 28px;
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.audio-btn-sentence:hover {
    background-color: var(--color-success);
    color: white;
}

.audio-btn-sentence.playing {
    background-color: var(--color-success);
    color: white;
}

.content-item-example {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
}

.example-text {
    font-style: italic;
    color: var(--color-text);
}

.example-translation {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-left: auto;
}

.vocabulary-item-extended .content-item-meta {
    margin-top: var(--space-xs);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border-light);
}

/* Construction Extended - with audio buttons */
.construction-item-extended {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
}

.construction-item-extended .content-item-main {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
}

.construction-pattern-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.construction-pattern-row .content-item-word {
    min-width: auto;
    font-size: 1.125rem;
}

.example-label,
.usage-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.construction-usage-note {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-info-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-info);
}

.usage-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.construction-item-extended .content-item-example {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
}

.construction-item-extended .example-translation {
    margin-left: 0;
}

.construction-item-extended .content-item-meta {
    margin-top: var(--space-xs);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border-light);
}

/* Clickable Construction Cards */
.construction-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.construction-clickable[data-has-audio="true"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
}

.construction-clickable[data-has-audio="true"]:active {
    transform: translateY(0);
}

.construction-clickable.playing {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.construction-clickable.played {
    animation: cardPulse 0.3s ease;
}

@keyframes cardPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* Audio Indicator Icon */
.audio-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #4f46e5));
    color: white;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.construction-clickable[data-has-audio="true"]:hover .audio-indicator {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.audio-indicator.playing {
    animation: audioIndicatorPulse 0.8s ease-in-out infinite;
}

@keyframes audioIndicatorPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .construction-clickable[data-has-audio="true"]:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .construction-clickable.playing {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.filter-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.filter-select {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 0.875rem;
}

.filter-search {
    flex: 1;
    max-width: 300px;
}

.filter-search input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* ==========================================================================
   SMART FILTER SYSTEM - Premium Design
   ========================================================================== */

/* Smart Search Bar */
.smart-search-bar {
    margin-bottom: var(--space-lg);
}

.smart-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.smart-search-icon {
    position: absolute;
    left: 18px;
    font-size: 1.1rem;
    pointer-events: none;
}

.smart-search-input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-bg-card);
    color: var(--color-text);
    transition: all 0.3s ease;
}

.smart-search-input:hover {
    border-color: var(--color-primary);
}

.smart-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.smart-search-input::placeholder {
    color: var(--color-text-muted);
}

.smart-search-clear {
    position: absolute;
    right: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-hover);
    border-radius: 50%;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    transition: all 0.2s ease;
}

.smart-search-clear:hover {
    background: var(--color-primary);
    color: white;
}

/* Filter Pills Section */
.filter-pills-section {
    margin-bottom: var(--space-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-pills-section::-webkit-scrollbar {
    display: none;
}

.filter-pills-row {
    display: flex;
    gap: 10px;
    padding: 4px 0;
}

.filter-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.filter-pill:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-pill.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.pill-icon {
    font-size: 1rem;
}

.pill-label {
    font-size: 0.9rem;
}

.pill-count {
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Color variants for pills */
.pill-new.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: transparent;
}

.pill-learning.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: transparent;
}

.pill-review.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
}

.pill-mastered.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
}

/* Filter Chips Section */
.filter-chips-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: 14px 18px;
    background: var(--color-bg-card);
    border-radius: 14px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .filter-chips-section {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
}

.chips-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .smart-search-input {
        padding: 14px 45px 14px 45px;
        font-size: 0.95rem;
    }

    .smart-search-icon {
        left: 14px;
        font-size: 1rem;
    }

    .filter-pills-row {
        padding-bottom: 8px;
    }

    .filter-pill {
        padding: 10px 14px;
    }

    .pill-label {
        font-size: 0.85rem;
    }

    .filter-chips-section {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .filter-chips {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}

/* ==========================================================================
   PREMIUM CONTENT PAGE HERO
   ========================================================================== */

/* Content Page Hero */
.content-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg) 100%);
    border-radius: 20px;
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] .content-page-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.06);
}

.content-page-hero-text h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--color-text);
}

.content-page-hero-text p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.btn-hero-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.btn-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Filter Card V2 */
.filter-card-v2 {
    background: var(--color-bg-card);
    border-radius: 16px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

[data-theme="dark"] .filter-card-v2 {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
}

.filter-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--color-bg);
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] .filter-card-header {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.06);
}

.filter-card-icon {
    font-size: 1.1rem;
}

.filter-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-card-body {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
    padding: 20px;
    flex-wrap: wrap;
}

.filter-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-label-v2 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select-v2 {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select-v2:hover {
    border-color: var(--color-primary);
}

.filter-select-v2:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-search-v2 {
    flex: 1;
    min-width: 200px;
}

.filter-input-v2 {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-input-v2:hover {
    border-color: var(--color-primary);
}

.filter-input-v2:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-input-v2::placeholder {
    color: var(--color-text-muted);
}

/* Active Filter Tags */
.filter-active-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(99, 102, 241, 0.05);
    border-top: 1px solid rgba(128, 128, 128, 0.1);
    flex-wrap: wrap;
}

[data-theme="dark"] .filter-active-tags {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(255, 255, 255, 0.06);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-tag a {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    font-weight: 700;
    margin-left: 4px;
}

.filter-tag a:hover {
    opacity: 1;
}

.filter-clear-all {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-left: auto;
}

.filter-clear-all:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .content-page-hero {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
        gap: var(--space-md);
    }

    .content-page-hero-text h1 {
        font-size: 1.5rem;
    }

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

    .filter-card-body {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group-v2 {
        min-width: 100%;
    }

    .filter-search-v2 {
        min-width: 100%;
    }

    .filter-active-tags {
        flex-wrap: wrap;
    }

    .filter-clear-all {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   12. Forms
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 24px;
    background-color: var(--color-bg-active);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--color-bg-card);
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.9375rem;
    color: var(--color-text);
}

/* ==========================================================================
   13. Utilities
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.w-full { width: 100%; }

/* ==========================================================================
   Desktop Header - Premium Design (matches mobile)
   ========================================================================== */

/* ==========================================================================
   Apple-Style Desktop Header
   ========================================================================== */
.desktop-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.9) 100%
    );
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 90;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.dh-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 var(--space-2xl);
}

/* Desktop Actions - Always align right */
.dh-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Desktop Logo - Clean Image Style */
.dh-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dh-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
}

/* Theme Toggle Button */
.dh-theme-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dh-theme-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    transform: scale(1.05);
}

.dh-theme-btn:active {
    transform: scale(0.9);
}

.dh-theme-sun,
.dh-theme-moon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dh-theme-sun {
    color: #f59e0b;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.dh-theme-moon {
    color: #6366f1;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .dh-theme-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .dh-theme-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #fbbf24;
}

/* Study Button - Green with Pulse */
.dh-study-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    color: white !important;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dh-study-btn svg {
    margin-left: 2px;
    fill: white !important;
}

.dh-study-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
    color: white !important;
}

.dh-study-btn:hover svg {
    fill: white !important;
}

.dh-study-btn:active {
    transform: scale(0.95);
}

.dh-study-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.6);
    animation: dhPulse 2s ease-out infinite;
}

@keyframes dhPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Streak Badge - Premium Design */
.dh-streak {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 8px 10px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.dh-streak-fire {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.8));
    animation: fireGlow 1.5s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    0% {
        filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.6));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 6px rgba(251, 146, 60, 1));
        transform: scale(1.05);
    }
}

.dh-streak-num {
    min-width: 16px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
    letter-spacing: 0.5px;
}

/* Desktop Header Dark Mode - Apple Style */
[data-theme="dark"] .desktop-header {
    background: linear-gradient(180deg,
        rgba(28, 28, 30, 0.98) 0%,
        rgba(28, 28, 30, 0.95) 100%
    );
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .dh-logo-icon {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .dh-logo-text {
    background: linear-gradient(135deg, #818cf8 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .dh-theme-btn:hover {
    background: rgba(251, 191, 36, 0.2);
}

[data-theme="dark"] .dh-study-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5);
}

[data-theme="dark"] .dh-streak {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
    border-color: rgba(129, 140, 248, 0.3);
}

/* ============================================
   Desktop Sidebar Toggle - Apple Style
   ============================================ */

/* Left section with toggle and logo */
.dh-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Sidebar Toggle Button - Apple-inspired */
.dh-sidebar-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-text-secondary);
}

.dh-sidebar-toggle:hover {
    background: var(--color-bg-hover);
    color: var(--color-primary);
    transform: scale(1.05);
}

.dh-sidebar-toggle:active {
    transform: scale(0.95);
}

.dh-toggle-icon {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Rotate icon when sidebar is collapsed */
.sidebar-collapsed .dh-toggle-icon {
    transform: rotate(180deg);
}

/* Sidebar Collapse Transition */
.sidebar {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

/* Desktop Header Transition */
.desktop-header {
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Content Transition */
.main-content {
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Collapsed Sidebar State
   ============================================ */

/* When sidebar is collapsed on desktop */
@media (min-width: 769px) {
    .sidebar-collapsed .sidebar {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-collapsed .desktop-header {
        left: 0;
    }

    .sidebar-collapsed .main-content {
        margin-left: 0;
    }

    /* Floating expand button when sidebar is hidden */
    .sidebar-expand-hint {
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 80px;
        background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.1) 0%,
            rgba(99, 102, 241, 0.05) 100%);
        border: none;
        border-radius: 0 12px 12px 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 100;
    }

    .sidebar-collapsed .sidebar-expand-hint {
        opacity: 1;
        visibility: visible;
    }

    .sidebar-expand-hint:hover {
        width: 32px;
        background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.2) 0%,
            rgba(99, 102, 241, 0.1) 100%);
    }

    .sidebar-expand-hint svg {
        width: 16px;
        height: 16px;
        color: var(--color-primary);
        transition: transform 0.3s ease;
    }

    .sidebar-expand-hint:hover svg {
        transform: translateX(2px);
    }
}

/* Dark Mode - Sidebar Toggle */
[data-theme="dark"] .dh-sidebar-toggle {
    color: #94a3b8;
}

[data-theme="dark"] .dh-sidebar-toggle:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

[data-theme="dark"] .sidebar-expand-hint {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.15) 0%,
        rgba(99, 102, 241, 0.08) 100%);
}

[data-theme="dark"] .sidebar-expand-hint:hover {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.25) 0%,
        rgba(99, 102, 241, 0.15) 100%);
}

/* Tooltip for toggle button */
.dh-sidebar-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 10px;
    background: var(--color-text);
    color: var(--color-text-inverse);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.dh-sidebar-toggle:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Adjust main content for desktop header */
.main-content {
    padding-top: calc(var(--header-height) + var(--space-lg));
}

/* Sidebar Logo - Clean Image Style */
.sidebar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .method-phases {
        grid-template-columns: 1fr;
    }

    .timeline-track {
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome,
    .dashboard-streak,
    .dashboard-stats,
    .dashboard-journey,
    .dashboard-progress,
    .dashboard-activity,
    .dashboard-due,
    .dashboard-dev {
        grid-column: span 1;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   TABLET (768px - 1024px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Landing Header */
    .landing-header .container {
        padding: 0 var(--space-md);
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        width: 32px;
        height: 32px;
    }

    .landing-nav {
        gap: var(--space-sm);
    }

    .landing-nav a:not(.btn) {
        display: none;
    }

    .landing-nav .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Login button - icon only on mobile */
    .landing-nav .btn-login {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        min-width: 40px;
    }

    .landing-nav .btn-login .btn-text {
        display: none;
    }

    .landing-nav .btn-login svg {
        display: block;
    }

    /* Hero Section */
    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-visual {
        order: -1;
    }

    .flashcard-demo .flashcard {
        width: 300px;
        height: 180px;
    }

    /* Study Type Selector - Mobile */
    .study-type-selector {
        display: inline-flex;
        justify-content: center;
        gap: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 3px;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 10px;
    }

    .study-type-selector::-webkit-scrollbar {
        display: none;
    }

    .study-type-btn {
        padding: 8px 14px;
        font-size: 0.8125rem;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: 8px;
    }

    .study-header {
        padding-top: var(--space-md);
    }

    .study-header h1 {
        font-size: 1.375rem;
        margin-bottom: var(--space-md);
    }

    /* Content List Items - Mobile (Vocabulary, Constructions) */
    .content-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .content-item-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        width: 100%;
    }

    .content-item-word {
        min-width: auto;
        font-size: 1.125rem;
    }

    .content-item-translation {
        font-size: 0.9375rem;
    }

    .content-item-meta {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .content-item-phase {
        font-size: 0.6875rem;
        padding: 0.125rem 0.5rem;
        max-width: 50%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .content-item-status {
        flex-shrink: 0;
    }

    /* Vocabulary Extended - Mobile */
    .vocabulary-item-extended .content-item-example {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .vocabulary-item-extended .example-translation {
        margin-left: 0;
        width: 100%;
        padding-left: 36px;
    }

    .audio-btn {
        width: 36px;
        height: 36px;
    }

    .audio-btn-sentence {
        width: 32px;
        height: 32px;
    }

    /* Construction Extended - Mobile */
    .construction-pattern-row .content-item-word {
        font-size: 1rem;
    }

    .construction-usage-note {
        padding: var(--space-sm);
    }

    /* Stats Cards - Mobile */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem;
    }

    .stat-card-value {
        font-size: 1.25rem;
    }

    .stat-card-label {
        font-size: 0.75rem;
    }

    /* Filter Bar - Mobile */
    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .filter-search {
        width: 100%;
    }

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

    /* Page Header - Mobile */
    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.875rem;
    }

    /* Fix horizontal overflow */
    .main-content {
        overflow-x: hidden;
    }

    /* Profile Page - Mobile */
    .profile-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .profile-user-card,
    .profile-stats-card {
        width: 100% !important;
    }

    .profile-progress-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
    }

    .profile-mini-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Checkpoints - Mobile */
    .checkpoints-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .checkpoint-item {
        width: 100% !important;
        flex: none !important;
    }

    /* Achievements - Mobile */
    .achievements-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .achievement-item {
        padding: 0.75rem !important;
    }

    .achievement-item .achievement-icon {
        font-size: 1.5rem !important;
    }

    /* Name Meaning Section - Tablet */
    .name-meaning {
        padding: var(--space-2xl) 0;
    }

    .name-card {
        margin: 0 var(--space-md);
    }

    .name-card-inner {
        padding: var(--space-xl) var(--space-lg);
    }

    .name-original .letter {
        font-size: 3rem;
    }

    .decoded-text {
        font-size: 1.75rem;
    }

    .transform-arrow svg {
        width: 28px;
        height: 28px;
    }

    .revelation-main .en {
        font-size: 1.5rem;
    }

    .revelation-main .sk {
        font-size: 1.05rem;
    }

    .revelation-sub {
        font-size: 0.95rem;
        padding: 0 var(--space-md);
    }

    .floating-circle {
        opacity: 0.05;
    }

    .circle-1 {
        width: 250px;
        height: 250px;
        top: -80px;
        left: -80px;
    }

    .circle-2 {
        width: 180px;
        height: 180px;
    }

    .circle-3 {
        display: none;
    }

    /* Stats Section */
    .stats {
        padding: var(--space-2xl) 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* Features Section */
    .features {
        padding: var(--space-2xl) 0;
    }

    .features h2 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

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

    /* Method Section */
    .method {
        padding: var(--space-2xl) 0;
    }

    .method h2 {
        font-size: 1.75rem;
    }

    .method-phases {
        flex-direction: column;
        gap: var(--space-lg);
    }

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

    .learning-phases h3 {
        font-size: 1.25rem;
    }

    .learning-phase {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-sm);
    }

    /* Timeline Section */
    .timeline {
        padding: var(--space-2xl) 0;
    }

    .timeline h2 {
        font-size: 1.75rem;
    }

    .timeline-track {
        flex-direction: column;
    }

    .checkpoint {
        flex-direction: row;
        text-align: left;
    }

    .checkpoint-marker {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .checkpoint-content h3 {
        font-size: 1.1rem;
    }

    /* CTA Section */
    .cta {
        padding: var(--space-2xl) var(--space-md);
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    /* Footer */
    .landing-footer {
        padding: var(--space-xl) var(--space-md);
    }

    /* Auth Pages */
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-benefits {
        display: none;
    }

    /* App Layout */
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
        z-index: 110;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        z-index: 105;
    }

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        min-width: 32px;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        border-radius: 50%;
        font-size: 1rem;
        cursor: pointer;
        color: var(--color-text);
        transition: background-color 0.2s ease;
        margin-left: auto;
    }

    .sidebar-close:hover {
        background: rgba(0, 0, 0, 0.2);
        color: var(--color-text);
    }

    .sidebar-close:active {
        background: rgba(0, 0, 0, 0.3);
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-md);
    }

    /* Mobile Sidebar - Apple Style */
    .sidebar-nav {
        flex: 1;
        overflow-y: auto;
        padding: 8px 10px;
    }

    .nav-section {
        margin-bottom: 6px;
    }

    .nav-section-title {
        font-size: 0.65rem;
        padding: 10px 10px 4px 10px;
    }

    .nav-item {
        padding: 8px 10px;
        font-size: 0.85rem;
        gap: 10px;
    }

    .nav-icon {
        width: 22px;
        height: 22px;
    }

    .nav-icon svg {
        width: 18px;
        height: 18px;
    }

    .nav-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* Mobile Footer Icons */
    .sidebar-footer-icons {
        padding: var(--space-md);
        gap: var(--space-md);
        border-top: none;
    }

    .footer-icon-btn {
        width: 44px;
        height: 44px;
    }

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

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 90;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .sidebar-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .app-layout {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: var(--space-md);
        order: 2;
    }

    /* Old mobile header - hidden */
    .mobile-header {
        display: none !important;
    }

    /* Hide desktop header on mobile */
    .desktop-header {
        display: none !important;
    }

    /* ============================================
       Mobile Header V2 - Apple Style
       ============================================ */
    .mobile-header-v2 {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        height: 52px;
        background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.92) 100%
        );
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    }

    .mh-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 100%;
        padding: 0 12px;
        position: relative;
    }

    /* ========== LEFT SIDE ========== */
    .mh-left {
        display: flex;
        align-items: center;
        gap: 4px;
        z-index: 2;
    }

    /* Hamburger Menu Button */
    .mh-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        border-radius: var(--radius);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mh-menu-btn:hover {
        background: rgba(99, 102, 241, 0.1);
    }

    .mh-menu-btn:active {
        transform: scale(0.95);
    }

    .mh-menu-line {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--color-text);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .mh-menu-line:nth-child(2) {
        width: 16px;
    }

    .mh-menu-btn:hover .mh-menu-line {
        background: var(--color-primary);
    }

    .mh-menu-btn:hover .mh-menu-line:nth-child(2) {
        width: 20px;
    }

    /* Hamburger Animation */
    body.sidebar-open .mh-menu-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    body.sidebar-open .mh-menu-line:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    body.sidebar-open .mh-menu-line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Theme Toggle Button */
    .mh-theme-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        position: relative;
        transition: all 0.3s ease;
    }

    .mh-theme-btn:hover {
        background: rgba(251, 191, 36, 0.15);
    }

    .mh-theme-btn:active {
        transform: scale(0.9);
    }

    .mh-theme-sun,
    .mh-theme-moon {
        position: absolute;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .mh-theme-sun {
        color: #f59e0b;
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }

    .mh-theme-moon {
        color: #6366f1;
        opacity: 0;
        transform: rotate(-90deg) scale(0.5);
    }

    [data-theme="dark"] .mh-theme-sun {
        opacity: 0;
        transform: rotate(90deg) scale(0.5);
    }

    [data-theme="dark"] .mh-theme-moon {
        opacity: 1;
        transform: rotate(0deg) scale(1);
        color: #fbbf24;
    }

    /* ========== CENTER LOGO ========== */
    .mh-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .mh-logo-img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        object-fit: contain;
    }

    /* ========== RIGHT SIDE ========== */
    .mh-right {
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 2;
    }

    /* Study Button with Pulse */
    .mh-study-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white !important;
        border-radius: 50%;
        text-decoration: none;
        box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mh-study-btn svg {
        margin-left: 2px;
        fill: white !important;
    }

    .mh-study-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
        color: white !important;
    }

    .mh-study-btn:hover svg {
        fill: white !important;
    }

    .mh-study-btn:active {
        transform: scale(0.95);
    }

    .mh-study-pulse {
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        border: 2px solid rgba(16, 185, 129, 0.6);
        animation: mhPulse 2s ease-out infinite;
    }

    @keyframes mhPulse {
        0% { transform: scale(1); opacity: 1; }
        100% { transform: scale(1.5); opacity: 0; }
    }

    /* Streak Badge - Premium Design */
    .mh-streak {
        display: flex;
        align-items: center;
        gap: 4px;
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
        padding: 5px 10px 5px 8px;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
        border: 1px solid rgba(129, 140, 248, 0.2);
    }

    .mh-streak-fire {
        font-size: 14px;
        line-height: 1;
        filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.7));
    }

    .mh-streak-num {
        font-size: 13px;
        font-weight: 800;
        color: #fbbf24;
        text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
    }

    /* Bottom Glow Effect */
    .mh-glow {
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg,
            transparent 0%,
            rgba(99, 102, 241, 0.5) 50%,
            transparent 100%
        );
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-header-v2:hover .mh-glow {
        opacity: 1;
    }

    /* ========== DARK MODE - Apple Style ========== */
    [data-theme="dark"] .mobile-header-v2 {
        background: linear-gradient(180deg,
            rgba(28, 28, 30, 0.98) 0%,
            rgba(28, 28, 30, 0.95) 100%
        );
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    }

    [data-theme="dark"] .mh-menu-line {
        background: #e2e8f0;
    }

    [data-theme="dark"] .mh-menu-btn:hover {
        background: rgba(99, 102, 241, 0.2);
    }

    [data-theme="dark"] .mh-menu-btn:hover .mh-menu-line {
        background: #818cf8;
    }

    [data-theme="dark"] .mh-theme-btn:hover {
        background: rgba(251, 191, 36, 0.2);
    }

    [data-theme="dark"] .mh-logo-icon {
        background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
        box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
    }

    [data-theme="dark"] .mh-logo-text {
        background: linear-gradient(135deg, #818cf8 0%, #a5b4fc 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }

    [data-theme="dark"] .mh-study-btn {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5);
    }

    [data-theme="dark"] .mh-streak {
        background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
        box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
        border-color: rgba(129, 140, 248, 0.3);
    }

    [data-theme="dark"] .mh-glow {
        background: linear-gradient(90deg,
            transparent 0%,
            rgba(129, 140, 248, 0.6) 50%,
            transparent 100%
        );
    }

    /* Adjust main content for fixed header */
    .main-content {
        padding-top: calc(52px + var(--space-md)) !important;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .rating-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-wrap: wrap;
    }

    .filter-search {
        max-width: 100%;
        width: 100%;
    }
}

/* ==========================================================================
   MOBILE (max 480px)
   ========================================================================== */
@media (max-width: 480px) {
    /* General */
    .container {
        padding: 0 var(--space-md);
    }

    /* Hero */
    .hero {
        padding: var(--space-xl) 0;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-content h1 .highlight {
        display: block;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-large {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
        width: 100%;
    }

    .flashcard-demo .flashcard {
        width: 260px;
        height: 160px;
    }

    .flashcard-demo .card-pattern {
        font-size: 1rem;
    }

    .flashcard-demo .card-example {
        font-size: 0.875rem;
    }

    /* Name Meaning Section - Mobile */
    .name-meaning {
        padding: var(--space-xl) 0;
    }

    .name-reveal {
        gap: var(--space-xl);
    }

    .name-card {
        margin: 0 var(--space-sm);
        border-radius: var(--radius-lg);
    }

    .name-card-inner {
        padding: var(--space-lg) var(--space-md);
        border-radius: calc(var(--radius-lg) - 3px);
        gap: var(--space-md);
    }

    .say-it {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
    }

    .name-transform {
        gap: var(--space-sm);
    }

    .name-original .letter {
        font-size: 2.25rem;
    }

    .transform-arrow svg {
        width: 24px;
        height: 24px;
    }

    .decoded-text {
        font-size: 1.4rem;
    }

    .revelation-box {
        padding: 0 var(--space-sm);
    }

    .revelation-content {
        gap: var(--space-md);
    }

    .revelation-main .en {
        font-size: 1.25rem;
    }

    .revelation-main .sk {
        font-size: 0.95rem;
    }

    .revelation-divider {
        width: 40px;
    }

    .revelation-sub {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .circle-1 {
        width: 180px;
        height: 180px;
        top: -60px;
        left: -60px;
    }

    .circle-2 {
        width: 120px;
        height: 120px;
        bottom: -40px;
        right: -40px;
    }

    /* Stats Section - Mobile */
    .stats {
        padding: var(--space-xl) 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }

    .stat-desc {
        font-size: 0.75rem;
    }

    /* Features - Mobile */
    .features {
        padding: var(--space-xl) 0;
    }

    .features h2 {
        font-size: 1.5rem;
        margin-bottom: var(--space-lg);
    }

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

    .feature-icon {
        font-size: 2rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    /* Method - Mobile */
    .method {
        padding: var(--space-xl) 0;
    }

    .method h2 {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

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

    .phase-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .phase-card h3 {
        font-size: 1.1rem;
    }

    .learning-phases {
        margin-top: var(--space-xl);
    }

    .learning-phases h3 {
        font-size: 1.1rem;
    }

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

    .phase-label {
        font-size: 0.7rem;
    }

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

    .phase-count {
        font-size: 0.8rem;
    }

    /* Timeline - Mobile */
    .timeline {
        padding: var(--space-xl) 0;
    }

    .timeline h2 {
        font-size: 1.5rem;
    }

    .checkpoint-marker {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .checkpoint-content {
        padding: var(--space-sm);
    }

    .checkpoint-content h3 {
        font-size: 1rem;
    }

    .checkpoint-content ul {
        font-size: 0.875rem;
    }

    /* CTA - Mobile */
    .cta {
        padding: var(--space-xl) var(--space-md);
    }

    .cta h2 {
        font-size: 1.5rem;
    }

    .cta p {
        font-size: 0.95rem;
    }

    /* Flashcard in app - KEEP 3D transform working! */
    .flashcard-container {
        max-width: 100%;
        margin: 0 auto;
    }

    .flashcard {
        min-height: 350px;
    }

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

    .card-word {
        font-size: 1.5rem;
    }

    .card-pattern {
        font-size: 1.25rem;
    }

    /* Rating buttons mobile */
    .rating-buttons {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .btn-rating {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
        min-width: 70px;
    }
}

/* ==========================================================================
   15. Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-up {
    animation: slideInUp var(--transition-slow) ease-out;
}

.animate-slide-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Card flip animation improvement */
.flashcard {
    transform-origin: center center;
}

.flashcard.correct {
    animation: pulse 0.3s ease-out;
}

.flashcard.incorrect {
    animation: shake 0.3s ease-out;
}

/* Streak fire animation */
.streak-icon {
    transition: transform var(--transition-fast);
}

.streak-display:hover .streak-icon {
    transform: scale(1.2);
}

/* Achievement unlock animation */
@keyframes achievementUnlock {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.achievement-unlocked {
    animation: achievementUnlock 0.6s ease-out;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

.toast {
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideInRight var(--transition) ease-out;
}

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

.toast-error {
    border-left: 4px solid var(--color-error);
}

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

/* ============================================
   PROFILE PAGE COMPONENTS
   ============================================ */

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.profile-progress-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.profile-mini-stats {
    grid-template-columns: repeat(4, 1fr);
}

.checkpoints-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.checkpoint-item {
    flex: none;
    width: 280px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.achievement-item {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition-fast);
}

.achievement-item.unlocked {
    background: var(--color-success-bg);
    opacity: 1;
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-item:hover {
    transform: translateY(-2px);
}

/* ============================================
   TVOJA CESTA - Complete Journey Card
   ============================================ */

.journey-card {
    margin-bottom: var(--space-xl);
}

.journey-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.journey-card .card-header h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Journey Sections */
.journey-section {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-border);
}

.journey-section:first-child {
    padding-top: 0;
}

.journey-section:last-child,
.journey-section-footer {
    border-bottom: none;
    padding-bottom: 0;
}

.journey-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* Progress Bars */
.journey-progress-item {
    margin-bottom: var(--space-md);
}

.journey-progress-item:last-child {
    margin-bottom: 0;
}

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

.journey-progress-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

.journey-progress-count {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

/* Heatmap */
.journey-heatmap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.journey-heatmap-days {
    display: flex;
    gap: 8px;
    margin-bottom: var(--space-sm);
}

.journey-heatmap-days span {
    width: 32px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.journey-heatmap-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: 8px;
}

.journey-heatmap-week {
    display: flex;
    gap: 8px;
}

.journey-heatmap-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    min-width: 120px;
}

.hm-cell, .hm-dot {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--color-bg-hover);
    transition: background 0.2s;
}

.hm-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.hm-cell.active, .hm-dot.active {
    background: var(--color-success);
}

.hm-cell.today, .hm-dot.today {
    background: var(--color-warning);
}

.journey-heatmap-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

.hm-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Detailed Statistics */
.journey-stats-detailed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md) var(--space-xl);
}

.journey-stat-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.journey-stat-row .journey-stat-icon {
    width: 24px;
    font-size: 1.25rem;
    text-align: center;
}

.journey-stat-row .journey-stat-name {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

.journey-stat-row .journey-stat-value {
    margin-left: auto;
    font-weight: 600;
    color: var(--color-text);
    font-size: 1rem;
}

/* Journey Path */
.journey-path {
    text-align: center;
}

.journey-path-track {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.journey-path-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.journey-path-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg-hover);
    border: 2px solid var(--color-border);
    transition: all 0.3s;
}

.journey-path-point.current .journey-path-dot {
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-bg);
}

.journey-path-point.done .journey-path-dot {
    background: var(--color-success);
    border-color: var(--color-success);
}

.journey-path-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.journey-path-point.current .journey-path-label {
    color: var(--color-primary);
}

.journey-path-point.done .journey-path-label {
    color: var(--color-success);
}

.journey-path-line {
    width: 60px;
    height: 3px;
    background: var(--color-border);
    margin: 0 var(--space-md);
    margin-bottom: 28px;
}

.journey-path-line.done {
    background: var(--color-success);
}

.journey-path-position {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

/* Account Info */
.journey-account {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.journey-account-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.journey-account-row span:first-child {
    color: var(--color-text-secondary);
}

.journey-account-row span:last-child {
    color: var(--color-text);
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .journey-stats-detailed {
        grid-template-columns: 1fr;
    }

    .journey-heatmap-label {
        display: none;
    }

    .journey-path-line {
        width: 40px;
    }

    .journey-account-row {
        flex-direction: column;
        gap: 2px;
    }

    .hm-cell, .hm-dot {
        width: 28px;
        height: 28px;
    }

    .journey-heatmap-days span {
        width: 28px;
    }
}

/* ============================================
   DASHBOARD - Mini Journey Card
   ============================================ */

/* Mini Progress Bars */
.journey-mini-progress {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.jmp-item {
    display: grid;
    grid-template-columns: 90px 1fr 60px;
    align-items: center;
    gap: var(--space-md);
}

.jmp-label {
    font-size: 0.9375rem;
    color: var(--color-text);
}

.jmp-item .progress-bar {
    height: 8px;
}

.jmp-count {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: right;
}

/* =====================================================
   PREMIUM WEEK HEATMAP - Apple-style Interactive Design
   ===================================================== */
.week-heatmap-premium {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--color-bg) 0%, rgba(99, 102, 241, 0.03) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    position: relative; /* For legend tooltip positioning */
}

/* Full Heatmap - Elegant Horizontal Timeline */
.week-heatmap-full {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    position: relative;
}

/* Columns wrapper - horizontal scrollable timeline */
.week-heatmap-full .heatmap-columns-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.week-heatmap-full .heatmap-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Full heatmap week styling - compact horizontal cards */
.week-heatmap-full .whp-week {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.week-heatmap-full .whp-week:hover {
    background: rgba(99, 102, 241, 0.05);
}

.week-heatmap-full .whp-week.current-week {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.week-heatmap-full .whp-week-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--color-text-secondary);
    min-width: 100px;
    flex-shrink: 0;
}

.week-heatmap-full .whp-week.current-week .whp-week-label {
    color: var(--color-primary);
    font-weight: 700;
}

.week-heatmap-full .whp-days {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    flex: 1;
}

.week-heatmap-full .whp-day {
    gap: 4px;
}

.week-heatmap-full .whp-day-cell {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.week-heatmap-full .whp-day-name {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--color-text-tertiary) !important;
    text-shadow: none;
}

/* Light mode day names */
[data-theme="light"] .week-heatmap-full .whp-day-name {
    color: #374151 !important;
    text-shadow: none;
}

.week-heatmap-full .whp-check,
.week-heatmap-full .whp-miss {
    width: 16px;
    height: 16px;
}

.week-heatmap-full .whp-freeze,
.week-heatmap-full .whp-burn,
.week-heatmap-full .whp-melted {
    font-size: 14px;
}

.week-heatmap-full .whp-before-reg {
    font-size: 16px;
    opacity: 0.4;
}

/* Tooltip styling for full heatmap - must be above everything */
.week-heatmap-full .whp-day::after {
    font-size: 0.8125rem;
    padding: 8px 12px;
    background: #1f2937 !important;
    color: #ffffff !important;
    border: 1px solid #374151;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000 !important;
    pointer-events: none;
}

/* Light mode tooltip */
[data-theme="light"] .week-heatmap-full .whp-day::after {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Legend wrapper - centered below columns */
.week-heatmap-full .heatmap-legend-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    margin-top: var(--space-sm);
}

/* Ensure legend tooltip is hidden by default */
.week-heatmap-full .heatmap-legend-tooltip {
    display: none !important;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.week-heatmap-full .heatmap-legend-tooltip.show {
    display: block !important;
}

/* Mobile: compact horizontal layout */
@media (max-width: 600px) {
    .week-heatmap-full {
        padding: var(--space-sm);
    }

    .week-heatmap-full .whp-week {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
        padding: var(--space-sm);
    }

    .week-heatmap-full .whp-week-label {
        text-align: center;
        min-width: auto;
    }

    .week-heatmap-full .whp-days {
        justify-content: center;
    }

    .week-heatmap-full .whp-day-cell {
        width: 32px;
        height: 32px;
    }

    .week-heatmap-full .whp-day-name {
        font-size: 0.5625rem;
    }
}

.whp-week {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.whp-week-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-xs);
}

.whp-days {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.whp-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.whp-day:hover {
    transform: translateY(-2px);
}

.whp-day-name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.whp-day:hover .whp-day-name {
    color: var(--color-text-secondary);
}

.whp-day-cell {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-bg-elevated);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Inactive state */
.whp-day.inactive .whp-day-cell {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
}

.whp-day.inactive:hover .whp-day-cell {
    border-color: var(--color-border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Active state - studied */
.whp-day.active .whp-day-cell {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.whp-day.active .whp-day-name {
    color: #10b981;
}

.whp-day.active:hover .whp-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Intensity levels for active days (1-5, based on % of daily review goal) */
/* Level 1: 1-20% (lightest) */
.whp-day.active.level-1 .whp-day-cell {
    background: linear-gradient(135deg, #c6e48b 0%, #a3d977 100%);
    box-shadow: 0 4px 14px rgba(198, 228, 139, 0.35);
}
.whp-day.active.level-1 .whp-day-name { color: #7eb356; }

/* Level 2: 21-40% */
.whp-day.active.level-2 .whp-day-cell {
    background: linear-gradient(135deg, #7bc96f 0%, #5cb85c 100%);
    box-shadow: 0 4px 14px rgba(123, 201, 111, 0.35);
}
.whp-day.active.level-2 .whp-day-name { color: #5cb85c; }

/* Level 3: 41-60% */
.whp-day.active.level-3 .whp-day-cell {
    background: linear-gradient(135deg, #3faf5a 0%, #239a3b 100%);
    box-shadow: 0 4px 14px rgba(63, 175, 90, 0.35);
}
.whp-day.active.level-3 .whp-day-name { color: #3faf5a; }

/* Level 4: 61-80% */
.whp-day.active.level-4 .whp-day-cell {
    background: linear-gradient(135deg, #28a745 0%, #196127 100%);
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35);
}
.whp-day.active.level-4 .whp-day-name { color: #28a745; }

/* Level 5: 81%+ (darkest - same as default active) */
.whp-day.active.level-5 .whp-day-cell {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}
.whp-day.active.level-5 .whp-day-name { color: #10b981; }

/* Dark mode intensity adjustments */
[data-theme="dark"] .whp-day.active.level-1 .whp-day-cell {
    background: linear-gradient(135deg, #0e4429 0%, #1a5c35 100%);
}
[data-theme="dark"] .whp-day.active.level-2 .whp-day-cell {
    background: linear-gradient(135deg, #006d32 0%, #238636 100%);
}
[data-theme="dark"] .whp-day.active.level-3 .whp-day-cell {
    background: linear-gradient(135deg, #238636 0%, #26a641 100%);
}
[data-theme="dark"] .whp-day.active.level-4 .whp-day-cell {
    background: linear-gradient(135deg, #26a641 0%, #39d353 100%);
}
[data-theme="dark"] .whp-day.active.level-5 .whp-day-cell {
    background: linear-gradient(135deg, #39d353 0%, #4ae168 100%);
}

/* Today state */
.whp-day.today .whp-day-cell {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.whp-day.today .whp-day-name {
    color: #f59e0b;
    font-weight: 700;
}

.whp-day.today:hover .whp-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* Today + Active (studied today) */
.whp-day.today.active .whp-day-cell {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35), 0 0 0 3px rgba(245, 158, 11, 0.4);
}

.whp-day.today.active .whp-day-name {
    color: #10b981;
}

/* Missed state - frozen day waiting to be melted ❄️ */
.whp-day.missed .whp-day-cell {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.whp-day.missed .whp-day-name {
    color: #06b6d4;
}

.whp-day.missed:hover .whp-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

/* Covered state - melted day (freeze used) 🔥 */
.whp-day.covered .whp-day-cell {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.whp-day.covered .whp-day-name {
    color: #f97316;
}

.whp-day.covered:hover .whp-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.whp-freeze {
    font-size: 14px;
}

.whp-melted {
    font-size: 14px;
}

/* Burned state - transformed into energy 💫 */
.whp-day.burned .whp-day-cell {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.whp-day.burned .whp-day-name {
    color: #8b5cf6;
}

.whp-day.burned:hover .whp-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.whp-burn {
    font-size: 14px;
    animation: energyPulse 2s ease-in-out infinite;
}

@keyframes energyPulse {
    0%, 100% {
        filter: brightness(1);
        transform: scale(1);
    }
    50% {
        filter: brightness(1.3);
        transform: scale(1.1);
    }
}

/* Before registration indicator */
.whp-before-reg {
    font-size: 20px;
    font-weight: 300;
    color: var(--color-text-tertiary);
    opacity: 0.5;
    line-height: 1;
}

/* Future state - not yet */
.whp-day.future .whp-day-cell {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
    opacity: 0.5;
}

.whp-day.future .whp-day-name {
    color: var(--color-text-tertiary);
    opacity: 0.5;
}

.whp-day.future:hover .whp-day-cell {
    opacity: 0.7;
}

/* Today pulse animation */
.whp-today-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    background: transparent;
    border: 2px solid rgba(245, 158, 11, 0.5);
    animation: todayPulse 2s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0;
        transform: scale(1.15);
    }
}

/* Checkmark icon */
.whp-check {
    width: 18px;
    height: 18px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    animation: checkAppear 0.3s ease forwards;
}

@keyframes checkAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Miss icon (X) */
.whp-miss {
    width: 16px;
    height: 16px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    animation: checkAppear 0.3s ease forwards;
}

/* Tooltip on hover */
.whp-day::after {
    content: attr(data-date);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 10px;
    background: var(--color-bg-card);
    color: var(--color-text);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.whp-day:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark mode adjustments */
[data-theme="dark"] .whp-day-cell {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .whp-day.inactive .whp-day-cell {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .whp-day.active .whp-day-cell {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .whp-day.today .whp-day-cell {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .whp-day.missed .whp-day-cell {
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

[data-theme="dark"] .whp-day.covered .whp-day-cell {
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

[data-theme="dark"] .whp-day.burned .whp-day-cell {
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .whp-day.future .whp-day-cell {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .whp-day::after {
    background: var(--color-bg-elevated);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .week-heatmap-premium {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .whp-days {
        gap: 6px;
    }

    .whp-day-cell {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .whp-check {
        width: 14px;
        height: 14px;
    }

    .whp-day-name {
        font-size: 0.625rem;
    }

    .whp-week-label {
        font-size: 0.6875rem;
    }

    .whp-today-pulse {
        inset: -3px;
        border-radius: 11px;
    }
}

/* =====================================================
   JOURNEY LEGEND & PROFILE CTA - Elegant Inline Design
   ===================================================== */

/* Journey Legend Container */
.journey-legend {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

/* Legend Trigger Button - Minimalist Elegance */
.legend-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.legend-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text);
    transform: translateY(-1px);
}

.legend-trigger svg {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.legend-trigger:hover svg {
    opacity: 1;
}

[data-theme="light"] .legend-trigger {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .legend-trigger:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Legend Dropdown - Premium Glass Design */
.legend-dropdown {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 14px);
    z-index: 100;
}

.legend-dropdown.show {
    display: block;
    animation: legendFadeIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes legendFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.legend-dropdown-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 300px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(20px);
}

[data-theme="light"] .legend-dropdown-content {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Legend Header */
.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.legend-header span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.legend-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.legend-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

/* Legend Grid - Compact 2 Column */
.legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-sample {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.legend-sample.active {
    background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
}

.legend-sample.active svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-width: 3;
}

.legend-sample.missed {
    background: linear-gradient(135deg, rgba(0, 199, 190, 0.2) 0%, rgba(0, 199, 190, 0.3) 100%);
    border: 1px solid rgba(0, 199, 190, 0.4);
}

.legend-sample.today {
    background: linear-gradient(135deg, #ff9500 0%, #ff8c00 100%);
    position: relative;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.legend-sample.inactive {
    background: var(--color-bg-elevated);
    color: var(--color-text-muted);
    font-weight: 500;
}

.legend-sample.covered {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 94, 58, 0.25) 100%);
    border: 1px solid rgba(255, 149, 0, 0.4);
}

.legend-sample.burned {
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.2) 0%, rgba(191, 90, 242, 0.25) 100%);
    border: 1px solid rgba(175, 82, 222, 0.4);
}

.legend-item span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Intensity Scale - Horizontal Line */
.legend-intensity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.legend-intensity .intensity-label {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.intensity-scale {
    display: flex;
    gap: 3px;
}

.i-box {
    width: 18px;
    height: 10px;
    border-radius: 2px;
}

.i-box.l1 { background: rgba(52, 199, 89, 0.2); }
.i-box.l2 { background: rgba(52, 199, 89, 0.4); }
.i-box.l3 { background: rgba(52, 199, 89, 0.6); }
.i-box.l4 { background: rgba(52, 199, 89, 0.8); }
.i-box.l5 { background: #34c759; }

.legend-intensity .intensity-max {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Journey Profile CTA - Premium Design */
.journey-profile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-top: var(--space-sm);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.journey-profile-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.5s ease;
}

.journey-profile-cta:hover::before {
    left: 100%;
}

.journey-profile-cta:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.journey-profile-cta .cta-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.journey-profile-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* Light Theme Adjustments */
[data-theme="light"] .journey-profile-cta {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.04) 100%
    );
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .journey-profile-cta:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.06) 100%
    );
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   JOURNEY PROFILE LINK - Navigation CTA
   ===================================================== */

.journey-profile-wrapper {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
}

.journey-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 220px;
    padding: 14px 28px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(139, 92, 246, 0.15) 100%
    );
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.journey-profile-link:hover {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.18) 0%,
        rgba(139, 92, 246, 0.22) 100%
    );
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.journey-profile-link svg {
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.journey-profile-link:hover svg {
    opacity: 1;
    transform: translateX(4px);
}

/* Light theme */
[data-theme="light"] .journey-profile-link {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.08) 0%,
        rgba(139, 92, 246, 0.12) 100%
    );
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .journey-profile-link:hover {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.14) 0%,
        rgba(139, 92, 246, 0.18) 100%
    );
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

/* =====================================================
   HEATMAP LEGEND - Interactive Help Tooltip
   ===================================================== */

/* Legend Wrapper */
.heatmap-legend-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: var(--space-md);
}

/* Legend Button */
.heatmap-legend-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.heatmap-legend-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text);
}

.heatmap-legend-btn svg {
    opacity: 0.7;
}

.heatmap-legend-btn:hover svg {
    opacity: 1;
}

/* Legend Tooltip Container - Opens ABOVE button */
.heatmap-legend-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 12px);
    z-index: 100;
}

.heatmap-legend-tooltip.show {
    display: block;
    animation: legendSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes legendSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Legend Content */
.heatmap-legend-content {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: var(--space-md);
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Legend Header */
.heatmap-legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.heatmap-legend-header span {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.heatmap-legend-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border: none;
    border-radius: 6px;
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.heatmap-legend-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

/* Legend Items */
.heatmap-legend-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px;
    background: var(--color-bg-elevated);
    border-radius: 10px;
    transition: transform 0.15s ease;
}

.heatmap-legend-item:hover {
    transform: translateX(4px);
}

/* Day Sample Cells */
.legend-day-sample {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    border: 2px solid transparent;
}

.legend-day-sample.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.legend-day-sample.missed {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 3px 10px rgba(6, 182, 212, 0.3);
}

.legend-day-sample.covered {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.3);
}

.legend-day-sample.burned {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

.legend-day-sample.today {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.legend-day-sample.future {
    background: var(--color-bg-card);
    border-color: var(--color-border);
    opacity: 0.5;
}

.legend-day-sample.inactive {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
    opacity: 0.6;
}

.legend-before-reg {
    font-size: 18px;
    font-weight: 300;
    color: var(--color-text-tertiary);
    opacity: 0.7;
}

/* Legend Icons */
.legend-check,
.legend-miss {
    width: 16px;
    height: 16px;
    color: white;
}

.legend-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(245, 158, 11, 0.6);
    animation: legendPulse 1.5s ease-in-out infinite;
}

@keyframes legendPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

/* Legend Text */
.legend-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legend-text strong {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
}

.legend-text span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* Legend Tip Box */
/* Intensity Scale in Legend */
.heatmap-intensity-scale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg);
    border-radius: 8px;
}

.intensity-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.intensity-boxes {
    display: flex;
    gap: 3px;
}

.intensity-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: help;
}

.intensity-box.level-1 { background: linear-gradient(135deg, #c6e48b, #a3d977); }
.intensity-box.level-2 { background: linear-gradient(135deg, #7bc96f, #5cb85c); }
.intensity-box.level-3 { background: linear-gradient(135deg, #3faf5a, #239a3b); }
.intensity-box.level-4 { background: linear-gradient(135deg, #28a745, #196127); }
.intensity-box.level-5 { background: linear-gradient(135deg, #10b981, #059669); }

[data-theme="dark"] .intensity-box.level-1 { background: linear-gradient(135deg, #0e4429, #1a5c35); }
[data-theme="dark"] .intensity-box.level-2 { background: linear-gradient(135deg, #006d32, #238636); }
[data-theme="dark"] .intensity-box.level-3 { background: linear-gradient(135deg, #238636, #26a641); }
[data-theme="dark"] .intensity-box.level-4 { background: linear-gradient(135deg, #26a641, #39d353); }
[data-theme="dark"] .intensity-box.level-5 { background: linear-gradient(135deg, #39d353, #4ae168); }

.intensity-hint {
    font-size: 0.625rem;
    color: var(--color-text-muted);
}

.heatmap-legend-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.tip-icon {
    font-size: 1.125rem;
    line-height: 1;
}

.tip-text {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.tip-text strong {
    color: #6366f1;
}

/* Arrow pointing down (tooltip is above button) */
.heatmap-legend-content::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transform: translateX(-50%) rotate(45deg);
}

/* Dark mode */
[data-theme="dark"] .heatmap-legend-content {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .heatmap-legend-tip {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

[data-theme="dark"] .tip-text strong {
    color: #818cf8;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .heatmap-legend-content {
        min-width: 260px;
        max-width: 290px;
    }

    .legend-day-sample {
        width: 32px;
        height: 32px;
    }

    .heatmap-legend-tip {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* Mini Stats Row */
.journey-mini-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    text-align: center;
}

.jms-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
}

.jms-icon {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.jms-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.jms-label {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

@media (max-width: 480px) {
    .jmp-item {
        grid-template-columns: 80px 1fr 50px;
    }
}

.text-warning {
    color: var(--color-warning) !important;
}

/* =====================================================
   COOKIE BANNER & CONSENT
   ===================================================== */

.cookie-banner {
    position: fixed !important;
    bottom: 1.5rem !important;
    left: 50% !important;
    transform: translateX(-50%);
    right: auto !important;
    width: calc(100% - 2rem);
    max-width: 480px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999 !important;
    padding: 1.5rem;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-text {
    text-align: center;
}

.cookie-lesson {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.4rem 0;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.cookie-construction {
    background: var(--color-bg-hover);
    color: var(--color-text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 500;
}

.cookie-pattern {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem 0;
    font-family: var(--font-mono);
}

.pattern-slot {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.cookie-greeting {
    font-size: 1.2rem;
    color: var(--color-text);
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
}

.cookie-greeting em {
    color: var(--color-primary);
    font-style: normal;
    font-weight: 600;
}

.cookie-translation {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0 0 0.6rem 0;
}

.cookie-reason {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.cookie-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem;
    align-items: stretch;
}

.btn-cookie-accept {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-cookie-accept .cookie-hint {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.85;
}

.btn-cookie-decline {
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
    padding: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-cookie-decline:hover {
    color: var(--color-text);
}

.cookie-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.cookie-links a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.cookie-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-separator {
    color: var(--color-text-muted);
}

/* Cookie Modal */
.cookie-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000 !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.active {
    display: flex !important;
}

.cookie-modal-content {
    background: var(--color-bg-card);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cookie-modal-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.cookie-modal-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: var(--color-text);
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-category-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.5rem;
}

.cookie-category-header label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.cookie-category-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.always-active {
    font-size: 0.75rem;
    color: var(--color-success);
    font-weight: 500;
}

.cookie-category p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cookie-modal-footer {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem;
    justify-content: flex-end !important;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* Footer Top - Header Style */
.footer-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    gap: 2rem;
}

.footer-brand {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem;
}

.footer-brand .logo {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

.footer-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
}

.footer-tagline {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.footer-nav a:hover {
    color: var(--color-primary);
}

.footer-company {
    text-align: center;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.footer-company p {
    margin: 0.25rem 0;
}

/* Email Reveal Button - Apple Style */
.contact-email {
    margin: var(--space-sm) 0;
}

.email-reveal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.email-reveal:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-inverse);
    transform: translateY(-1px);
}

.email-reveal:hover svg {
    stroke: var(--color-text-inverse);
}

.email-reveal svg {
    flex-shrink: 0;
    stroke: var(--color-text-secondary);
    transition: stroke var(--transition);
}

.email-reveal.revealed {
    background: var(--color-primary-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.email-reveal.revealed svg {
    stroke: var(--color-primary);
}

.email-reveal.revealed:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.email-text {
    white-space: nowrap;
}

/* Legal Page Body */
.legal-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-main {
    flex: 1;
    padding: 2rem 0;
    background: var(--color-bg);
}

/* Responsive Cookie Banner & Footer */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 1rem !important;
        padding: 1.25rem;
        border-radius: 16px;
    }

    .cookie-greeting {
        font-size: 0.95rem;
    }

    .cookie-desc {
        font-size: 0.8rem;
    }

    .btn-cookie-accept {
        padding: 0.8rem 1.25rem;
        font-size: 1rem;
    }

    .footer-top {
        flex-direction: column !important;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-brand {
        align-items: center !important;
    }

    .footer-nav {
        flex-direction: column !important;
        gap: 1rem;
        justify-content: center !important;
    }

    .footer-nav a {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Settings Page
   ========================================================================== */

/* Settings Grid - Desktop 2 columns, Mobile 1 column */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* Theme Toggle Group */
.theme-toggle-group {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.theme-option {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    background: var(--color-bg-card);
}

.theme-option:hover {
    border-color: var(--color-primary-light);
    background: var(--color-bg-hover);
}

.theme-option.active,
.theme-option:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.theme-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-option-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.theme-icon {
    font-size: 1.5rem;
}

.theme-label {
    font-weight: 500;
    color: var(--color-text);
}

/* Danger Zone */
.danger-zone-card {
    border-color: var(--color-error) !important;
    margin-top: var(--space-lg);
}

.danger-zone-header {
    background: var(--color-error-bg) !important;
}

.danger-zone-header h3 {
    color: var(--color-error) !important;
}

.danger-zone-info {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
}

.danger-zone-info h4 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-error);
    font-size: 1rem;
}

.danger-zone-info p {
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.danger-zone-info ul {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.danger-zone-info ul li {
    margin-bottom: var(--space-xs);
}

.danger-warning {
    margin-top: var(--space-md) !important;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-error-bg);
    border-radius: var(--radius-sm);
    color: var(--color-error) !important;
    font-weight: 500;
}

.danger-input {
    max-width: 200px;
    border-color: var(--color-error) !important;
}

.btn-danger {
    background: var(--color-error) !important;
    color: white !important;
    border: none;
}

.btn-danger:hover {
    background: #dc2626 !important;
}

/* Settings Page Mobile Responsive */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .theme-toggle-group {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .theme-option {
        padding: var(--space-md);
        justify-content: center;
    }

    .danger-zone-card {
        margin-top: var(--space-md);
    }

    .danger-zone-info {
        padding: var(--space-sm);
    }

    .danger-zone-info h4 {
        font-size: 0.95rem;
    }

    .danger-zone-info p,
    .danger-zone-info ul {
        font-size: 0.8rem;
    }

    .danger-input {
        max-width: 100%;
    }
}

/* ==========================================================================
   Dashboard Page Premium Components
   ========================================================================== */

/* =====================================================
   STATS MINI GRID - Premium Statistics Display
   ===================================================== */

.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stats-mini-grid > div {
    padding: 18px 20px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stats-mini-grid > div:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

[data-theme="light"] .stats-mini-grid > div {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.01) 0%,
        rgba(0, 0, 0, 0.03) 100%
    );
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .stats-mini-grid > div:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    border-color: rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* =====================================================
   RECENT ACHIEVEMENTS - Premium Badge Cards
   ===================================================== */

.recent-achievements-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .recent-achievements-section {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.recent-achievements-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: var(--space-md);
}

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

.recent-achievement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-achievement-item:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(6px);
}

[data-theme="light"] .recent-achievement-item {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.01) 0%,
        rgba(0, 0, 0, 0.03) 100%
    );
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .recent-achievement-item:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    border-color: rgba(0, 0, 0, 0.1);
}

.recent-achievement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-radius: 14px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recent-achievement-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.recent-achievement-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.recent-achievement-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.recent-achievement-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* =====================================================
   DASHBOARD CARD HEADERS - Unified Styling
   ===================================================== */

.dashboard-progress .card-header h3,
.dashboard-activity .card-header h3,
.dashboard-due .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.01em;
    margin: 0;
}

.dashboard-progress .card-header,
.dashboard-activity .card-header,
.dashboard-due .card-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

[data-theme="light"] .dashboard-progress .card-header,
[data-theme="light"] .dashboard-activity .card-header,
[data-theme="light"] .dashboard-due .card-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.dashboard-progress .card-body,
.dashboard-activity .card-body,
.dashboard-due .card-body {
    padding: 24px 26px 28px;
}

/* =====================================================
   DASHBOARD SECTIONS SPACING - Breathing Room
   ===================================================== */

.dashboard-journey {
    margin-bottom: 16px;
}

.dashboard-dev {
    margin-top: 24px;
    margin-bottom: 8px;
}

.dashboard-progress {
    margin-top: 20px;
}

.dashboard-activity {
    margin-top: 20px;
}

.dashboard-achievements {
    grid-column: span 12;
    margin-top: 20px;
}

.dashboard-due {
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Achievements Card Styling */
.dashboard-achievements .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.01em;
    margin: 0;
}

.dashboard-achievements .card-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .dashboard-achievements .card-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.dashboard-achievements .card-body {
    padding: 24px 26px 28px;
}

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

.achievement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-item:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(6px);
}

[data-theme="light"] .achievement-item {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.01) 0%,
        rgba(0, 0, 0, 0.03) 100%
    );
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .achievement-item:hover {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    border-color: rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-radius: 14px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.achievement-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.achievement-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.achievement-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Locked Achievement State */
.achievement-item.locked {
    opacity: 0.55;
    background: linear-gradient(135deg,
        rgba(128, 128, 128, 0.03) 0%,
        rgba(128, 128, 128, 0.06) 100%
    );
    border: 1px dashed rgba(128, 128, 128, 0.2);
}

.achievement-item.locked:hover {
    opacity: 0.7;
    transform: none;
    background: linear-gradient(135deg,
        rgba(128, 128, 128, 0.05) 0%,
        rgba(128, 128, 128, 0.08) 100%
    );
}

.achievement-item.locked .achievement-icon {
    background: linear-gradient(135deg, rgba(128, 128, 128, 0.1) 0%, rgba(128, 128, 128, 0.15) 100%);
    color: var(--color-text-muted);
    font-size: 1.2rem;
}

.achievement-item.locked .achievement-name {
    color: var(--color-text-muted);
}

.achievement-item.locked .achievement-desc {
    color: var(--color-text-muted);
    font-style: italic;
}

[data-theme="light"] .achievement-item.locked {
    background: linear-gradient(135deg,
        rgba(128, 128, 128, 0.02) 0%,
        rgba(128, 128, 128, 0.05) 100%
    );
    border-color: rgba(128, 128, 128, 0.15);
}

/* Achievements Two-Column Layout */
.achievements-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.achievements-column {
    display: flex;
    flex-direction: column;
}

.achievements-column-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.achievements-column-header .header-icon {
    margin-right: 6px;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .achievements-two-col {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   Welcome Card V2 - Creative Design
   ========================================================================== */

.welcome-card-v2 {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    box-shadow:
        0 10px 40px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.welcome-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.welcome-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.welcome-content {
    position: relative;
    z-index: 1;
    padding: var(--space-xl);
    color: white;
}

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

.welcome-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.welcome-greeting {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.welcome-time {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.welcome-name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM STREAK BADGE - Apple-inspired Glass Morphism Design
   ═══════════════════════════════════════════════════════════════ */
.welcome-streak {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(
        135deg,
        rgba(255, 149, 0, 0.15) 0%,
        rgba(255, 94, 58, 0.2) 50%,
        rgba(255, 149, 0, 0.15) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.625rem 1rem 0.625rem 0.875rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 149, 0, 0.3);
    box-shadow:
        0 4px 24px rgba(255, 149, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle shine animation */
.welcome-streak::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: streakShine 4s ease-in-out infinite;
}

@keyframes streakShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.welcome-streak:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 32px rgba(255, 149, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 149, 0, 0.5);
}

/* Fire emoji with animated glow */
.welcome-streak .streak-flame {
    font-size: 1.375rem;
    filter: drop-shadow(0 0 8px rgba(255, 149, 0, 0.6));
    animation: flameGlow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

@keyframes flameGlow {
    0% {
        filter: drop-shadow(0 0 6px rgba(255, 149, 0, 0.5));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(255, 94, 58, 0.8));
        transform: scale(1.05);
    }
}

/* Bold streak number */
.welcome-streak .streak-count {
    display: inline !important;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

/* Elegant label */
.welcome-streak .streak-label {
    display: inline !important;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}

.welcome-motivation {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.welcome-mission {
    margin-bottom: var(--space-lg);
}

.mission-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: var(--space-sm);
}

.mission-cards {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.mission-card-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all var(--transition);
}

.mission-card-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.mission-icon {
    font-size: 1.1rem;
}

.mission-count {
    font-size: 1.25rem;
    font-weight: 700;
}

.mission-type {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Mission Progress Box - New Design */
.mission-progress-box {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: var(--space-md);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: var(--space-sm);
}

.mission-main-stat {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.mission-big-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.mission-slash {
    font-size: 1.5rem;
    opacity: 0.6;
}

.mission-goal {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.8;
}

.mission-unit {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-left: var(--space-xs);
}

.mission-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.mission-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Mission progress intensity levels */
.mission-progress-fill.level-0 { background: rgba(255,255,255,0.3); }
.mission-progress-fill.level-1 { background: linear-gradient(90deg, #c6e48b, #a3d977); }
.mission-progress-fill.level-2 { background: linear-gradient(90deg, #7bc96f, #5cb85c); }
.mission-progress-fill.level-3 { background: linear-gradient(90deg, #3faf5a, #239a3b); }
.mission-progress-fill.level-4 { background: linear-gradient(90deg, #28a745, #196127); }
.mission-progress-fill.level-5 { background: linear-gradient(90deg, #10b981, #059669); }

.mission-remaining {
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.85;
}

.mission-breakdown {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    justify-content: center;
}

.mission-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.welcome-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: white;
    color: #764ba2;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow:
        0 4px 15px rgba(0,0,0,0.2),
        0 0 0 3px rgba(255,255,255,0.3);
    transition: all var(--transition);
}

.welcome-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(0,0,0,0.3),
        0 0 0 4px rgba(255,255,255,0.4);
}

.welcome-cta .cta-arrow {
    font-size: 1.25rem;
    transition: transform var(--transition);
}

.welcome-cta:hover .cta-arrow {
    transform: translateX(4px);
}

.welcome-complete {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.2);
}

.complete-icon {
    font-size: 2.5rem;
}

.complete-text {
    display: flex;
    flex-direction: column;
}

.complete-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.complete-desc {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dark Mode - Welcome Card V2 */
[data-theme="dark"] .welcome-card-v2 {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    background-size: 200% 200%;
    box-shadow:
        0 10px 40px rgba(99, 102, 241, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.3) inset,
        0 0 60px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .welcome-glow {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
}

[data-theme="dark"] .welcome-cta {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.4),
        0 0 0 3px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .welcome-cta:hover {
    box-shadow:
        0 8px 25px rgba(99, 102, 241, 0.5),
        0 0 0 4px rgba(99, 102, 241, 0.4);
}

/* Welcome Card V2 - Tablet */
@media (max-width: 768px) {
    .welcome-content {
        padding: var(--space-lg);
    }

    .welcome-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .welcome-icon {
        font-size: 2rem;
    }

    .welcome-greeting {
        flex: 1 1 auto;
        min-width: 0;
    }

    .welcome-time {
        font-size: 0.85rem;
    }

    .welcome-name {
        font-size: 1.4rem;
    }

    .welcome-streak {
        padding: 0.5rem 0.75rem 0.5rem 0.625rem;
        gap: 0.375rem;
    }

    .welcome-streak .streak-flame {
        font-size: 1.125rem;
    }

    .welcome-streak .streak-count {
        display: inline !important;
        font-size: 1rem;
        font-weight: 800;
    }

    .welcome-streak .streak-label {
        display: inline !important;
        font-size: 0.6875rem;
    }

    .welcome-motivation {
        font-size: 0.9rem;
        padding: var(--space-xs) 0;
    }

    .mission-label {
        font-size: 0.7rem;
    }

    .mission-cards {
        gap: var(--space-xs);
    }

    .mission-card-item {
        padding: var(--space-xs) var(--space-sm);
        flex: 1 1 auto;
        min-width: 70px;
        justify-content: center;
    }

    .mission-icon {
        font-size: 1rem;
    }

    .mission-count {
        font-size: 1.1rem;
    }

    .mission-type {
        font-size: 0.7rem;
    }

    .welcome-cta {
        width: 100%;
        justify-content: center;
        padding: var(--space-md);
    }

    .welcome-glow {
        width: 200px;
        height: 200px;
    }

    .welcome-complete {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }

    .complete-icon {
        font-size: 2rem;
    }

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

    .complete-desc {
        font-size: 0.85rem;
    }
}

/* Welcome Card V2 - Small Mobile */
@media (max-width: 480px) {
    .welcome-content {
        padding: var(--space-md);
    }

    .welcome-header {
        gap: var(--space-xs);
    }

    .welcome-icon {
        font-size: 1.75rem;
    }

    .welcome-time {
        font-size: 0.8rem;
    }

    .welcome-name {
        font-size: 1.2rem;
    }

    .welcome-streak {
        position: absolute;
        top: var(--space-md);
        right: var(--space-md);
        padding: 0.4rem 0.625rem 0.4rem 0.5rem;
        gap: 0.25rem;
    }

    .welcome-streak .streak-flame {
        font-size: 1rem;
    }

    .welcome-streak .streak-count {
        font-size: 0.875rem;
    }

    .welcome-streak .streak-label {
        font-size: 0.625rem;
    }

    .welcome-card-v2 {
        position: relative;
    }

    .welcome-motivation {
        font-size: 0.85rem;
        margin-bottom: var(--space-md);
    }

    .welcome-mission {
        margin-bottom: var(--space-md);
    }

    .mission-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
    }

    .mission-card-item {
        flex-direction: column;
        padding: var(--space-sm);
        gap: 2px;
    }

    .mission-icon {
        font-size: 1.25rem;
    }

    .mission-count {
        font-size: 1rem;
    }

    .mission-type {
        font-size: 0.65rem;
    }

    .welcome-cta {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.95rem;
    }

    .welcome-glow {
        width: 150px;
        height: 150px;
        top: -30%;
        right: -15%;
    }
}

/* Due Cards - Mobile Fix */
@media (max-width: 768px) {
    .due-item {
        flex-wrap: wrap;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .due-item-info {
        flex: 1 1 100%;
        margin-bottom: var(--space-xs);
    }

    .due-item-count {
        flex: 1;
        text-align: left;
    }

    .due-item .btn {
        flex-shrink: 0;
    }

    /* Recent achievements mobile */
    .recent-achievement-item {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }

    .recent-achievement-icon {
        font-size: 1.5rem;
    }

    .recent-achievement-name {
        font-size: 0.85rem;
    }

    .recent-achievement-desc {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
    }

    .recent-achievement-time {
        font-size: 0.65rem;
    }
}

/* ==========================================================================
   16. Audio Player & Pronunciation - Apple-Style Premium Design
   ========================================================================== */

/* Audio Button - Base (Apple-inspired) */
.audio-btn {
    /* Size & Touch Target */
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;

    /* Shape */
    border-radius: 50%;
    border: none;

    /* Premium Gradient */
    background: linear-gradient(145deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);

    /* Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;

    /* Interaction */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    /* Typography */
    color: #ffffff;

    /* Effects - Apple-style depth */
    box-shadow:
        0 2px 4px rgba(79, 70, 229, 0.2),
        0 4px 12px rgba(79, 70, 229, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);

    /* Smooth transitions */
    transition:
        transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background 0.2s ease;

    /* Ensure visibility */
    position: relative;
    z-index: 1;
}

.audio-btn svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.audio-btn svg path {
    fill: #ffffff;
}

/* Hover - Desktop */
@media (hover: hover) {
    .audio-btn:hover {
        transform: scale(1.08);
        box-shadow:
            0 4px 8px rgba(79, 70, 229, 0.25),
            0 8px 24px rgba(79, 70, 229, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        background: linear-gradient(145deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
    }

    .audio-btn:hover svg {
        transform: scale(1.05);
    }
}

/* Active/Pressed - Haptic feedback feel */
.audio-btn:active {
    transform: scale(0.92);
    box-shadow:
        0 1px 2px rgba(79, 70, 229, 0.2),
        0 2px 6px rgba(79, 70, 229, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Playing State - Animated glow */
.audio-btn.playing {
    background: linear-gradient(145deg, #34d399 0%, #10b981 50%, #059669 100%);
    animation: audioGlow 1.5s ease-in-out infinite;
}

.audio-btn.playing svg {
    animation: audioSpeaker 0.6s ease-in-out infinite;
}

@keyframes audioGlow {
    0%, 100% {
        box-shadow:
            0 2px 4px rgba(16, 185, 129, 0.2),
            0 4px 12px rgba(16, 185, 129, 0.3),
            0 0 0 0 rgba(16, 185, 129, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow:
            0 2px 4px rgba(16, 185, 129, 0.2),
            0 4px 12px rgba(16, 185, 129, 0.3),
            0 0 0 12px rgba(16, 185, 129, 0),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

@keyframes audioSpeaker {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* Slow playback */
.audio-btn.slow {
    background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

/* Played feedback */
.audio-btn.played {
    animation: audioSuccess 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes audioSuccess {
    0% { transform: scale(1); }
    40% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Small variant - For sentences/examples */
.audio-btn-sm {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
}

.audio-btn-sm svg {
    width: 18px;
    height: 18px;
}

/* Large variant */
.audio-btn-lg {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
}

.audio-btn-lg svg {
    width: 26px;
    height: 26px;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .audio-btn {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        /* Stronger shadow on mobile for visibility */
        box-shadow:
            0 3px 6px rgba(79, 70, 229, 0.25),
            0 6px 16px rgba(79, 70, 229, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .audio-btn svg {
        width: 24px;
        height: 24px;
    }

    .audio-btn-sm {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .audio-btn-sm svg {
        width: 20px;
        height: 20px;
    }
}

/* Flashcard Audio Integration */
.flashcard-audio {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-md);
}

.flashcard-word-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    justify-content: center;
}

/* Clickable word for audio */
.audio-word {
    cursor: pointer;
    transition: all var(--transition);
    border-radius: var(--radius);
    padding: var(--space-xs) var(--space-sm);
}

.audio-word:hover {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

.audio-word:active {
    transform: scale(0.98);
}

/* Example sentence with audio */
.example-audio {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-hover);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.example-audio .example-text {
    flex: 1;
}

.example-audio .audio-btn {
    margin-top: 2px;
}

/* Speaker icon SVG inline */
.icon-speaker {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

/* ==========================================================================
   APPLE-STYLE AUDIO INTERACTIONS - Minimalist & Elegant
   ========================================================================== */

/* ===== CLICKABLE WORD - Vocabulary Audio Trigger ===== */
.word-audio-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Ultra-subtle - Apple style */
    background: transparent;
    border: none;
}

.word-audio-trigger .word-text {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text);
    transition: all 0.25s ease;
    letter-spacing: -0.02em;
}

/* Hover: Subtle feedback */
@media (hover: hover) {
    .word-audio-trigger:hover {
        background: rgba(99, 102, 241, 0.08);
    }

    .word-audio-trigger:hover .word-text {
        color: var(--color-primary);
    }

    .word-audio-trigger:hover .audio-equalizer {
        opacity: 0.8;
    }
}

/* Active/Pressed state */
.word-audio-trigger:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Playing state */
.word-audio-trigger.playing {
    background: rgba(99, 102, 241, 0.1);
}

.word-audio-trigger.playing .word-text {
    color: var(--color-primary);
}

.word-audio-trigger.playing .audio-equalizer {
    opacity: 1;
}

.word-audio-trigger.playing .eq-bar {
    animation: eqPulse 0.45s ease-in-out infinite;
}

/* ===== AUDIO EQUALIZER - 3-bar animation ===== */
/* Always visible at subtle opacity - Apple style affordance */
.audio-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    opacity: 0.35;
    transition: opacity 0.25s ease;
}

.eq-bar {
    width: 3px;
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 1.5px;
    transition: height 0.2s ease;
}

.eq-bar:nth-child(1) { height: 6px; }
.eq-bar:nth-child(2) { height: 12px; }
.eq-bar:nth-child(3) { height: 8px; }

/* Subtle breathing animation on hover */
@keyframes eqBreath {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.3); }
}

/* Active pulsing animation when playing */
@keyframes eqPulse {
    0%, 100% { height: 5px; }
    50% { height: 16px; }
}

.word-audio-trigger.playing .eq-bar:nth-child(1) { animation-delay: 0s; }
.word-audio-trigger.playing .eq-bar:nth-child(2) { animation-delay: 0.12s; }
.word-audio-trigger.playing .eq-bar:nth-child(3) { animation-delay: 0.24s; }

/* ===== CLICKABLE EXAMPLE ROW - Sentence Audio Trigger ===== */
.example-audio-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin: 16px 0 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.example-audio-trigger .example-content {
    flex: 1;
}

.example-audio-trigger .example-en {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text);
}

.example-audio-trigger .example-sk {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Play indicator - subtle icon */
.play-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    opacity: 0.5;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-indicator svg {
    fill: currentColor;
}

/* Hover: Lift and highlight */
@media (hover: hover) {
    .example-audio-trigger:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.15) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.12);
        border-color: rgba(99, 102, 241, 0.2);
    }

    .example-audio-trigger:hover .play-indicator {
        opacity: 1;
        background: var(--color-primary);
        color: white;
        transform: scale(1.1);
    }
}

/* Active/Pressed */
.example-audio-trigger:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Playing state */
.example-audio-trigger.playing {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.example-audio-trigger.playing .play-indicator {
    opacity: 1;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
    animation: playPulse 1s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] .word-audio-trigger:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.2) 100%);
}

[data-theme="dark"] .word-audio-trigger.playing {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.25) 100%);
}

[data-theme="dark"] .example-audio-trigger {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.15) 100%);
}

[data-theme="dark"] .example-audio-trigger:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.22) 100%);
}

[data-theme="dark"] .example-audio-trigger.playing {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.2) 100%);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .word-audio-trigger {
        padding: 12px 22px;
        gap: 12px;
        border-radius: 16px;
    }

    .word-audio-trigger .word-text {
        font-size: 1.875rem;
    }

    .audio-equalizer {
        height: 16px;
    }

    .eq-bar {
        width: 2.5px;
    }

    .example-audio-trigger {
        padding: 14px 16px;
        gap: 12px;
    }

    .example-audio-trigger .example-en {
        font-size: 1rem;
    }

    .play-indicator {
        width: 36px;
        height: 36px;
    }
}

/* ===== LEGACY SUPPORT (for other pages) ===== */
.card-word-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 0;
}

.example-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(79, 70, 229, 0.08) 100%);
    border-radius: 16px;
    margin: 8px 0;
}

/* ========== MOBILE CARD LAYOUTS ========== */
@media (max-width: 768px) {
    .card-word-row {
        gap: 20px;
        padding: 12px 0;
    }

    .example-row {
        flex-direction: row;
        gap: 12px;
        padding: 14px 16px;
        border-radius: 14px;
    }

    .example-row .example-en {
        font-size: 0.95rem;
    }

    /* Card content spacing */
    .card-content {
        padding: 20px 16px;
    }

    /* Pronunciation text */
    .card-pronunciation {
        margin-top: 8px;
        font-size: 1.1rem;
    }
}

/* ========== Dark Mode Adjustments ========== */
[data-theme="dark"] .audio-btn {
    background: linear-gradient(145deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .audio-btn:active {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(99, 102, 241, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .example-row {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.15) 100%);
}

/* ==========================================================================
   TENSE CARDS - Educational Tense Display
   ========================================================================== */

/* Grid Layout */
.tenses-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Individual Tense Card */
.tense-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

/* Card Header */
.tense-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-left: 4px solid var(--color-primary);
}

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

.tense-card-title {
    flex: 1;
}

.tense-card-title h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.tense-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.tense-card-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Sections */
.tense-section {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.tense-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-md) 0;
}

/* Definition */
.tense-definition {
    background: linear-gradient(135deg, var(--color-primary-bg) 0%, transparent 100%);
    border-left: 3px solid var(--color-primary);
}

.tense-definition p {
    margin: 0;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* Formation Rules */
.formation-rules {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.formation-item {
    padding: var(--space-md);
    border-radius: var(--radius);
    background: var(--color-bg);
}

.formation-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.formation-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.formation-positive .formation-badge { background: var(--color-success); }
.formation-negative .formation-badge { background: var(--color-error); }
.formation-question .formation-badge { background: var(--color-info); }

.formation-rule {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    padding-left: calc(24px + var(--space-sm));
}

.formation-example {
    padding-left: calc(24px + var(--space-sm));
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.formation-example .example-en {
    font-weight: 500;
    color: var(--color-text);
}

.formation-example .example-sk {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Examples Grid */
.tense-examples {
    background: var(--color-bg);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.examples-group h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 var(--space-sm) 0;
}

.examples-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.examples-group li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.examples-group li:last-child {
    border-bottom: none;
}

.examples-group .example-en {
    color: var(--color-text);
    font-size: 0.9rem;
}

.examples-group .example-sk {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Signal Words */
.signal-words {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.signal-badge {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary-bg);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: help;
    transition: all var(--transition-fast);
}

.signal-badge:hover {
    background: var(--color-primary);
    color: white;
}

/* Common Mistakes */
.tense-mistakes {
    background: var(--color-warning-bg);
    border-left: 3px solid var(--color-warning);
}

.tense-mistakes .tense-section-title {
    color: var(--color-warning);
}

.mistakes-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mistake-item {
    padding: var(--space-md);
    background: var(--color-bg-card);
    border-radius: var(--radius);
}

.mistake-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

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

.mistake-wrong,
.mistake-correct {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

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

.mistake-correct {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.mistake-icon {
    flex-shrink: 0;
}

/* Card Footer */
.tense-card-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .tense-card-header {
        flex-wrap: wrap;
    }

    .tense-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .tense-card-title h2 {
        font-size: 1.1rem;
    }

    .tense-card-status {
        width: 100%;
        justify-content: flex-end;
        margin-top: var(--space-sm);
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .formation-rule,
    .formation-example {
        padding-left: 0;
        margin-top: var(--space-sm);
    }
}

/* ==========================================================================
   TENSE FLASHCARD - Study Mode (CENTERED layout)
   ========================================================================== */

/* NO left border for tense cards - keep clean design */

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

.card-tense-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.card-tense-name-sk {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Back content - LEFT aligned */
.tense-back-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    text-align: left;
}

/* Custom scrollbar for tense content */
.tense-back-content::-webkit-scrollbar {
    width: 4px;
}

.tense-back-content::-webkit-scrollbar-track {
    background: transparent;
}

.tense-back-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.tense-back-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.tense-back-header .card-tense-name {
    font-size: 1.15rem;
}

.tense-back-header .card-tense-name-sk {
    font-size: 0.8rem;
}

.tense-icon-sm {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: none !important;
}

/* Definition box - LEFT border highlight */
.tense-definition-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
    border-left: 3px solid #8b5cf6;
    padding: var(--space-sm) var(--space-md);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.tense-definition-box p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Section labels */
.tense-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-xs) 0;
}

/* Formation grid - compact rows */
.tense-formation-section {
    padding: 0;
}

.tense-formation-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.formation-item-compact {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    background: var(--color-bg);
}

.formation-symbol {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.formation-positive .formation-symbol {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.formation-negative .formation-symbol {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.formation-question .formation-symbol {
    background: rgba(59, 130, 246, 0.2);
    color: var(--color-info);
}

.formation-rule-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.formation-example-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.example-sk-inline {
    font-weight: 400;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

/* Signal chips */
.tense-signals-section {
    padding: 0;
}

.tense-signals-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.signal-chip {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    cursor: help;
    transition: all var(--transition-fast);
}

.signal-chip:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

/* Mistakes section - warning highlight */
.tense-mistakes-section {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--color-warning);
    padding: var(--space-sm) var(--space-md);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.tense-mistakes-section .tense-section-label {
    color: var(--color-warning);
}

.tense-mistakes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mistake-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px var(--space-lg);
    font-size: 0.85rem;
}

.mistake-row .mistake-wrong {
    color: var(--color-error);
    background: none;
    padding: 0;
}

.mistake-row .mistake-correct {
    color: var(--color-success);
    background: none;
    padding: 0;
}

/* ==========================================================================
   TENSE CARD - Premium Design
   ========================================================================== */

/* Header row: icon + badge elegantly centered */
.tense-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: var(--space-sm);
}

/* Icon badge - clean, no background */
.tense-icon-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: none !important;
}

/* Hide decorative line */
.tense-header-line {
    display: none;
}

/* ===== FRONT CARD - LEFT aligned ===== */
.flashcard-container[data-card-type="tense"] .flashcard-front .card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
}

.flashcard-container[data-card-type="tense"] .flashcard-front .card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: var(--space-xl) 0;
    gap: var(--space-xs);
}

/* Tense name - prominent */
.flashcard-container[data-card-type="tense"] .card-tense-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

/* Slovak translation - subtle */
.flashcard-container[data-card-type="tense"] .card-tense-name-sk {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ===== BACK CARD HEADER ===== */
.tense-back-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
}

.tense-back-title > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tense-back-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.tense-back-name-sk {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
}

.flashcard-container[data-card-type="tense"] .flashcard-back .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-sm);
}

/* ===== TABLET RESPONSIVE - Tense Cards ===== */
@media (max-width: 768px) {
    .flashcard-container[data-card-type="tense"] .card-tense-name {
        font-size: 1.5rem;
    }

    .tense-definition-box p {
        font-size: 0.85rem;
    }

    .formation-rule-text {
        font-size: 0.75rem;
    }

    .formation-example-text {
        font-size: 0.85rem;
    }
}

/* ===== MOBILE RESPONSIVE - Tense Cards ===== */
@media (max-width: 480px) {
    /* Front card - same as desktop */
    .flashcard-container[data-card-type="tense"] .flashcard-front .card-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
    }

    .flashcard-container[data-card-type="tense"] .flashcard-front .card-content {
        padding: var(--space-lg) 0;
    }

    .flashcard-container[data-card-type="tense"] .card-tense-name {
        font-size: 1.4rem;
    }

    .flashcard-container[data-card-type="tense"] .card-tense-name-sk {
        font-size: 0.85rem;
    }

    /* Icon badges */
    .tense-icon-badge {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .tense-icon-sm {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    /* Back card header */
    .tense-back-title {
        gap: var(--space-xs);
    }

    .tense-back-name {
        font-size: 0.9rem;
    }

    .tense-back-name-sk {
        font-size: 0.7rem;
    }

    /* Back card content */
    .tense-back-content {
        gap: var(--space-xs);
    }

    .tense-definition-box {
        padding: var(--space-xs) var(--space-sm);
    }

    .tense-definition-box p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    /* Section labels */
    .tense-section-label {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    /* Formation grid */
    .tense-formation-grid {
        gap: 4px;
    }

    .formation-item-compact {
        padding: var(--space-xs) var(--space-sm);
        gap: var(--space-xs);
    }

    .formation-symbol {
        width: 20px;
        height: 20px;
        font-size: 0.85rem;
    }

    .formation-rule-text {
        font-size: 0.7rem;
    }

    .formation-example-text {
        font-size: 0.8rem;
    }

    .example-sk-inline {
        font-size: 0.75rem;
    }

    /* Signal chips */
    .tense-signals-chips {
        gap: 4px;
    }

    .signal-chip {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    /* Mistakes */
    .tense-mistakes-section {
        padding: var(--space-xs) var(--space-sm);
    }

    .tense-mistakes-list {
        gap: 4px;
    }

    .mistake-row {
        flex-direction: column;
        gap: 2px;
        font-size: 0.75rem;
    }

    /* Rating buttons */
    .flashcard-container[data-card-type="tense"] .card-rating {
        padding-top: var(--space-sm);
    }

    .flashcard-container[data-card-type="tense"] .rating-buttons {
        gap: var(--space-xs);
    }

    .flashcard-container[data-card-type="tense"] .btn-rating {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    /* Progress bar inside card */
    .flashcard-container[data-card-type="tense"] .study-progress {
        margin-top: var(--space-sm);
        padding-top: var(--space-sm);
    }
}

/* Dark Mode */
[data-theme="dark"] .tense-definition-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, transparent 100%);
}

[data-theme="dark"] .formation-item-compact {
    background: var(--color-bg);
}

[data-theme="dark"] .signal-chip {
    background: var(--color-bg);
}

[data-theme="dark"] .tense-mistakes-section {
    background: rgba(245, 158, 11, 0.05);
}

/* Dark Mode */
[data-theme="dark"] .tense-card {
    background: var(--color-bg-card);
}

[data-theme="dark"] .tense-definition {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
}

[data-theme="dark"] .formation-item {
    background: var(--color-bg);
}

[data-theme="dark"] .tense-examples {
    background: var(--color-bg);
}

[data-theme="dark"] .mistake-item {
    background: var(--color-bg);
}

[data-theme="dark"] .signal-badge:hover {
    background: var(--color-primary);
}

/* ==========================================================================
   ALPHABET & NUMBERS PAGES - Educational Cards
   ========================================================================== */

/* Educational Card - Base (similar to tense-card) */
.edu-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

/* Card Header */
.edu-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-left: 4px solid var(--color-primary);
}

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

.edu-card-title {
    flex: 1;
}

.edu-card-title h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.edu-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Sections */
.edu-section {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.edu-definition {
    background: linear-gradient(135deg, var(--color-primary-bg) 0%, transparent 100%);
    border-left: 3px solid var(--color-primary);
}

.edu-definition p {
    margin: 0;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.edu-list {
    list-style: none;
    padding: 0;
    margin: var(--space-sm) 0 0 0;
}

.edu-list li {
    position: relative;
    padding: var(--space-xs) 0 var(--space-xs) var(--space-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.edu-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.edu-intro-text {
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-md) 0;
    line-height: 1.6;
}

/* ==========================================================================
   ALPHABET GRID
   ========================================================================== */

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

/* Simple Alphabet Card Design */
.alphabet-grid-simple {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--space-md);
}

.alphabet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-md);
    background: var(--color-bg);
    border: 2px solid #8b5cf6;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    gap: var(--space-xs);
}

.alphabet-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: rgba(139, 92, 246, 0.08);
}

.alphabet-card.playing {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.12);
}

.alphabet-card:active {
    transform: scale(0.97);
}

.alphabet-card-letter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8b5cf6;
    line-height: 1;
}

.alphabet-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.alphabet-card-phonetic {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.alphabet-card-word {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.alphabet-card-word span {
    color: var(--color-text-secondary);
}

.alphabet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    position: relative;
}

.alphabet-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.alphabet-letter-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.alphabet-letter {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.alphabet-letter-small {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Split Card Design - Two Voices (Mobile Friendly) */
.alphabet-card-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.alphabet-card-split:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.alphabet-half {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 70px;
}

.alphabet-half-left {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.alphabet-half-left:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.alphabet-half-right {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

.alphabet-half-right:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
}

.alphabet-half.playing {
    animation: audioPulse 0.5s ease-in-out infinite;
}

.alphabet-half:active {
    transform: scale(0.95);
}

.alphabet-letter-big {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alphabet-card-info {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.alphabet-word-inline {
    font-size: 0.8rem;
    margin-top: 2px;
}

.alphabet-word-inline .word-en {
    font-weight: 500;
    color: var(--color-text);
}

.alphabet-word-inline .word-sk {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Mobile responsive - larger touch targets */
@media (max-width: 480px) {
    .alphabet-half {
        min-height: 80px;
        padding: var(--space-xl) var(--space-md);
    }

    .alphabet-letter-big {
        font-size: 3rem;
    }
}

.alphabet-info {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.alphabet-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.alphabet-phonetic {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

.alphabet-word {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px solid var(--color-border);
    width: 100%;
}

.alphabet-word .word-en {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
}

.alphabet-word .word-sk {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Audio Button - Alphabet */
.audio-btn-alphabet {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.audio-btn-alphabet:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.audio-btn-alphabet.playing {
    background: var(--color-primary);
    color: white;
    animation: audioPulse 0.5s ease-in-out infinite;
}

/* ==========================================================================
   INTERACTIVE SPELLING EXAMPLES
   ========================================================================== */

.spelling-examples-interactive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.spelling-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
}

.spelling-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.spelling-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.spelling-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.spelling-play-all {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.spelling-play-all:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

.spelling-play-all.playing {
    animation: audioPulse 0.5s ease-in-out infinite;
}

.spelling-card-letters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.spelling-letter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-primary-bg);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 50px;
}

.spelling-letter-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.spelling-letter-btn:hover .pronunciation {
    color: rgba(255, 255, 255, 0.9);
}

.spelling-letter-btn.playing {
    background: var(--color-primary);
    color: white;
    animation: audioPulse 0.5s ease-in-out infinite;
}

.spelling-letter-btn.playing .pronunciation {
    color: rgba(255, 255, 255, 0.9);
}

.spelling-letter-btn .letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.spelling-letter-btn:hover .letter,
.spelling-letter-btn.playing .letter {
    color: white;
}

.spelling-letter-btn .pronunciation {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.spelling-separator {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

/* ==========================================================================
   QUICK REFERENCE - INTERACTIVE
   ========================================================================== */

.quick-ref-grid-interactive {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.quick-ref-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
}

.quick-ref-card:hover {
    box-shadow: var(--shadow-md);
}

.quick-ref-card.vowels {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.03);
}

.quick-ref-card.consonants {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.03);
}

.quick-ref-card.difficult {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.03);
}

.quick-ref-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.quick-ref-card-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-ref-play-all {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-fast);
}

.quick-ref-card.vowels .quick-ref-play-all {
    background: #10b981;
}

.quick-ref-card.consonants .quick-ref-play-all {
    background: #3b82f6;
}

.quick-ref-card.difficult .quick-ref-play-all {
    background: #f59e0b;
}

.quick-ref-play-all:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.quick-ref-play-all.playing {
    animation: audioPulse 0.5s ease-in-out infinite;
}

.quick-ref-letters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

.quick-ref-letters.consonants-grid {
    grid-template-columns: repeat(7, 1fr);
}

.quick-ref-card.difficult .quick-ref-letters {
    grid-template-columns: repeat(3, 1fr);
    max-width: 400px;
}

.quick-letter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-lg);
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 100px;
}

.quick-letter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-ref-card.vowels .quick-letter-btn:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.quick-ref-card.consonants .quick-letter-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.quick-ref-card.difficult .quick-letter-btn:hover,
.quick-letter-btn.difficult-btn:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.quick-letter-btn:hover .ql-letter,
.quick-letter-btn:hover .ql-pron {
    color: white;
}

.quick-letter-btn.playing {
    animation: audioPulse 0.5s ease-in-out infinite;
}

.quick-ref-card.vowels .quick-letter-btn.playing {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.quick-ref-card.consonants .quick-letter-btn.playing {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.quick-ref-card.difficult .quick-letter-btn.playing {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.quick-letter-btn.playing .ql-letter,
.quick-letter-btn.playing .ql-pron {
    color: white;
}

.ql-letter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
    text-transform: uppercase;
}

.ql-pron {
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 600;
}

.ql-phonetic {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

/* Quick Reference Mobile */
@media (max-width: 768px) {
    .quick-ref-letters {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-ref-letters.consonants-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-ref-card.difficult .quick-ref-letters {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-letter-btn {
        min-height: 80px;
        padding: var(--space-md);
    }

    .ql-letter {
        font-size: 2rem;
    }

    .ql-pron {
        font-size: 1rem;
    }

    .ql-phonetic {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .quick-ref-letters,
    .quick-ref-letters.consonants-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ql-letter {
        font-size: 1.75rem;
    }
}

/* Practice Box */
.practice-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-primary);
}

.practice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.practice-content strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
}

.practice-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   NUMBERS GRID - NEW DESIGN
   ========================================================================== */

.numbers-grid-new {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-md);
}

.number-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--color-bg-hover) 0%, var(--color-bg) 100%);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 140px;
}

.number-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, var(--color-bg) 100%);
}

.number-card:active {
    transform: scale(0.97);
}

.number-card.playing {
    border-color: var(--color-primary);
    animation: audioPulse 0.5s ease-in-out infinite;
}

.number-card-exception {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--color-bg) 100%);
}

.number-card-warning {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--color-bg) 100%);
}

.number-card-digit {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.number-card-en {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.number-card-phonetic {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

.number-card-sk {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.number-card-note {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-bg);
    color: var(--color-primary);
    margin-top: var(--space-xs);
}

.number-card-note.note-exception {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.number-card-note.note-warning {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.number-card-combined {
    border-color: #ec4899;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, var(--color-bg) 100%);
    min-height: 120px;
}

.number-card-combined:hover {
    border-color: #db2777;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, var(--color-bg) 100%);
}

.number-card-combined .number-card-digit {
    color: #ec4899;
}

/* Numbers responsive */
@media (max-width: 992px) {
    .numbers-grid-new {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .numbers-grid-new {
        grid-template-columns: repeat(3, 1fr);
    }

    .number-card {
        min-height: 120px;
        padding: var(--space-md);
    }

    .number-card-digit {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .numbers-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* OLD STYLES - kept for compatibility */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-md);
}

.numbers-grid-teens {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.numbers-grid-tens {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.number-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    position: relative;
}

.number-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.number-item-exception {
    border-color: var(--color-warning);
    background: rgba(245, 158, 11, 0.05);
}

.number-item-warning {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

.number-digit {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 36px;
    text-align: center;
}

.number-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.number-en {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.number-phonetic {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

.number-sk {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.number-note {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-bg-hover);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: 2px;
}

.number-note.note-warning {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

/* Audio Button - Numbers */
.audio-btn-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.audio-btn-number:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.audio-btn-number.playing {
    background: var(--color-primary);
    color: white;
    animation: audioPulse 0.5s ease-in-out infinite;
}

@keyframes audioPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ==========================================================================
   INFO BOXES
   ========================================================================== */

.info-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius);
    background: var(--color-primary-bg);
    border-left: 3px solid var(--color-primary);
}

.info-box-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-box-content {
    flex: 1;
}

.info-box-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.info-box-purple {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: #8b5cf6;
}

.info-box-yellow {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
}

.info-box-pink {
    background: rgba(236, 72, 153, 0.1);
    border-left-color: #ec4899;
}

/* ==========================================================================
   TIP BOX & PRACTICE BOX
   ========================================================================== */

.tip-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, transparent 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-content h4 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.tip-content p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.practice-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    border: 1px dashed rgba(16, 185, 129, 0.4);
    margin-top: var(--space-lg);
}

.practice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.practice-content {
    flex: 1;
}

.practice-content strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--color-success);
}

.practice-content p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================================================
   QUICK REFERENCE GRID
   ========================================================================== */

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
}

.quick-ref-item {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    text-align: center;
}

.quick-ref-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.quick-ref-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.quick-ref-note {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   SPELLING EXAMPLES
   ========================================================================== */

.spelling-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.spelling-item {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    text-align: center;
}

.spelling-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.spelling-letters {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.spelling-pronunciation {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ==========================================================================
   COMBINED NUMBERS EXAMPLES
   ========================================================================== */

.combined-examples {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.combined-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.combined-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 36px;
    text-align: center;
}

.combined-en {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.85rem;
}

.combined-sk {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ==========================================================================
   SENTENCES LIST
   ========================================================================== */

/* Sentence Cards - New Design */
.sentences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.sentence-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: var(--space-xl);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--color-bg) 100%);
    border: 2px solid #10b981;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

.sentence-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, var(--color-bg) 100%);
}

.sentence-card.playing {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, var(--color-bg) 100%);
}

.sentence-card-en {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.5;
}

.sentence-card-divider {
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #10b981, transparent);
    margin: var(--space-md) 0;
    border-radius: 2px;
}

.sentence-card-sk {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-style: italic;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .sentences-grid {
        grid-template-columns: 1fr;
    }

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

    .sentence-card-en {
        font-size: 1.05rem;
    }
}

/* Old Sentence Styles - kept for compatibility */
.sentences-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.sentence-item {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius);
    border-left: 3px solid var(--color-primary);
}

.sentence-en {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.sentence-sk {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ==========================================================================
   MISTAKE ITEM DESCRIPTION (Alphabet/Numbers)
   ========================================================================== */

.mistake-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE - Alphabet & Numbers
   ========================================================================== */

@media (max-width: 768px) {
    .edu-card-header {
        flex-wrap: wrap;
    }

    .edu-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .edu-card-title h2 {
        font-size: 1.1rem;
    }

    .alphabet-grid,
    .alphabet-grid-simple {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

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

    .alphabet-card-letter {
        font-size: 2rem;
    }

    .alphabet-card-name {
        font-size: 0.9rem;
    }

    .alphabet-card-phonetic {
        font-size: 0.7rem;
    }

    .alphabet-card-word {
        font-size: 0.65rem;
    }

    .alphabet-letter {
        font-size: 1.75rem;
    }

    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .numbers-grid-teens,
    .numbers-grid-tens {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .quick-ref-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spelling-examples {
        grid-template-columns: 1fr;
    }

    .combined-examples {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-box,
    .tip-box,
    .practice-box {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .alphabet-grid,
    .alphabet-grid-simple {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }

    .alphabet-card {
        padding: var(--space-sm);
        gap: 4px;
    }

    .alphabet-card-letter {
        font-size: 1.75rem;
    }

    .alphabet-card-name {
        font-size: 0.8rem;
    }

    .alphabet-card-phonetic {
        font-size: 0.65rem;
    }

    .alphabet-card-word {
        font-size: 0.6rem;
    }

    .alphabet-item {
        padding: var(--space-sm);
    }

    .alphabet-letter {
        font-size: 1.5rem;
    }

    .numbers-grid,
    .numbers-grid-teens {
        grid-template-columns: repeat(2, 1fr);
    }

    .numbers-grid-tens {
        grid-template-columns: 1fr;
    }

    .combined-examples {
        grid-template-columns: 1fr;
    }

    .quick-ref-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   DARK MODE - Alphabet & Numbers
   ========================================================================== */

[data-theme="dark"] .edu-card {
    background: var(--color-bg-card);
}

[data-theme="dark"] .edu-definition {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
}

[data-theme="dark"] .alphabet-card {
    background: var(--color-bg);
}

[data-theme="dark"] .alphabet-card:hover {
    background: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .alphabet-item,
[data-theme="dark"] .number-item,
[data-theme="dark"] .spelling-item,
[data-theme="dark"] .combined-item,
[data-theme="dark"] .quick-ref-item,
[data-theme="dark"] .sentence-item {
    background: var(--color-bg);
}

[data-theme="dark"] .info-box-purple {
    background: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .info-box-yellow {
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .info-box-pink {
    background: rgba(236, 72, 153, 0.15);
}

[data-theme="dark"] .tip-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .practice-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, transparent 100%);
}

/* ==========================================================================
   DEV TOOLS - Diagnostic Panel (Professional Production Ready)
   ========================================================================== */

/* ═══════════════════════════════════════════════════════════════
   COLLAPSIBLE DEV TOOLS PANEL - Apple-inspired Accordion
   ═══════════════════════════════════════════════════════════════ */
.dev-tools-panel {
    margin-top: var(--space-lg);
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dev-tools-panel:hover {
    border-color: rgba(99, 102, 241, 0.35);
}

.dev-tools-panel.expanded {
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Header as clickable button */
.dev-tools-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 0.625rem var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dev-tools-header:hover {
    background: rgba(0, 0, 0, 0.4);
}

.dev-tools-header:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.dev-tools-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    flex-shrink: 0;
}

.dev-tools-title {
    flex: 1;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dev-tools-meta {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-weight: 400;
    margin-right: var(--space-xs);
}

.dev-tools-chevron {
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.dev-tools-panel.expanded .dev-tools-chevron {
    transform: rotate(180deg);
}

/* Collapsible content */
.dev-tools-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dev-tools-panel.expanded .dev-tools-content {
    max-height: 2000px;
}

/* Actions bar inside content */
.dev-tools-actions {
    display: flex;
    justify-content: flex-end;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.15);
}

.dev-tools-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius);
    color: #f87171;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dev-tools-reset:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    transform: translateY(-1px);
}

.dev-tools-reset:active {
    transform: translateY(0);
}

.dev-tools-reset:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dev-tools-reset svg {
    stroke: currentColor;
}

.dev-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(99, 102, 241, 0.1);
}

.dev-tools-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-md) var(--space-sm);
    background: linear-gradient(180deg, rgba(15, 15, 35, 0.8) 0%, rgba(26, 26, 46, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.dev-tools-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.dev-stat-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.dev-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-variant-numeric: tabular-nums;
}

.dev-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-stat-detail {
    font-size: 0.6rem;
    color: rgba(99, 102, 241, 0.7);
    text-align: center;
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stat-specific colors */
.dev-tools-stat:nth-child(1) .dev-stat-value { color: #a78bfa; }
.dev-tools-stat:nth-child(2) .dev-stat-value { color: #fb923c; }
.dev-tools-stat:nth-child(3) .dev-stat-value { color: #60a5fa; }
.dev-tools-stat:nth-child(4) .dev-stat-value { color: #34d399; }

/* Dev Tools Sections */
.dev-tools-section {
    border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.dev-tools-section:first-of-type {
    border-top: none;
}

.dev-tools-section-title {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(99, 102, 241, 0.6);
    background: rgba(0, 0, 0, 0.2);
}

/* Grid variants */
.dev-tools-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.dev-tools-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dev-tools-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Warning state */
.dev-stat-warning {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.25) 100%) !important;
}

.dev-stat-warning .dev-stat-value {
    color: #fca5a5 !important;
}

.dev-stat-warning .dev-stat-label {
    color: rgba(252, 165, 165, 0.7);
}

/* Correct state */
.dev-stat-correct {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%) !important;
}

.dev-stat-correct .dev-stat-value {
    color: #6ee7b7 !important;
}

.dev-stat-correct .dev-stat-label {
    color: rgba(110, 231, 183, 0.7);
}

/* Responsive - stack on mobile */
@media (max-width: 600px) {
    .dev-tools-grid,
    .dev-tools-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-tools-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .dev-tools-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-tools-stat {
        padding: var(--space-sm);
    }

    .dev-stat-value {
        font-size: 1.25rem;
    }

    .dev-stat-detail {
        font-size: 0.55rem;
    }
}

/* Light theme adjustments */
[data-theme="light"] .dev-tools-panel {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
    border-color: rgba(99, 102, 241, 0.4);
}

[data-theme="light"] .dev-tools-stat {
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.9) 0%, rgba(49, 46, 129, 0.95) 100%);
}

/* ==========================================================================
   APPLE-STYLE MODAL - Premium Confirmation Dialog
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: var(--space-xl);
    text-align: center;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-icon {
    margin-bottom: var(--space-lg);
}

.modal-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    border-radius: 50%;
    color: #6366f1;
    box-shadow:
        0 4px 12px rgba(99, 102, 241, 0.2),
        inset 0 -2px 4px rgba(99, 102, 241, 0.1);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 var(--space-sm) 0;
    letter-spacing: -0.02em;
}

.modal-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 var(--space-lg) 0;
}

.modal-description strong {
    color: #475569;
    font-weight: 600;
}

.modal-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.modal-info-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: 0.85rem;
    color: #475569;
}

.modal-info-row:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.modal-info-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.modal-info-text {
    flex: 1;
    text-align: left;
}

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

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #64748b;
}

.modal-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #475569;
}

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

.modal-btn-confirm {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.modal-btn-confirm:hover {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.modal-btn-confirm:active {
    transform: scale(0.98) translateY(0);
}

.modal-btn-confirm:disabled {
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.modal-btn-confirm .btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    animation: modalSpin 0.8s linear infinite;
}

.modal-btn-confirm.loading .btn-text {
    opacity: 0;
}

.modal-btn-confirm.loading .btn-loader {
    opacity: 1;
    visibility: visible;
}

.modal-btn-confirm.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

@keyframes modalSpin {
    to { transform: rotate(360deg); }
}

/* Dark theme */
[data-theme="dark"] .modal-container {
    background: rgba(30, 41, 59, 0.95);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-title {
    color: #f1f5f9;
}

[data-theme="dark"] .modal-description {
    color: #94a3b8;
}

[data-theme="dark"] .modal-description strong {
    color: #cbd5e1;
}

[data-theme="dark"] .modal-icon-circle {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(79, 70, 229, 0.3) 100%);
    color: #a5b4fc;
}

[data-theme="dark"] .modal-info {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .modal-info-row {
    color: #cbd5e1;
}

[data-theme="dark"] .modal-info-row:not(:last-child) {
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .modal-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

[data-theme="dark"] .modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .modal-overlay {
        padding: var(--space-md);
        align-items: flex-end;
    }

    .modal-container {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
    }

    .modal-overlay.active .modal-container {
        transform: scale(1) translateY(0);
    }

    .modal-container {
        transform: scale(1) translateY(100%);
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-btn {
        padding: 16px 20px;
    }
}

/* ==========================================================================
   PROFILE PAGE V2 - "Tvoj Príbeh Učenia" - Profile with Soul
   ========================================================================== */

.profile-page-v2 {
    padding-bottom: 60px;
}

/* HERO SECTION */
.profile-hero {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    padding: 40px 32px;
    min-height: 280px;
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ffecd2 100%);
    background-size: 200% 200%;
    animation: heroGradient 15s ease infinite;
    z-index: 0;
}

[data-theme="dark"] .profile-hero-bg {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
}

@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.profile-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Greeting */
.profile-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.greeting-icon {
    font-size: 2rem;
}

.greeting-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
}

[data-theme="dark"] .greeting-text {
    color: #fff;
}

/* Quote */
.profile-quote {
    font-size: 1rem;
    font-style: italic;
    color: rgba(26, 26, 46, 0.7);
    margin-bottom: 28px;
    max-width: 400px;
}

[data-theme="dark"] .profile-quote {
    color: rgba(255, 255, 255, 0.7);
}

/* Tree Visual */
.profile-tree-visual {
    margin-bottom: 28px;
}

.tree-journey {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .tree-journey {
    background: rgba(0, 0, 0, 0.3);
}

.tree-stage {
    font-size: 1.5rem;
    opacity: 0.4;
    transition: all 0.3s ease;
    padding: 0 4px;
}

.tree-stage.past,
.tree-stage.done {
    opacity: 0.6;
}

.tree-stage.current {
    opacity: 1;
    font-size: 2rem;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
    animation: treePulse 2s ease-in-out infinite;
}

@keyframes treePulse {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
}

.tree-line {
    width: 24px;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.tree-line.done {
    background: linear-gradient(90deg, #10b981, #34d399);
}

[data-theme="dark"] .tree-line {
    background: rgba(255, 255, 255, 0.15);
}

.tree-message {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981;
}

[data-theme="dark"] .tree-message {
    color: #34d399;
}

/* Hero Stats */
.profile-hero-stats {
    display: flex;
    gap: 32px;
}

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

.hero-stat-icon {
    font-size: 1.25rem;
}

.hero-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
}

[data-theme="dark"] .hero-stat-value {
    color: #fff;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: rgba(26, 26, 46, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .hero-stat-label {
    color: rgba(255, 255, 255, 0.6);
}

/* SECTIONS */
.profile-section {
    margin-bottom: 28px;
}

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

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.perfect-week-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* MASTERY GRID */
.mastery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mastery-card {
    background: var(--color-bg-card);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    border: 1px solid rgba(128, 128, 128, 0.1);
    transition: all 0.3s ease;
}

.mastery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .mastery-card {
    border-color: rgba(255, 255, 255, 0.06);
}

/* Mastery Circle */
.mastery-circle {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
}

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

.mastery-circle .circle-bg {
    fill: none;
    stroke: var(--color-bg-hover);
    stroke-width: 3;
}

.mastery-circle .circle-progress {
    fill: none;
    stroke: var(--color, #10b981);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.mastery-circle-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mastery-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
}

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

.mastery-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.mastery-message {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Tenses Display */
.mastery-tenses {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 20px 0;
}

.tense-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.tense-box.done {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* HEATMAP */
.profile-heatmap {
    background: var(--color-bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] .profile-heatmap {
    border-color: rgba(255, 255, 255, 0.06);
}

.heatmap-week {
    margin-bottom: 16px;
}

.heatmap-week:last-child {
    margin-bottom: 0;
}

.heatmap-week-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.heatmap-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.heatmap-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.heatmap-day-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.heatmap-day-cell {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    position: relative;
    transition: all 0.2s ease;
    background: var(--color-bg-hover);
    color: var(--color-text-muted);
}

.heatmap-day.active .heatmap-day-cell {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Missed state - frozen day waiting to be melted ❄️ (matches dashboard) */
.heatmap-day.missed .heatmap-day-cell {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.heatmap-day.missed .heatmap-day-name {
    color: #06b6d4;
}

.heatmap-day.missed:hover .heatmap-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.heatmap-day.today .heatmap-day-cell {
    border: 2px solid var(--color-primary);
    background: var(--color-primary-bg);
}

.heatmap-day.today.active .heatmap-day-cell {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
}

.heatmap-day.future .heatmap-day-cell {
    opacity: 0.3;
}

.heatmap-day.inactive .heatmap-day-cell {
    opacity: 0.2;
}

/* Covered state - melted day (freeze used) 🔥 (matches dashboard) */
.heatmap-day.covered .heatmap-day-cell {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.heatmap-day.covered .heatmap-day-name {
    color: #f97316;
}

.heatmap-day.covered:hover .heatmap-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* Burned state - study day used as freeze payment 💫 (matches dashboard) */
.heatmap-day.burned .heatmap-day-cell {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.heatmap-day.burned .heatmap-day-name {
    color: #8b5cf6;
}

.heatmap-day.burned:hover .heatmap-day-cell {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.today-pulse {
    position: absolute;
    inset: -4px;
    border: 2px solid var(--color-primary);
    border-radius: 14px;
    animation: todayPulse 2s ease infinite;
}

@keyframes todayPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* Dark mode adjustments for heatmap */
[data-theme="dark"] .heatmap-day.missed .heatmap-day-cell {
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

[data-theme="dark"] .heatmap-day.covered .heatmap-day-cell {
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

[data-theme="dark"] .heatmap-day.burned .heatmap-day-cell {
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .heatmap-day.active .heatmap-day-cell {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.streak-motivation {
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--color-text);
    text-align: center;
}

/* TWO COLUMN LAYOUT */
.profile-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-card {
    background: var(--color-bg-card);
    border-radius: 20px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    overflow: hidden;
}

[data-theme="dark"] .profile-card {
    border-color: rgba(255, 255, 255, 0.06);
}

.profile-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

.profile-card .card-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.profile-card .card-body {
    padding: 20px;
}

.achievement-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg-hover);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Achievements Mini Grid */
.achievements-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.achievements-mini-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.achievement-mini {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.2) 100%);
    transition: transform 0.2s ease;
}

.achievement-mini:hover {
    transform: scale(1.1);
}

/* Achievement Next */
.achievement-next {
    margin-top: 8px;
}

.achievement-next-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-bg-hover);
    border-radius: 12px;
}

.achievement-next-icon {
    font-size: 1.5rem;
}

.achievement-next-info {
    flex: 1;
}

.achievement-next-name {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.achievement-next-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement-next-progress .progress-bar {
    flex: 1;
    height: 6px;
}

.achievement-next-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Journey Path */
.journey-path-visual {
    text-align: center;
    margin-bottom: 20px;
}

.path-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 12px;
}

.path-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.path-dot {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.path-point.done .path-dot {
    color: #10b981;
}

.path-point.current .path-dot {
    color: var(--color-primary);
    font-size: 1.5rem;
    animation: pathPulse 1.5s ease infinite;
}

@keyframes pathPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.path-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.path-point.current .path-label {
    color: var(--color-primary);
}

.path-line {
    width: 40px;
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
    margin: 0 4px;
}

.path-line.done {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.path-position {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

.next-milestone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

.milestone-icon {
    font-size: 1.5rem;
}

.milestone-text {
    font-size: 0.85rem;
    color: var(--color-text);
}

.journey-fact {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-align: center;
    padding: 12px;
    background: var(--color-bg-hover);
    border-radius: 10px;
}

/* STATS GRID V2 */
.stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-item-v2 {
    background: var(--color-bg-card);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid rgba(128, 128, 128, 0.1);
    transition: all 0.3s ease;
}

.stat-item-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .stat-item-v2 {
    border-color: rgba(255, 255, 255, 0.06);
}

.stat-value-v2 {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
}

.stat-label-v2 {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-insight {
    margin-top: 16px;
    padding: 14px 20px;
    background: var(--color-bg-card);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-align: center;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] .stats-insight {
    border-color: rgba(255, 255, 255, 0.06);
}

/* MOTIVATION SECTION */
.profile-motivation {
    margin-top: 12px;
}

.motivation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.motivation-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.motivation-text {
    position: relative;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
    line-height: 1.5;
}

.motivation-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #fff;
    color: #667eea;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.motivation-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    color: #667eea;
}

.motivation-cta svg {
    margin-left: 2px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .profile-hero {
        padding: 28px 20px;
        border-radius: 20px;
        margin-bottom: 24px;
    }

    .greeting-text {
        font-size: 1.35rem;
    }

    .profile-quote {
        font-size: 0.9rem;
    }

    .tree-journey {
        padding: 12px 16px;
    }

    .tree-stage {
        font-size: 1.25rem;
    }

    .tree-stage.current {
        font-size: 1.5rem;
    }

    .tree-line {
        width: 16px;
    }

    .profile-hero-stats {
        gap: 20px;
    }

    .hero-stat-value {
        font-size: 1.25rem;
    }

    .mastery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mastery-card {
        padding: 20px 16px;
    }

    .profile-two-col {
        grid-template-columns: 1fr;
    }

    .stats-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-item-v2 {
        padding: 16px 12px;
    }

    .stat-value-v2 {
        font-size: 1.25rem;
    }

    .motivation-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .motivation-text {
        font-size: 1.1rem;
    }

    .motivation-cta {
        padding: 14px 28px;
        font-size: 0.95rem;
    }

    .heatmap-day-cell {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .heatmap-days {
        gap: 6px;
    }
}

/* ==========================================================================
   STUDY PAGE V3 - Apple-Style Minimalist Interface
   ========================================================================== */

.study-page-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Desktop: account for fixed header (64px) + spacing */
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-xl) var(--space-lg);
    min-height: calc(100vh - 120px);
}

/* STUDY HERO */
.study-hero {
    width: 100%;
    max-width: 540px;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.study-hero-content {
    padding: var(--space-lg) 0;
}

.study-greeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.study-greeting-text {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.study-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(249, 115, 22, 0.2) 100%);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #f97316;
}

.study-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.study-title .title-count {
    color: var(--color-primary);
}

/* Hero number - prominent */
.study-title .js-cards-remaining-hero {
    color: var(--color-primary);
    font-weight: 800;
}

/* "z X" context - subtle */
.study-title .hero-context {
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.75em;
    opacity: 0.7;
}

/* Hero label - simple text after number */
.study-title .hero-label {
    font-weight: 400;
    color: var(--color-text-secondary);
    font-size: 0.9em;
}

/* SEGMENT CONTROL - Apple Style */
.study-type-section {
    width: 100%;
    max-width: 540px;
    margin-bottom: var(--space-xl);
}

.study-segment-control {
    display: flex;
    background: var(--color-bg-card);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .study-segment-control {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.segment-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.segment-item:hover {
    color: var(--color-text);
    background: rgba(128, 128, 128, 0.08);
}

.segment-item.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.segment-label {
    white-space: nowrap;
}

.segment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 600;
}

.segment-item.active .segment-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* STUDY CARD AREA */
.study-card-area {
    width: 100%;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* FLASHCARD ENHANCEMENTS */
.study-page-v3 .flashcard-container {
    width: 100%;
    max-width: 500px;
}

.study-page-v3 .flashcard {
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(128, 128, 128, 0.08);
}

[data-theme="dark"] .study-page-v3 .flashcard {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.study-page-v3 .flashcard-face {
    border-radius: 24px;
    padding: var(--space-xl);
}

/* Card Header - Cleaner */
.study-page-v3 .card-header {
    margin-bottom: var(--space-lg);
}

.study-page-v3 .card-type-badge {
    display: inline-flex;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
}

/* Word Display - Premium */
.study-page-v3 .word-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.study-page-v3 .card-translation {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-sm);
}

/* Flip Button - Refined */
.study-page-v3 .btn-flip {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.study-page-v3 .btn-flip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

/* Rating Buttons - Apple Style */
.study-page-v3 .rating-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: var(--space-md);
}

.study-page-v3 .btn-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    min-height: 70px;
    border-radius: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.study-page-v3 .btn-again {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.study-page-v3 .btn-again:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.study-page-v3 .btn-hard {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.2);
}

.study-page-v3 .btn-hard:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.study-page-v3 .btn-good {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.study-page-v3 .btn-good:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.study-page-v3 .btn-easy {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.15) 100%);
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.2);
}

.study-page-v3 .btn-easy:hover {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.study-page-v3 .rating-label {
    font-size: 0.8rem;
}

.study-page-v3 .rating-interval {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Progress Bar - Sleeker */
.study-page-v3 .study-progress {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(128, 128, 128, 0.08);
}

.study-page-v3 .progress-bar {
    height: 6px;
    background: var(--color-bg-hover);
    border-radius: 3px;
    overflow: hidden;
}

.study-page-v3 .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, #7c3aed 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.study-page-v3 .progress-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* COMPLETE CARD - Empty State */
.study-complete-card {
    background: var(--color-bg-card);
    border-radius: 24px;
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    border: 1px solid rgba(128, 128, 128, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 440px;
}

[data-theme="dark"] .study-complete-card {
    border-color: rgba(255, 255, 255, 0.06);
}

.complete-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    animation: celebratePop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes celebratePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.complete-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--space-sm) 0;
}

.complete-message {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.complete-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(128, 128, 128, 0.08);
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

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

.complete-stat .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
}

.complete-stat .stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.complete-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.btn-complete-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-complete-secondary:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-complete-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-complete-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
    color: #fff;
}

/* SESSION COMPLETE OVERLAY */
.session-complete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-xl);
    animation: fadeIn 0.3s ease;
}

.session-complete-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.session-complete-card {
    background: var(--color-bg-card);
    border-radius: 24px;
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.session-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--space-sm) 0;
}

.session-stats {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

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

.btn-session-secondary {
    padding: 12px 24px;
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-session-secondary:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-session-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-session-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
    color: #fff;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .study-page-v3 {
        /* 52px = mobile header height + spacing */
        padding: calc(52px + var(--space-lg)) var(--space-md) var(--space-md);
    }

    .study-hero {
        margin-bottom: var(--space-lg);
    }

    .study-greeting-text {
        font-size: 1.1rem;
    }

    .study-streak-badge {
        font-size: 0.95rem;
        padding: 5px 12px;
    }

    .study-title {
        font-size: 1.75rem;
    }

    .study-segment-control {
        flex-wrap: wrap;
    }

    .segment-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .segment-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }

    .study-page-v3 .flashcard-face {
        padding: var(--space-lg);
    }

    .study-page-v3 .word-text {
        font-size: 1.6rem;
    }

    .study-page-v3 .rating-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .study-page-v3 .btn-rating {
        padding: 12px 8px;
    }

    .complete-stats {
        gap: var(--space-xl);
    }

    .complete-actions {
        flex-direction: column;
    }

    .session-complete-card {
        padding: var(--space-2xl) var(--space-lg);
    }

    .session-actions {
        flex-direction: column;
    }

    /* Rating Help Tooltip - Mobile Fullscreen */
    .rating-help-tooltip {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        width: calc(100vw - 32px);
        max-width: 400px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    .rating-help-tooltip.visible {
        animation: tooltipFadeInMobile 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes tooltipFadeInMobile {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    .rating-help-content::after {
        display: none;
    }

    .rating-help-header {
        padding: 18px 20px;
        font-size: 1.1rem;
    }

    .rating-help-close {
        width: 36px;
        height: 36px;
        font-size: 1.35rem;
    }

    .rating-help-items {
        padding: 18px 16px;
    }

    .rating-help-item {
        padding: 16px;
        gap: 16px;
    }

    .rating-help-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .rating-help-text strong {
        font-size: 1.1rem;
    }

    .rating-help-text span {
        font-size: 0.95rem;
    }

    .rating-help-progress {
        padding: 20px 16px;
    }

    .rating-help-progress .progress-title {
        font-size: 0.85rem;
        margin-bottom: 18px;
    }

    .progress-timeline {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-around;
    }

    .timeline-step {
        min-width: 55px;
        gap: 6px;
    }

    .timeline-arrow {
        display: none;
    }

    .step-dot {
        width: 18px;
        height: 18px;
    }

    .step-label {
        font-size: 0.85rem;
    }

    .step-time {
        font-size: 0.75rem;
    }

    .rating-help-footer {
        padding: 16px 20px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   CONSTRUCTIONS PAGE V2 - Interactive Examples Layout
   40 constructions × 10 examples with expandable cards
   ========================================================================== */

.constructions-page-v2 {
    padding-bottom: var(--space-xl);
}

.constructions-list-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Construction Card V2 */
.construction-card-v2 {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.construction-card-v2:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .construction-card-v2 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .construction-card-v2:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Construction Header */
.construction-header {
    display: flex;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
    min-height: 100px;
}

.construction-header:hover {
    background: rgba(99, 102, 241, 0.04);
}

[data-theme="dark"] .construction-header:hover {
    background: rgba(99, 102, 241, 0.08);
}

.construction-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #4f46e5));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius);
    flex-shrink: 0;
    align-self: stretch;
}

/* Main Content Area */
.construction-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-sm);
    min-width: 0;
}

/* Pattern Row */
.construction-pattern-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.pattern-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.pattern-text-sk {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Example Row - Clickable to Play */
.construction-example-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(99, 102, 241, 0.06);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.construction-example-row:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

.construction-example-row:active {
    transform: scale(0.99);
}

.construction-example-row.playing {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.construction-example-row.playing .example-play-icon {
    animation: playPulse 0.8s ease-in-out infinite;
}

.construction-example-row.playing .example-en-main {
    color: var(--color-primary);
}

[data-theme="dark"] .construction-example-row {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .construction-example-row:hover {
    background: rgba(99, 102, 241, 0.18);
}

/* Play Icon */
.example-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.construction-example-row:hover .example-play-icon {
    transform: scale(1.1);
}

/* Example Texts */
.example-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.example-en-main {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.example-sk-main {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Tags Row */
.construction-tags {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Right Side */
.construction-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* Legacy support */
.construction-main {
    flex: 1;
    min-width: 0;
}

.construction-pattern {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pattern-en {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.pattern-sk {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.construction-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.construction-category {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.construction-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.btn-play-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #4f46e5));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-play-main:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-play-main:active {
    transform: scale(0.95);
}

.btn-play-main.playing {
    animation: playPulse 0.8s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); }
    50% { transform: scale(1.1); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5); }
}

/* Inline Play Button - positioned next to text */
.btn-play-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #4f46e5));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    margin-left: var(--space-sm);
    flex-shrink: 0;
}

.btn-play-inline:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-play-inline:active {
    transform: scale(0.92);
}

.btn-play-inline.playing {
    animation: playPulse 0.8s ease-in-out infinite;
}

.status-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.status-badge.new {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
}

.status-badge.learning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.status-badge.review {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge.mastered {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

[data-theme="dark"] .status-badge.new { color: #9ca3af; }
[data-theme="dark"] .status-badge.learning { color: #fbbf24; }
[data-theme="dark"] .status-badge.review { color: #60a5fa; }
[data-theme="dark"] .status-badge.mastered { color: #34d399; }

.expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--color-text-muted);
    transition: transform 0.3s ease;
}

.construction-card-v2.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Active/Expanded Card - Pastel Green */
.construction-card-v2.expanded {
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.12) 0%, rgba(74, 222, 128, 0.08) 100%);
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.1);
}

.construction-card-v2.expanded .construction-header {
    background: transparent;
}

[data-theme="dark"] .construction-card-v2.expanded {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.06) 100%);
    border-color: rgba(74, 222, 128, 0.25);
}

/* Expandable Examples Section */
.construction-examples {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(99, 102, 241, 0.02);
    border-top: 1px solid transparent;
}

[data-theme="dark"] .construction-examples {
    background: rgba(99, 102, 241, 0.04);
}

.construction-card-v2.expanded .construction-examples {
    border-top-color: var(--color-border);
}

/* Examples Section */
.examples-section {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.examples-section:last-of-type {
    border-bottom: none;
}

/* Section Header - Centered & Compact */
.construction-examples .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.03) 100%);
    border-radius: var(--radius);
    text-align: center;
}

.construction-examples .section-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 2px;
}

.construction-examples .section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.construction-examples .section-title-en {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-left: 0;
}

/* Removed bullet - now centered layout */

/* Examples Grid - Single Column, Compact */
.examples-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Example Card - Icon Left, Text Right, Whole Block Centered */
.example-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.example-card:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12);
    transform: translateY(-1px);
}

.example-card:active {
    transform: scale(0.99);
}

.example-card.playing {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.example-card.played {
    animation: examplePlayed 0.3s ease;
}

@keyframes examplePlayed {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.example-card.example-main {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.example-card.example-main:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.04) 100%);
}

/* Dark mode */
[data-theme="dark"] .example-card:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Hide default order - we use column layout now */
.example-card .example-text {
    order: unset;
}

.example-card .example-audio-icon {
    order: unset;
}

/* Play Icon - Left side, compact */
.example-audio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #4f46e5));
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.example-audio-icon svg {
    width: 18px;
    height: 18px;
}

.example-card:hover .example-audio-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.example-card.playing .example-audio-icon {
    animation: audioIconPulse 0.8s ease-in-out infinite;
}

@keyframes audioIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* Text Area - Left aligned, auto width for centering */
.example-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}

/* English sentence - Clear & Bold */
.example-en {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}

/* Slovak translation - Visible */
.example-sk {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Playing state */
.example-card.playing .example-en {
    color: var(--color-primary);
}

/* Mobile */
@media (max-width: 768px) {
    .example-card {
        padding: var(--space-xs) var(--space-sm);
        gap: 6px;
    }

    .example-audio-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .example-audio-icon svg {
        width: 14px;
        height: 14px;
    }

    .example-en {
        font-size: 1rem;
    }

    .example-sk {
        font-size: 0.85rem;
    }
}

/* Construction CTA */
.construction-cta {
    display: flex;
    justify-content: center;
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.construction-cta .btn {
    min-width: 200px;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .construction-header {
        padding: var(--space-md);
        gap: var(--space-sm);
        min-height: auto;
    }

    .construction-number {
        width: 40px;
        min-width: 40px;
        font-size: 0.95rem;
    }

    .construction-content {
        gap: var(--space-xs);
    }

    .pattern-text {
        font-size: 1.05rem;
    }

    .pattern-text-sk {
        font-size: 0.85rem;
    }

    .construction-example-row {
        padding: var(--space-xs) var(--space-sm);
    }

    .example-play-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .example-play-icon svg {
        width: 14px;
        height: 14px;
    }

    .example-en-main {
        font-size: 0.9rem;
    }

    .example-sk-main {
        font-size: 0.8rem;
    }

    .construction-end {
        flex-direction: row;
        align-items: center;
    }

    .construction-main {
        flex: 1 1 calc(100% - 120px);
    }

    .pattern-en {
        font-size: 1rem;
    }

    .pattern-sk {
        font-size: 0.85rem;
    }

    .construction-actions {
        flex-shrink: 0;
    }

    .btn-play-main {
        width: 40px;
        height: 40px;
    }

    .btn-play-inline {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

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

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

    .example-audio-icon {
        width: 32px;
        height: 32px;
    }

    .example-en {
        font-size: 0.9rem;
    }

    .example-sk {
        font-size: 0.8rem;
    }
}

/* Animations for newly loaded constructions */
.construction-card-v2 {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.construction-card-v2:nth-child(1) { animation-delay: 0.05s; }
.construction-card-v2:nth-child(2) { animation-delay: 0.1s; }
.construction-card-v2:nth-child(3) { animation-delay: 0.15s; }
.construction-card-v2:nth-child(4) { animation-delay: 0.2s; }
.construction-card-v2:nth-child(5) { animation-delay: 0.25s; }
.construction-card-v2:nth-child(6) { animation-delay: 0.3s; }
.construction-card-v2:nth-child(7) { animation-delay: 0.35s; }
.construction-card-v2:nth-child(8) { animation-delay: 0.4s; }
.construction-card-v2:nth-child(9) { animation-delay: 0.45s; }
.construction-card-v2:nth-child(10) { animation-delay: 0.5s; }
