body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: linear-gradient(120deg, #e0eafc 0%, #cfdef3 100%);
    margin: 0;
    color: #222;
    min-height: 100vh;
}

body.dark-mode {
    background: #1a1a2e !important;
    color: #eee !important;
}
.header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(102,126,234,0.08);
    padding-bottom: 0.5rem;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}
.nav-brand h1 {
    font-size: 2rem;
    color: #667eea;
    margin: 0;
    font-weight: 700;
}
.nav-menu {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
}
.nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.nav-btn i {
    margin-right: 0.5rem;
}
.nav-btn.logout-btn {
    margin-left: auto;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    border-color: transparent;
}
.nav-btn.logout-btn:hover {
    background: linear-gradient(135deg, #ee5a6f 0%, #dc3545 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}
.main-content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.08);
}
.section {
    display: none;
    animation: fadeIn 0.5s;
}
.section.active {
    display: block;
}
.hero {
    text-align: center;
    margin-bottom: 2rem;
}
.hero-img {
    max-width: 350px;
    width: 100%;
    border-radius: 20px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 24px rgba(102,126,234,0.12);
}
.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}
.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}
.section-header h2 i {
    font-size: 2rem;
}
.section-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Modern Vocabulary Controls */
.vocab-controls {
    margin-bottom: 2rem;
}
.vocab-search {
    position: relative;
    margin-bottom: 1.5rem;
}
.vocab-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
}
.vocab-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.vocab-search input:focus {
    outline: none;
    border-color: #667eea;
}
.vocab-level-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.vocab-level-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    background: #f7faff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.vocab-level-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.2);
}
.vocab-level-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* Modernized Vocabulary Grid */
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.vocab-card {
    background: linear-gradient(135deg, #f7faff 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(102,126,234,0.08);
    padding: 0;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(102,126,234,0.1);
}
.vocab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.15);
    border-color: #667eea;
}
.vocab-category-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #667eea;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}
.vocab-word {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    padding: 0 1.5rem;
}
.vocab-translation {
    font-size: 1.1rem;
    color: #444;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding: 0 1.5rem;
}
.vocab-phonetic {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-bottom: 0.75rem;
    padding: 0 1.5rem;
}
.vocab-example {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    font-style: italic;
    padding: 0.75rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(102,126,234,0.1);
}

/* Vocabulary Mode Toggle */
.vocab-mode-toggle {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.mode-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mode-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.mode-btn i {
    font-size: 1.1rem;
}

/* Flashcard Container */
.flashcard-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
}

