/* ============================================
   VOCABMASTER - COMPLETE STYLESHEET
   Modern Vocabulary Learning Platform
   ============================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    
    --border-light: #334155;
    --border-medium: #475569;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition-base), color var(--transition-base);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
}

.hidden {
    display: none !important;
}

/* ==================== LOADING SCREEN ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

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

.nav-link.active {
    background: var(--primary);
    color: white;
}

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

.nav-text {
    display: block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    transition: all var(--transition-fast);
}

.user-btn:hover {
    background: var(--bg-hover);
}

.user-avatar {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-level {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

[data-theme="dark"] .user-level {
    background: var(--primary);
    color: white;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 100;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.25rem 0;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* Mobile Navigation */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.mobile-nav.show {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.mobile-close-btn {
    margin-left: auto;
    font-size: 2rem;
    color: var(--text-secondary);
}

.mobile-nav-links {
    padding: 1rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--primary);
    color: white;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    margin-top: 64px;
    padding: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.page {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-xl {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

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

.filter-select {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

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

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

/* ==================== LANDING PAGE ==================== */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

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

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

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

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-card {
    position: absolute;
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 3s ease-in-out infinite;
}

.card-1 { top: 10%; left: 10%; animation-delay: 0s; }
.card-2 { top: 40%; right: 5%; animation-delay: 1s; }
.card-3 { bottom: 15%; left: 20%; animation-delay: 2s; }

.card-icon { font-size: 2rem; }
.card-text { font-weight: 600; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.features-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* ==================== AUTH PAGES ==================== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 128px);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-error {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    color: var(--danger);
    text-align: center;
    font-size: 0.875rem;
}

/* ==================== DASHBOARD ==================== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-banner {
    background: var(--gradient-primary);
    padding: 2rem;
    border-radius: var(--radius-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    color: white;
}

.welcome-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
}

.streak-icon { font-size: 2rem; }

.streak-info {
    text-align: center;
}

.streak-count {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.streak-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.xp-card .stat-icon { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.words-card .stat-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.today-card .stat-icon { background: linear-gradient(135deg, #10b981, #06b6d4); }
.accuracy-card .stat-icon { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.level-progress {
    margin-top: 0.5rem;
}

.level-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.level-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.quick-start-section,
.word-of-day-section,
.categories-preview {
    margin-bottom: 2rem;
}

.quick-start-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.quick-start-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: left;
}

.quick-start-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.qs-icon {
    font-size: 2.5rem;
}

.qs-content {
    flex: 1;
}

.qs-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.qs-arrow {
    font-size: 1.5rem;
    color: var(--text-tertiary);
}

.wotd-card {
    background: var(--gradient-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    color: white;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.wotd-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.wotd-word {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.wotd-pronunciation {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.wotd-meaning {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.wotd-translation {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.wotd-example {
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.wotd-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.category-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-light);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

/* ==================== FLASHCARDS ==================== */
.flashcards-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.flashcards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.fh-left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

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

.flashcard-stage {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.flashcard-deck {
    flex: 1;
    perspective: 1000px;
}

.flashcard {
    width: 100%;
    height: 400px;
    cursor: pointer;
}

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

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

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.flashcard-front {
    background: var(--gradient-primary);
    color: white;
}

.card-status-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.card-word {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.card-pronunciation {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.play-sound-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    margin-bottom: 1.5rem;
}

.play-sound-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.flip-hint {
    font-size: 0.875rem;
    opacity: 0.7;
}

.flashcard-back {
    background: var(--bg-card);
    transform: rotateY(180deg);
    border: 1px solid var(--border-light);
    text-align: left;
    overflow-y: auto;
}

.back-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.card-meaning,
.card-translation {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.card-example-box {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    width: 100%;
}

.card-example-box h4 {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.card-example {
    font-style: italic;
}

.card-memory-tip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 1rem;
    border-radius: var(--radius-md);
    width: 100%;
}

[data-theme="dark"] .card-memory-tip {
    background: linear-gradient(135deg, #78350f, #92400e);
}

.card-memory-tip h4 {
    font-size: 0.75rem;
    color: #92400e;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .card-memory-tip h4 {
    color: #fbbf24;
}

.flashcard-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.flashcard-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.session-progress {
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.session-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.session-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ss-icon {
    font-size: 1.25rem;
}

/* ==================== QUIZ ==================== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.quiz-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.quiz-score-display {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 1.125rem;
}

.quiz-progress-text {
    background: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.quiz-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quiz-type-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.quiz-type-btn:hover {
    border-color: var(--primary);
}

.quiz-type-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quiz-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-question {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.quiz-word {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quiz-option {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-option:hover:not(.correct):not(.incorrect):not(:disabled) {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.quiz-option.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.quiz-option.incorrect {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.quiz-fill-blank {
    margin-top: 1.5rem;
}

.quiz-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

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

.quiz-feedback {
    text-align: center;
    padding: 2rem;
}

.feedback-content {
    margin-bottom: 1.5rem;
}

.feedback-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.feedback-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feedback-explanation {
    color: var(--text-secondary);
}

.quiz-results {
    text-align: center;
    padding: 3rem;
}

.results-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

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

.result-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
}

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

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==================== PRACTICE ==================== */
.practice-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem;
}

.practice-header {
    margin-bottom: 2rem;
}

.practice-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.practice-modes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.practice-mode-btn {
    padding: 0.625rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.practice-mode-btn:hover {
    border-color: var(--primary);
}

.practice-mode-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.practice-section {
    display: none;
}

.practice-section.active {
    display: block;
}

.practice-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.practice-word-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.practice-word {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.practice-instruction {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.practice-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    color: var(--text-primary);
    resize: none;
    margin-bottom: 1rem;
}

.practice-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.practice-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.practice-feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.feedback-result {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* Listening Practice */
.listening-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.play-audio-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.sound-waves {
    display: flex;
    gap: 4px;
    height: 40px;
    align-items: center;
}

.sound-waves span {
    width: 4px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
    animation: wave 0.5s ease-in-out infinite;
}

.sound-waves span:nth-child(1) { animation-delay: 0s; }
.sound-waves span:nth-child(2) { animation-delay: 0.1s; }
.sound-waves span:nth-child(3) { animation-delay: 0.2s; }
.sound-waves span:nth-child(4) { animation-delay: 0.3s; }
.sound-waves span:nth-child(5) { animation-delay: 0.4s; }
.sound-waves span:nth-child(6) { animation-delay: 0.5s; }

.sound-waves.paused span {
    animation-play-state: paused;
    height: 4px;
}

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

.listening-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.listening-option {
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.listening-option:hover {
    border-color: var(--primary);
}

.listening-option.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.listening-option.incorrect {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Speaking Practice */
.speaking-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mic-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    font-size: 2.5rem;
    transition: all var(--transition-base);
}

.mic-button:hover {
    transform: scale(1.05);
}

.mic-button.recording {
    background: var(--gradient-danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
}

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

.mic-waves {
    display: flex;
    gap: 3px;
    height: 30px;
    align-items: center;
}

.mic-waves span {
    width: 3px;
    height: 5px;
    background: var(--primary);
    border-radius: 2px;
}

.mic-waves.active span {
    animation: micWave 0.3s ease-in-out infinite;
}

.mic-waves span:nth-child(1) { animation-delay: 0s; }
.mic-waves span:nth-child(2) { animation-delay: 0.05s; }
.mic-waves span:nth-child(3) { animation-delay: 0.1s; }
.mic-waves span:nth-child(4) { animation-delay: 0.15s; }
.mic-waves span:nth-child(5) { animation-delay: 0.2s; }
.mic-waves span:nth-child(6) { animation-delay: 0.25s; }
.mic-waves span:nth-child(7) { animation-delay: 0.3s; }
.mic-waves span:nth-child(8) { animation-delay: 0.35s; }
.mic-waves span:nth-child(9) { animation-delay: 0.4s; }

@keyframes micWave {
    0%, 100% { height: 5px; }
    50% { height: 25px; }
}

.practice-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==================== VOCABULARY PAGE ==================== */
.vocabulary-container {
    max-width: 1200px;
    margin: 0 auto;
}

.vocabulary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.vocabulary-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.vocab-actions {
    display: flex;
    gap: 1rem;
}

.vocab-stats {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.vs-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vs-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-tertiary);
}

.vs-item.learning .vs-value { color: var(--warning); }
.vs-item.mastered .vs-value { color: var(--success); }

.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.vocab-card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.vocab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.vocab-word {
    font-size: 1.125rem;
    font-weight: 700;
}

.vocab-status {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

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

.vocab-status.learning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.vocab-status.mastered {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.vocab-meaning {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.vocab-translation {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.vocab-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.vocab-card-actions .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    display: block;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ==================== SEARCH PAGE ==================== */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
}

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

.search-btn {
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

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

.search-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
}

.sp-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.search-result {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
}

.result-word {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.result-pronunciation {
    font-size: 1rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.result-section {
    margin-bottom: 1.25rem;
}

.result-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.result-section p {
    font-size: 1.125rem;
}

.result-example {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-style: italic;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ==================== PROFILE PAGE ==================== */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: var(--gradient-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    color: white;
    margin-bottom: 2rem;
}

.profile-avatar-lg {
    font-size: 5rem;
}

.profile-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-info p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.profile-badges {
    display: flex;
    gap: 0.75rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.ps-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    text-align: center;
}

.ps-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.ps-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.ps-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.profile-settings {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.profile-settings h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* ==================== ACHIEVEMENTS PAGE ==================== */
.achievements-container {
    max-width: 1000px;
    margin: 0 auto;
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.achievements-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.achievements-count {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.achievements-count span:first-child {
    color: var(--primary);
    font-weight: 700;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.achievement-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition-base);
}

.achievement-card.unlocked {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.achievement-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    font-size: 1.5rem;
    color: var(--text-tertiary);
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-form {
    padding: 1.5rem;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 4000;
}

.toast {
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlide 0.3s ease;
    min-width: 280px;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

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

.toast-message {
    flex: 1;
    font-size: 0.875rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

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

    .quick-start-grid {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .flashcards-header {
        flex-direction: column;
        gap: 1rem;
    }

    .flashcard {
        height: 350px;
    }

    .card-word {
        font-size: 2rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .listening-options {
        grid-template-columns: 1fr;
    }

    .vocabulary-header {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 1rem;
    }

    .logo-text {
        display: none;
    }

    .user-info {
        display: none;
    }

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

    .flashcard-actions {
        flex-direction: column;
    }

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

    .results-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .vocab-stats {
        flex-wrap: wrap;
    }

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

/* ==================== FLOATING ADD WORD BUTTON ==================== */
.fab-add-word {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.fab-add-word.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.fab-add-word:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.fab-add-word:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .fab-add-word {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
    }
}