.flashcard-counter {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.flashcard {
    width: 100%;
    height: 450px;
    perspective: 1000px;
    cursor: pointer;
    margin-bottom: 2rem;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    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: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.flashcard-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flashcard-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
}

.flashcard-word {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.flashcard-phonetic {
    font-size: 1.5rem;
    opacity: 0.9;
    font-style: italic;
    margin-bottom: 2rem;
}

.flashcard-translation {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.flashcard-example {
    font-size: 1.2rem;
    opacity: 0.95;
    font-style: italic;
    line-height: 1.6;
    max-width: 500px;
}

.flashcard-category-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flip-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Flashcard Controls */
.flashcard-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.flashcard-nav-btn,
.flashcard-shuffle-btn {
    padding: 1rem 2rem;
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flashcard-nav-btn:hover,
.flashcard-shuffle-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.flashcard-shuffle-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #f5576c;
    color: white;
}

.flashcard-shuffle-btn:hover {
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 4px 15px rgba(245,87,108,0.4);
}

/* Flashcard Progress Bar */
.flashcard-progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.flashcard-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.vocab-stats {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.95rem;
}
.grammar-img, .reading-img, .progress-img {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    margin-top: 1rem;
    box-shadow: 0 2px 12px rgba(102,126,234,0.08);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
    .main-content {
        padding: 1rem;
    }
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .hero-img, .grammar-img, .reading-img, .progress-img {
        max-width: 100%;
    }
}
/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile Web App Enhancements */
html {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #272932 0%, #fa2840 100%);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 60px;
    position: relative;
    gap: 3rem;
}

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

.nav-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.nav-brand h1 {
    color: #667eea;
    font-size: 1.3rem;
    margin: 0;
    text-align: left;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.nav-brand h1 i {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Desktop nav-menu styles */
@media (min-width: 769px) {
    .nav-toggle-btn {
        display: none;
    }
    
    .nav-menu {
        display: flex;
        gap: 2rem;
        align-items: center;
        flex-wrap: wrap;
    }
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-align: center;
    body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
    overflow-x: hidden;
    touch-action: pan-y;
}

.nav-link:hover,
.nav-link:active,
.nav-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

/* Touch feedback for mobile */
.nav-link:active {
    transform: translateY(0) scale(0.98);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.section {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #667eea;
    font-size: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

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

.stat-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Flashcard Styles */
.flashcard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.flashcard {
    width: 400px;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    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: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.flashcard-front {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.pronunciation-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.phonetic-pronunciation {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #e6f3ff;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    font-weight: 300;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simple-pronunciation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    to {
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
    }
}

.flashcard-back {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
    transform: rotateY(180deg);
}

/* Highlighted vocabulary word in examples - Option 3: Red italic text */
.highlighted-word {
    background: none;
    color: #dc2626 !important;
    font-weight: inherit;
    padding: 0;
    border: none;
    text-decoration: none;
    display: inline;
    font-style: italic !important;
}

.flashcard-controls {
    display: flex;
    gap: 1rem;
}

/* Button Styles */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-height: 48px; /* Better touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn:hover:not(:disabled),
.btn:active:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

/* Grammar Section */
.grammar-exercise {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.grammar-topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.topic-btn {
    padding: 1rem;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.topic-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.option {
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #667eea;
    transform: scale(1.02);
}

.option.correct {
    border-color: #28a745;
    background-color: #d4edda;
}

.option.incorrect {
    border-color: #dc3545;
    background-color: #f8d7da;
}

/* Reading Section */
.reading-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.passage {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    line-height: 1.8;
}

.comprehension-questions {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

/* Pronunciation Section */
.pronunciation-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.word-to-pronounce {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.word-to-pronounce h3 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.word-to-pronounce p {
    font-size: 1.5rem;
    opacity: 0.8;
}

.pronunciation-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pronunciation-feedback {
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
}

.pronunciation-feedback.good {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pronunciation-feedback.needs-work {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Progress Section */
.progress-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.progress-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.progress-card h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skills-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-bar label {
    flex: 0 0 100px;
    font-weight: 600;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.achievement.unlocked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.achievement i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.achievement.locked {
    opacity: 0.5;
}

/* Form Elements */
select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* Feedback Styles */
.feedback {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Touch and Interaction Enhancements */
.flashcard {
    touch-action: manipulation;
}

.option,
.reading-option,
.topic-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
}

/* Better scroll behavior for mobile */
.main-content {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea, button {
    font-size: 16px !important;
}

/* Loading states for better perceived performance */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
        will-change: transform;
    }

    .navbar {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0.75rem;
        align-items: stretch;
        overflow: visible;
    }

    .nav-brand {
        flex: none;
        padding: 0.25rem 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .nav-brand h1 {
        font-size: 1rem;
        margin: 0;
        word-break: break-word;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
    }

    .nav-toggle-btn {
        display: flex;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border: none;
        color: white;
        padding: 0.5rem;
        border-radius: 50%;
        cursor: pointer;
        font-size: 0.9rem;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        min-width: 36px;
        flex-shrink: 0;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

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

    .nav-toggle-btn i {
        transition: transform 0.3s ease;
    }

    .nav-toggle-btn.rotated i {
        transform: rotate(180deg);
    }

    .nav-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
    }

    .nav-menu.expanded {
        max-height: 1000px;
        padding: 0.75rem 0;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, visibility 0s 0s;
    }

    .nav-menu::-webkit-scrollbar {
        height: 3px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: transparent;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 2px;
    }

    .nav-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        text-align: center;
        white-space: nowrap;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .nav-btn i {
        margin-right: 0;
        font-size: 1.2rem;
    }

    .nav-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        border-color: transparent;
    }

    .nav-btn.logout-btn {
        grid-column: 1 / -1;
        flex-direction: row;
        gap: 0.5rem;
    }

    .nav-btn.admin-btn {
        grid-column: 1 / -1;
        flex-direction: row;
        gap: 0.5rem;
    }

    .main-content {
        margin-top: 0;
        padding: 0.75rem;
    }

    .section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

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

    .flashcard {
        width: 100%;
        max-width: 100%;
        height: 200px;
    }

    .flashcard-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .flashcard-controls .btn {
        width: 100%;
        max-width: 280px;
    }

    .reading-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

    .hero p {
        font-size: 1rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .grammar-topics {
        grid-template-columns: 1fr;
    }

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

    .pronunciation-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .pronunciation-controls .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .nav-btn {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    .nav-btn i {
        font-size: 1.1rem;
    }

    .nav-brand h1 {
        font-size: 1rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section {
        padding: 0.75rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .flashcard {
        height: 180px;
    }

    .pronunciation-container {
        gap: 0.3rem;
        margin-top: 0.75rem;
    }

    .phonetic-pronunciation {
        font-size: 0.9rem;
        padding: 0.3rem 0.8rem;
        letter-spacing: 0.5px;
    }

    .simple-pronunciation {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        letter-spacing: 1.5px;
    }

    .flashcard-controls {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    .word-to-pronounce {
        padding: 2rem 1rem;
    }

    .word-to-pronounce h3 {
        font-size: 2.25rem;
    }

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

    .progress-tools {
        flex-direction: column;
    }
}

/* =================================
   COMPREHENSIVE LESSON STYLES
   ================================= */

.lesson-overview-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

.lesson-header h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.lesson-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.current-lesson {
    margin: 2rem 0;
}

.current-lesson h4 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lesson-subtitle {
    color: #666;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.lesson-objectives,
.lesson-grammar,
.lesson-vocabulary {
    margin-bottom: 1.5rem;
}

.lesson-objectives h5,
.lesson-grammar h5,
.lesson-vocabulary h5 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.lesson-objectives ul {
    list-style: none;
    padding: 0;
}

.lesson-objectives li {
    padding: 0.5rem 0;
    border-left: 3px solid #667eea;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 0 5px 5px 0;
}

.grammar-topic {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.vocab-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vocab-preview .vocab-word {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.9rem;
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.lesson-navigation button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.primary-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 1.1rem;
    flex: 1;
    max-width: 300px;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Lesson Content Styles */
.lesson-content-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.lesson-header-active {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.lesson-header-active h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.english-title {
    color: #666;
    font-style: italic;
    font-size: 1.1rem;
}

.lesson-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.lesson-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.lesson-section h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Vocabulary Grid */
.vocabulary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.vocab-card {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.vocab-card .vocab-word {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.vocab-card .vocab-phonetic {
    font-family: 'Courier New', monospace;
    color: #666;
    margin-bottom: 0.3rem;
}

.vocab-card .vocab-simple {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.vocab-card .vocab-definition {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Phrases Container */
.phrases-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.phrase-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.phrase-english {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.phrase-phonetic {
    font-family: 'Courier New', monospace;
    color: #666;
    margin-bottom: 0.3rem;
}

.phrase-simple {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.phrase-spanish {
    color: #667eea;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.play-phrase {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.play-phrase:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.play-phrase:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lesson-feedback {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.lesson-feedback.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.lesson-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lesson-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Dialogue Practice Modal */
.dialogue-practice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialogue-practice-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.practice-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.5rem;
}

.close-practice {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-practice:hover {
    background: #c82333;
}

.dialogue-practice-lines {
    margin-bottom: 2rem;
}

.practice-line {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.line-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
}

.line-controls {
    display: flex;
    gap: 0.5rem;
}

.speak-line, .record-line {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.speak-line:hover {
    background: #5a67d8;
}

.record-line {
    background: #e53e3e;
}

.record-line:hover {
    background: #c53030;
}

.practice-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 2px solid #f0f0f0;
    padding-top: 1.5rem;
}

.practice-full-dialogue, .close-practice-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-full-dialogue {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.practice-full-dialogue:hover {
    transform: translateY(-2px);
}

.close-practice-btn {
    background: #28a745;
    color: white;
}

.close-practice-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Mobile Responsiveness for Dialogue Practice */
@media (max-width: 768px) {
    .dialogue-practice-content {
        padding: 1rem;
        max-width: 95%;
        max-height: 95%;
    }
    
    .practice-header h3 {
        font-size: 1.2rem;
    }
    
    .practice-line {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .line-controls {
        justify-content: center;
    }
    
    .practice-controls {
        flex-direction: column;
    }
}

/* Mobile Responsiveness for Lessons */
@media (max-width: 768px) {
    .lesson-overview-container,
    .lesson-content-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .vocabulary-grid {
        grid-template-columns: 1fr;
    }
    
    .lesson-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .lesson-navigation button {
        width: 100%;
    }
}

/* Speaker Button Enhancements */
.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.question-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.5;
}

.read-question-btn {
    flex-shrink: 0;
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #007bff;
    color: white;
    border: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.read-question-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

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

/* Reading Section Controls */
.passage-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.read-aloud-btn {
    background: #28a745;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.read-aloud-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

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

/* Enhanced Info Button Styles */
.btn-info {
    background: #17a2b8;
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
}

/* Mobile Responsive Speaker Buttons */
@media (max-width: 768px) {
    .question-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .read-question-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .passage-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .read-aloud-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* Character Display Styles */
.character-test-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

.character-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.current-character-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.character-large-avatar {
    font-size: 3rem;
    line-height: 1;
}

.character-details {
    text-align: left;
}

.character-details strong {
    font-size: 1.3rem;
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}

.character-avatar-small {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    animation: bounce 2s infinite;
}

/* Prevent nav buttons from appearing elsewhere */
.nav-right .logout-btn,
.nav-right .character-select-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* Ensure nav-right only appears in navbar */
.navbar .nav-right {
    position: relative;
    z-index: 101;
}

/* Hide any duplicate nav elements outside navbar */
.section .nav-right,
.main-content .nav-right {
    display: none !important;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .character-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .character-controls .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .current-character-info {
        flex-direction: column;
        text-align: center;
    }
    
    .character-details {
        text-align: center;
    }
}
/* Flashcard Mobile Responsive Styles */
@media (max-width: 600px) {
    .flashcard-container {
        padding: 1rem;
    }
    
    .flashcard {
        height: 380px;
    }
    
    .flashcard-word {
        font-size: 2.2rem;
    }
    
    .flashcard-phonetic {
        font-size: 1.2rem;
    }
    
    .flashcard-translation {
        font-size: 1.8rem;
    }
    
    .flashcard-example {
        font-size: 1rem;
    }
    
    .flashcard-front,
    .flashcard-back {
        padding: 2rem 1.5rem;
    }
    
    .flashcard-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .flashcard-nav-btn,
    .flashcard-shuffle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .vocab-mode-toggle {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Flashcard Mobile Responsive Styles */
@media (max-width: 600px) {
    .flashcard-container {
        padding: 1rem;
    }
    
    .flashcard {
        height: 380px;
    }
    
    .flashcard-word {
        font-size: 2.2rem;
    }
    
    .flashcard-phonetic {
        font-size: 1.2rem;
    }
    
    .flashcard-translation {
        font-size: 1.8rem;
    }
    
    .flashcard-example {
        font-size: 1rem;
    }
    
    .flashcard-front,
    .flashcard-back {
        padding: 2rem 1.5rem;
    }
    
    .flashcard-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .flashcard-nav-btn,
    .flashcard-shuffle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .vocab-mode-toggle {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Enhanced Flashcard Features */
.flashcard-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #667eea;
}

.stat-item i {
    font-size: 1.2rem;
}

.audio-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.audio-btn:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

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

.action-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
}

.action-btn#mark-hard {
    border-color: #f5576c;
    color: #f5576c;
}

.action-btn#mark-hard:hover {
    background: #f5576c;
    color: white;
}

.action-btn#mark-good {
    border-color: #667eea;
    color: #667eea;
}

.action-btn#mark-good:hover {
    background: #667eea;
    color: white;
}

.action-btn#mark-easy {
    border-color: #38ef7d;
    color: #38ef7d;
}

.action-btn#mark-easy:hover {
    background: #38ef7d;
    color: white;
}

.learned-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 30px;
    height: 30px;
    background: #38ef7d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.vocab-card.learned {
    opacity: 0.7;
    border: 2px solid #38ef7d;
}

/* Quiz Mode Styles */
.quiz-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.quiz-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.quiz-score {
    font-size: 1.3rem;
    font-weight: 700;
}

.quiz-question {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.question-counter {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.question-text .phonetic {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

.quiz-audio {
    position: relative;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quiz-audio:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-option {
    padding: 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover:not(:disabled) {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.2);
}

.quiz-option:disabled {
    cursor: not-allowed;
}

.quiz-option.correct {
    background: #38ef7d;
    border-color: #38ef7d;
    color: white;
}

.quiz-option.incorrect {
    background: #f5576c;
    border-color: #f5576c;
    color: white;
}

.quiz-feedback {
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #38ef7d;
}

.quiz-feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5576c;
}

.quiz-feedback i {
    font-size: 1.5rem;
}

.quiz-next-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.quiz-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

.quiz-progress {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

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

.result-score {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.result-percentage {
    font-size: 3rem;
    font-weight: 700;
    color: #38ef7d;
    margin-bottom: 1rem;
}

.result-message {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

/* Vocabulary Audio Button */
.vocab-audio-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #667eea;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.vocab-audio-btn:hover {
    background: #764ba2;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

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

/* Syllable Highlighting for Vocabulary */
.vocab-syllable {
    display: inline-block !important;
    transition: all 0.3s ease !important;
    color: inherit !important;
}

.vocab-word .vocab-syllable.highlight,
.flashcard-word .vocab-syllable.highlight,
span.vocab-syllable.highlight {
    color: #000000 !important;
    background-color: #ffff00 !important;
    background: #ffff00 !important;
    transform: scale(1.5) !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8) !important;
    padding: 0.3rem 0.6rem !important;
    margin: 0 2px !important;
    border-radius: 12px !important;
    border: 3px solid #ff0000 !important;
    font-weight: 900 !important;
    animation: syllableBounce 0.5s ease infinite !important;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.9), 0 0 40px rgba(255, 0, 0, 0.6) !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 999999 !important;
}

@keyframes syllableBounce {
    0% { 
        transform: scale(1.5);
        background: #ffff00;
    }
    50% { 
        transform: scale(1.8);
        background: #ffcc00;
    }
    100% { 
        transform: scale(1.5);
        background: #ffff00;
    }
}

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

/* Progress Section Styles */
.reset-progress-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reset-progress-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #333;
    margin: 0.5rem 0;
}

.stat-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.8rem;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
    width: 0;
}

.category-progress {
    margin: 3rem 0;
}

.category-progress h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon i {
    font-size: 1.8rem;
    color: white;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.category-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 0.8rem 0;
}

.category-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.category-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
    width: 0;
}

.category-percent {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.activity-section {
    margin: 3rem 0;
}

.activity-section h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-calendar {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    gap: 0.5rem;
}

.activity-day {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.activity-day.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.activity-day.today {
    border: 2px solid #667eea;
}

.activity-day:hover {
    transform: scale(1.1);
}

.achievements-section {
    margin: 3rem 0;
}

.achievements-section h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.achievement-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-card.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    pointer-events: none;
}

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

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.achievement-card h4 {
    font-size: 0.95rem;
    color: #333;
    margin: 0.5rem 0;
}

.achievement-card p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

/* Achievement Notification */
.achievement-notification {
    position: fixed !important;
    top: -300px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    pointer-events: auto !important;
    visibility: visible !important;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4));
}

.achievement-notification.show {
    top: 30px !important;
    animation: achievementShake 0.5s ease-in-out 0.6s;
}

@keyframes achievementShake {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(2deg); }
    75% { transform: translateX(-50%) rotate(-2deg); }
}

.achievement-notification-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), inset 0 0 50px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
    min-width: 450px;
    position: relative;
    animation: achievementPulse 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes achievementPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), inset 0 0 50px rgba(255, 255, 255, 0.1), 0 20px 60px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.4), inset 0 0 50px rgba(255, 255, 255, 0.2), 0 20px 80px rgba(102, 126, 234, 0.6);
    }
}

.achievement-notification-icon {
    font-size: 5rem;
    animation: achievementIconBounce 0.8s ease-in-out, achievementIconGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

@keyframes achievementIconBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    20% { transform: scale(1.4) rotate(-15deg); }
    40% { transform: scale(0.9) rotate(10deg); }
    60% { transform: scale(1.2) rotate(-8deg); }
    80% { transform: scale(0.95) rotate(5deg); }
}

@keyframes achievementIconGlow {
    0%, 100% { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)); }
    50% { filter: drop-shadow(0 8px 24px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.4)); }
}

.achievement-notification-text {
    flex: 1;
}

.achievement-notification-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.95;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: achievementTextSlide 0.5s ease-out 0.3s backwards;
}

@keyframes achievementTextSlide {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 0.95; }
}

.achievement-notification-text h4 {
    margin: 0 0 0.4rem 0;
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: achievementTextSlide 0.5s ease-out 0.4s backwards;
}

.achievement-notification-text p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: achievementTextSlide 0.5s ease-out 0.5s backwards;
}

.achievement-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.achievement-notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .achievement-notification-content {
        min-width: 90vw;
        padding: 1rem 1.5rem;
    }
    
    .achievement-notification-icon {
        font-size: 3rem;
    }
    
    .achievement-notification-text h4 {
        font-size: 1.1rem;
    }
}

/* ===== MODERN HOME PAGE ===== */

/* Hero Section */
.home-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

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

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

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: #999;
    margin-top: 0.25rem;
}

.hero-illustration {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-emoji {
    position: absolute;
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

.floating-emoji:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-emoji:nth-child(2) { top: 60%; right: 10%; animation-delay: 0.5s; }
.floating-emoji:nth-child(3) { bottom: 10%; left: 20%; animation-delay: 1s; }
.floating-emoji:nth-child(4) { top: 30%; right: 30%; animation-delay: 1.5s; }

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

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.quick-action-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.quick-action-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25);
}

.quick-action-card:hover::before {
    opacity: 1;
}

.qac-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.qac-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.qac-desc {
    font-size: 0.9rem;
    color: #666;
}

/* Spaced Repetition Review Reminder Card */
.review-reminder-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
    animation: slideUp 0.6s ease-out;
}

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

.review-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.review-card-header i {
    animation: spin 3s linear infinite;
}

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

.review-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.review-count-display {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.review-count-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.review-count-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.btn-review-now {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-review-now:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

/* Ranking Card */
.ranking-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
    animation: slideUp 0.6s ease-out;
}

.ranking-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ranking-card-header i {
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ranking-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.ranking-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.ranking-number {
    font-size: 3.5rem;
    font-weight: 900;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ranking-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranking-label {
    font-size: 0.9rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-total {
    font-size: 1.8rem;
    font-weight: 700;
}

.btn-ranking-now {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-ranking-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Daily Challenges Card */
.challenges-reminder-card {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa94d 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.3);
    animation: slideUp 0.6s ease-out;
}

.challenges-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.challenges-card-header i {
    animation: bounce 2s infinite;
}

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

.challenges-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.challenges-card-content p {
    font-size: 1rem;
    opacity: 0.95;
    flex: 1;
}

.btn-challenges-now {
    background: white;
    color: #ff6b6b;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-challenges-now:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

/* Word of the Day - Modern */
.wotd-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

.wotd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.1);
}

.wotd-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.wotd-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.wotd-content {
    padding: 2rem;
}

.wotd-main {
    margin-bottom: 1.5rem;
}

.wotd-word {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wotd-phonetic {
    font-size: 1.3rem;
    opacity: 0.9;
    font-style: italic;
}

.wotd-details {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

.wotd-translation {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.wotd-example {
    font-style: italic;
    opacity: 0.95;
    line-height: 1.6;
}

.wotd-audio-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.wotd-audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Home Sections */
.home-section {
    margin: 3rem 0;
}

.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.section-subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.review-card { border-left: 4px solid #667eea; }
.difficulty-card { border-left: 4px solid #ffd93d; }
.suggestion-card { border-left: 4px solid #6bcf7f; }

.dc-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dc-content h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.dc-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin: 0.5rem 0;
}

.dc-subtitle {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
}

.dc-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dc-action:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Contextual Scenarios - Modern Button Style */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.scenario-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    font-family: inherit;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.scenario-card:hover {
    border-color: #667eea;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-6px);
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.scenario-card:hover::before {
    transform: scaleX(1);
}

.scenario-card:hover .scenario-action {
    opacity: 1;
    transform: translateX(0);
}

.scenario-card:active {
    transform: translateY(-4px);
}

.scenario-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s;
}

.scenario-card:hover .scenario-icon {
    transform: scale(1.1);
}

.scenario-name {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.scenario-words-count {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.scenario-action {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    margin-top: 0.5rem;
}

/* Review Session Styles */
.review-session {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.review-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-bottom: 1rem;
}

.review-progress {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.review-progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s;
}

.review-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.review-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.review-btn-hard {
    background: #ff6b6b;
    color: white;
}

.review-btn-good {
    background: #ffd93d;
    color: #333;
}

.review-btn-easy {
    background: #6bcf7f;
    color: white;
}

.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive - Modern Home */
@media (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 2rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-illustration {
        height: 200px;
    }
    
    .floating-emoji {
        font-size: 2.5rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .wotd-content {
        padding: 1.5rem;
    }
    
    .wotd-word {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ===== CUSTOM NOTIFICATION (NO BROWSER HEADER) ===== */
.custom-notification {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    opacity: 1 !important;
}

.custom-notification.show {
    opacity: 1 !important;
}

.custom-notification-content {
    background: #3a3a3a !important;
    color: white !important;
    padding: 1.5rem 2rem 1rem 2rem !important;
    border-radius: 12px !important;
    text-align: center !important;
    min-width: 300px !important;
    max-width: 400px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    animation: popIn 0.2s ease-out !important;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-notification-content p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.custom-notification-content button {
    background: #5b9aff;
    color: white;
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.custom-notification-content button:hover {
    background: #4a89ee;
}

/* ===== UI ENHANCEMENTS (FEATURES 6-10) ===== */

/* Dark Mode */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --background-color: #e0eafc;
    --text-color: #2c3e50;
}

body.dark-mode {
    --background-color: #1a1a2e;
    --text-color: #eee;
    background: #1a1a2e !important;
    color: #eee !important;
    min-height: 100vh;
}

body.dark-mode .header {
    background: #16213e !important;
}

body.dark-mode .nav-btn {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%) !important;
    border-color: #16213e !important;
    color: #aaa !important;
}

body.dark-mode .nav-btn:hover {
    border-color: #667eea !important;
    color: #667eea !important;
}

body.dark-mode .nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

body.dark-mode .nav-btn.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
    color: #fff !important;
}

.dark-mode .card,
.dark-mode .vocab-card,
.dark-mode .grammar-card,
.dark-mode .story-card,
.dark-mode .quick-action-card,
.dark-mode .dashboard-card,
.dark-mode .scenario-card,
.dark-mode .vocab-word-card,
.dark-mode .phrase-card {
    background: #0f3460 !important;
    color: #eee !important;
    border-color: #16213e !important;
}

.dark-mode .wotd-card {
    background: linear-gradient(135deg, #533483 0%, #3d1d5c 100%) !important;
}

.dark-mode .section-title,
.dark-mode .hero-title,
.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4 {
    color: #eee !important;
}

.dark-mode input, .dark-mode select {
    background: #16213e !important;
    color: #eee !important;
    border-color: #533483 !important;
}

body.dark-mode .content {
    background: #1a1a2e !important;
}

body.dark-mode main {
    background: #1a1a2e !important;
}

body.dark-mode .main-content {
    background: #1a1a2e !important;
}

body.dark-mode .section {
    background: #1a1a2e !important;
}

body.dark-mode .home-hero {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%) !important;
    border-bottom: 3px solid #00d4ff !important;
    padding-bottom: 2rem !important;
    margin-bottom: 2rem !important;
}

body.dark-mode .modal-content {
    background: #16213e !important;
    color: #eee !important;
}

body.dark-mode .modal-header {
    background: #0f3460 !important;
    border-bottom-color: #533483 !important;
}

body.dark-mode .modal-body {
    background: #16213e !important;
}

body.dark-mode button {
    background: #533483 !important;
    color: #eee !important;
}

body.dark-mode .btn-primary {
    background: #667eea !important;
}

body.dark-mode .settings-toggle {
    background: #0f3460 !important;
}

body.dark-mode .settings-toggle:hover {
    background: #1a4d7a !important;
}

body.dark-mode .theme-option {
    background: #0f3460 !important;
    border-color: #533483 !important;
    color: #eee !important;
}

body.dark-mode .theme-option:hover,
body.dark-mode .theme-option.active {
    border-color: #667eea !important;
    background: rgba(102, 126, 234, 0.2) !important;
}

body.dark-mode .voice-selector {
    background: #0f3460 !important;
    border-color: #533483 !important;
    color: #eee !important;
}

body.dark-mode .quick-action-card {
    background: #0f3460 !important;
    border-color: #16213e !important;
    color: #eee !important;
}

body.dark-mode .quick-action-card:hover {
    border-color: #667eea !important;
    background: #16213e !important;
}

body.dark-mode .wotd-word {
    color: #eee !important;
}

body.dark-mode .wotd-phonetic {
    color: #aaa !important;
}

body.dark-mode .wotd-translation {
    color: #ccc !important;
}

body.dark-mode .wotd-example {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #ddd !important;
}

body.dark-mode .achievement-item {
    background: #0f3460 !important;
    border-color: #16213e !important;
}

body.dark-mode .progress-bar-container {
    background: #0f3460 !important;
}

body.dark-mode .stats-grid .stat-card {
    background: #0f3460 !important;
}

body.dark-mode .hero-subtitle {
    color: #ccc !important;
}

body.dark-mode .hero-stat {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #eee !important;
}

body.dark-mode .stat-label {
    color: #aaa !important;
}

body.dark-mode .dashboard-cards {
    border-top: 3px solid #00d4ff;
    padding-top: 1.5rem;
}

body.dark-mode .dashboard-card {
    background: #0f3460 !important;
    border-color: #16213e !important;
    color: #eee !important;
}

body.dark-mode .dc-content h4 {
    color: #eee !important;
}

body.dark-mode .dc-subtitle {
    color: #aaa !important;
}

body.dark-mode .dc-value {
    color: #fff !important;
}

body.dark-mode .dc-action {
    background: #667eea !important;
    color: white !important;
}

body.dark-mode .home-section {
    color: #eee !important;
    border-top: 3px solid #00d4ff !important;
    padding-top: 2rem !important;
    margin-top: 2rem !important;
}

body.dark-mode .section-subtitle {
    color: #ccc !important;
}

body.dark-mode .scenarios-grid button {
    background: #0f3460 !important;
    color: #eee !important;
    border-color: #16213e !important;
}

body.dark-mode .section {
    background: #1a1a2e !important;
    color: #eee !important;
}

body.dark-mode .section-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .section-header h2 {
    color: #eee !important;
}

body.dark-mode .vocab-controls {
    background: #0f3460 !important;
}

body.dark-mode .vocab-search input {
    background: #16213e !important;
    color: #eee !important;
    border-color: #533483 !important;
}

body.dark-mode .filter-btn {
    background: #16213e !important;
    color: #eee !important;
    border-color: #533483 !important;
}

body.dark-mode .filter-btn.active {
    background: #667eea !important;
    color: white !important;
}

/* Enhanced Animations */
@keyframes flip-in {
    from {
        transform: rotateY(180deg);
        opacity: 0;
    }
    to {
        transform: rotateY(0);
        opacity: 1;
    }
}

.flip-in {
    animation: flip-in 0.6s ease-out;
}

.celebration-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 99999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    top: -10px;
    animation: confetti-fall 3s ease-out forwards;
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; background: #667eea; }
.confetti:nth-child(2) { left: 30%; animation-delay: 0.2s; background: #ffd93d; }
.confetti:nth-child(3) { left: 50%; animation-delay: 0.4s; background: #6bcf7f; }
.confetti:nth-child(4) { left: 70%; animation-delay: 0.6s; background: #ff6b6b; }
.confetti:nth-child(5) { left: 90%; animation-delay: 0.8s; background: #667eea; }

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.reduce-animations * {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
}

/* Touch Ripple Effect */
.touch-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(10);
        opacity: 0;
    }
}

/* Font Size Adjustments */
.font-small {
    font-size: 14px;
}

.font-medium {
    font-size: 16px;
}

.font-large {
    font-size: 18px;
}

/* Settings Panel - Inline at top of home page */
.settings-panel-inline {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .settings-panel-inline {
    background: #1a1a2e !important;
    color: #eee !important;
    border-bottom: 3px solid #00d4ff !important;
    padding-bottom: 2.5rem !important;
}

body.dark-mode .settings-panel-inline h2,
body.dark-mode .settings-panel-inline h3 {
    color: #eee !important;
}

body.dark-mode .settings-panel-inline label {
    color: #ccc !important;
}

body.dark-mode .settings-option {
    color: #eee !important;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.settings-group {
    margin-bottom: 1.5rem;
}

.settings-group h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-option {
    margin-bottom: 0.75rem;
}

.settings-option label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.dark-mode .settings-toggle {
    background: #0f3460;
}

.settings-toggle:hover {
    background: #e9ecef;
}

.dark-mode .settings-toggle:hover {
    background: #1a4d7a;
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.theme-option {
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.theme-option:hover,
.theme-option.active {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.voice-selector {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
}

.dark-mode .voice-selector {
    background: #0f3460;
    border-color: #533483;
    color: #eee;
}

/* Settings button styling removed - now integrated in navbar */

/* ===== CONTENT MODULES (Features 16-20) - MODERNIZED ===== */

/* Common Content Container */
.content-container {
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

/* Exercise Grid - Modern Cards */
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.exercise-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.exercise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.exercise-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25);
}

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

.exercise-card h4 {
    position: relative;
    z-index: 1;
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.exercise-card p {
    position: relative;
    z-index: 1;
}

.difficulty-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.beginner {
    background: linear-gradient(135deg, #6bcf7f 0%, #4caf50 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.difficulty-badge.intermediate {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.difficulty-badge.advanced {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Listening Module - Modern */
.listening-exercise {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

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

.audio-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.play-audio-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-audio-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.audio-controls {
    margin-top: 1.5rem;
}

.audio-controls button {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.audio-controls button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.transcript {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    border-left: 4px solid #667eea;
}

.transcript.hidden {
    display: none;
}

.comprehension-questions .question-item {
    margin-bottom: 2.5rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.option-label:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-color: #667eea;
    transform: translateX(5px);
}

.option-label input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: 700;
    margin-top: 2.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Conversation Module - Modern */
.conversation-practice {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

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

.scenario-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.dialogue-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 2rem;
    min-height: 350px;
    margin-bottom: 2.5rem;
}

.dialogue-line {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    animation: slideIn 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-line {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 3rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}

.other-line {
    background: white;
    border: 2px solid #e9ecef;
    margin-right: 3rem;
}

.next-btn {
    background: linear-gradient(135deg, #6bcf7f 0%, #4caf50 100%);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.next-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.completion-msg {
    text-align: center;
    padding: 3rem;
}

.completion-msg p {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4caf50;
}

.restart-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Idioms Module - Modern */
.category-filter {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid #e9ecef;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.idiom-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.idiom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.idiom-card h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.meaning {
    margin-bottom: 1.5rem;
    color: #495057;
    font-weight: 500;
}

.example {
    color: #6c757d;
    font-style: italic;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    font-weight: 600;
}

/* Business English Module - Modern */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    border-bottom: none;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}

.tab-content {
    padding: 2rem 0;
}

.vocabulary-list,
.email-templates,
.phrases-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.vocab-item,
.template-card,
.phrase-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.vocab-item:hover,
.template-card:hover,
.phrase-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.15);
}

.vocab-item h4,
.phrase-item h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.template-text {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    margin: 1.5rem 0;
    border-left: 4px solid #667eea;
    color: #2c3e50;
}

.template-card button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.template-card button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Cultural Notes Module - Modern */
.intro {
    text-align: center;
    color: #6c757d;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.cultural-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2.5rem;
}

.cultural-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    padding: 2.5rem;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cultural-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.2);
}

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

.card-header h4 {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
}

.region-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.content {
    color: #495057;
    line-height: 1.9;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.tips-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.tips-section strong {
    color: #667eea;
    font-size: 1.1rem;
}

.tips-section ul {
    margin: 1rem 0 0 1.5rem;
}

.tips-section li {
    margin-bottom: 0.75rem;
    color: #495057;
    font-weight: 500;
}

/* Dark Mode for Content Modules */
body.dark-mode .exercise-card,
body.dark-mode .listening-exercise,
body.dark-mode .conversation-practice,
body.dark-mode .idiom-card,
body.dark-mode .vocab-item,
body.dark-mode .template-card,
body.dark-mode .phrase-item,
body.dark-mode .cultural-card {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-color: #16213e;
    color: #eee;
}

body.dark-mode .transcript,
body.dark-mode .dialogue-container,
body.dark-mode .option-label,
body.dark-mode .template-text,
body.dark-mode .tips-section,
body.dark-mode .scenario-box {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    color: #eee;
}

body.dark-mode .other-line {
    background: #16213e;
    border-color: #0f3460;
}

body.dark-mode .filter-btn {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-color: #16213e;
    color: #eee;
}

body.dark-mode .tab-btn {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #aaa;
}

body.dark-mode .tab-btn.active {
    color: white;
}

body.dark-mode .example {
    background: #16213e;
}

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

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

/* ===== STUDY TOOLS (Features 21-25) - MODERN DESIGN ===== */

/* Tools Navigation Tabs */
.tools-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.tool-tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tool-tab-btn:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.tool-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}

.tool-tab-btn i {
    margin-right: 0.5rem;
}

.tool-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tool-content.active {
    display: block;
}

/* ===== POMODORO TIMER ===== */
.pomodoro-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.pomodoro-display {
    margin-bottom: 3rem;
}

.pomodoro-circle {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: conic-gradient(#667eea 0%, #e9ecef 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    transition: background 0.3s ease;
}

.pomodoro-time {
    background: white;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.1);
}

#pomodoro-timer {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

#pomodoro-session-type {
    font-size: 1.2rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-weight: 600;
}

.pomodoro-controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.pomodoro-btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.start-btn {
    background: linear-gradient(135deg, #6bcf7f 0%, #4caf50 100%);
    color: white;
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.pause-btn {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: white;
}

.pause-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.reset-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.pomodoro-info {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 2rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.stat-item strong {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-item span {
    color: #6c757d;
    font-size: 0.95rem;
}

.pomodoro-settings {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
}

.pomodoro-settings h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 600;
}

.setting-item input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.setting-item input:focus {
    border-color: #667eea;
    outline: none;
}

.save-settings-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.save-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pomodoro-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    font-size: 1.1rem;
    transition: right 0.3s ease;
    z-index: 10000;
}

.pomodoro-notification.show {
    right: 30px;
}

/* ===== FLASHCARD EXPORT ===== */
.export-container {
    max-width: 800px;
    margin: 0 auto;
}

.export-header {
    text-align: center;
    margin-bottom: 3rem;
}

.export-header h3 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.export-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.export-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.stat-icon {
    font-size: 3rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info strong {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-info span {
    color: #6c757d;
    font-size: 0.95rem;
}

.export-options {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.export-options h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.export-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.export-btn {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.export-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.export-info {
    margin-top: 3rem;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 20px;
    padding: 2rem;
    border-left: 4px solid #ffc107;
}

.export-info h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.export-info ol {
    margin-left: 1.5rem;
    color: #6c757d;
}

.export-info li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ===== NOTES SYSTEM ===== */
.notes-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.notes-header h3 {
    color: #667eea;
    font-size: 2rem;
}

.create-note-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.create-note-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.notes-topics {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.topic-filter-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
}

.topic-filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

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

.note-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.note-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.note-header h4 {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
    flex: 1;
}

.note-topic {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.note-preview {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.note-footer small {
    color: #adb5bd;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.note-actions button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.note-actions button:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    color: #adb5bd;
    font-size: 1.5rem;
    padding: 4rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
}

.note-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.note-modal-content {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.note-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #e9ecef;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-modal-close:hover {
    background: #ff6b6b;
    color: white;
    transform: rotate(90deg);
}

.note-content {
    margin: 2rem 0;
    line-height: 1.8;
    color: #495057;
    white-space: pre-wrap;
}

/* ===== FAVORITES SYSTEM ===== */
.favorites-container {
    max-width: 1200px;
    margin: 0 auto;
}

.favorites-header {
    text-align: center;
    margin-bottom: 3rem;
}

.favorites-header h3 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.favorites-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.favorites-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.favorite-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.favorite-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.favorite-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.favorite-item h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.favorite-item p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.favorite-item button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.favorite-item button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.favorites-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    transition: bottom 0.3s ease;
    z-index: 10000;
}

.favorites-notification.show {
    bottom: 30px;
}

/* ===== SEARCH HISTORY ===== */
.history-container {
    max-width: 900px;
    margin: 0 auto;
}

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

.history-header h3 {
    color: #667eea;
    font-size: 2rem;
}

.clear-history-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.clear-history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.history-group {
    margin-bottom: 3rem;
}

.history-group h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-query {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

.history-category {
    color: #667eea;
    font-size: 0.85rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-actions button {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-actions button:first-child:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotate(360deg);
}

.history-actions button:last-child:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    transform: scale(1.2);
}

/* Dark Mode for Study Tools */
body.dark-mode .tool-tab-btn {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #aaa;
}

body.dark-mode .tool-tab-btn.active {
    color: white;
}

body.dark-mode .pomodoro-time {
    background: #1a1a2e;
    color: #eee;
}

body.dark-mode .stat-card,
body.dark-mode .stat-item,
body.dark-mode .export-options,
body.dark-mode .note-card,
body.dark-mode .favorite-item,
body.dark-mode .history-item {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #eee;
}

body.dark-mode .empty-state,
body.dark-mode .pomodoro-settings,
body.dark-mode .export-info {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    color: #eee;
}

body.dark-mode .note-modal-content {
    background: #1a1a2e;
    color: #eee;
}

body.dark-mode .export-option {
    background: #16213e;
    color: #eee;
}

body.dark-mode .setting-item input {
    background: #16213e;
    border-color: #0f3460;
    color: #eee;
}
