/* Learn page styles */
.learn-section {
    padding: 3rem 0 4rem;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Decorative background elements - subtle uniform gradient */
.learn-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(79, 70, 229, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.learn-section::after {
    display: none;
}

[data-theme="dark"] .learn-section::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
}

[data-theme="dark"] .learn-section::after {
    display: none;
}

.learn-section .container {
    position: relative;
    z-index: 1;
}

.learn-section .page-title {
    font-size: 2.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.learn-section .page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

.learn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.learn-card {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 1.25rem;
    padding: 2.25rem 1.75rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .learn-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.learn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.learn-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

[data-theme="dark"] .learn-card::after {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
}

.learn-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
}

[data-theme="dark"] .learn-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(99, 102, 241, 0.4);
}

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

.learn-card:hover::after {
    opacity: 1;
}

.learn-card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.learn-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.learn-card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Guest Banner */
.guest-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="dark"] .guest-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(167, 139, 250, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

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

.guest-banner-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.guest-banner-message {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.guest-banner-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.guest-banner-actions .btn-large {
    padding: 0.875rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
}

.guest-login-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.guest-login-link:hover {
    color: var(--primary-color);
}

@media (max-width: 640px) {
    .guest-banner {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .guest-banner-title {
        font-size: 1.2rem;
    }

    .guest-banner-message {
        font-size: 0.9rem;
    }
}

/* Quiz page styles */
.quiz-section {
    padding: 2rem 0;
    min-height: 80vh;
}

.quiz-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.font-style-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.font-style-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(0,0,0,0.12);
    background: var(--card-bg);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

[data-theme="dark"] .font-style-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.font-style-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

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

.quiz-content {
    max-width: 900px;
    margin: 0 auto;
}

.character-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

.transcription-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

.transcription-text-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.4;
    margin: 0;
    text-align: center;
}

.character-symbol-large {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    transition: font-family 0.3s;
    /* Default font - will be overridden by font-style classes */
    font-family: 'Noto Sans Thai Looped', 'Cordia', 'Angsana', 'Eucrosia', serif;
}

/* ============================================
   THAI FONT STYLES - 10 fonts total
   6 Looped/Traditional + 4 Loopless/Simplified
   ============================================ */

/* Default Looped (Traditional) font style - Noto Sans Thai Looped */
.character-display.font-style-looped .character-symbol-large,
.font-style-looped .character-symbol-large,
#character-symbol.font-style-looped {
    font-family: 'Noto Sans Thai Looped', 'Cordia', 'Angsana', 'Eucrosia', serif !important;
}

/* Default Loopless (Simplified) font style - Prompt */
.character-display.font-style-loopless .character-symbol-large,
.font-style-loopless .character-symbol-large,
#character-symbol.font-style-loopless {
    font-family: 'Prompt', sans-serif !important;
}

/* === LOOPED/TRADITIONAL FONTS (6) === */

/* 1. Noto Sans Thai Looped - default looped */
.font-noto-looped {
    font-family: 'Noto Sans Thai Looped', serif !important;
}

/* 2. Sarabun - official Thai government font */
.font-sarabun {
    font-family: 'Sarabun', serif !important;
}

/* 3. Mitr - friendly rounded looped font */
.font-mitr {
    font-family: 'Mitr', sans-serif !important;
}

/* 4. Pridi - elegant looped serif */
.font-pridi {
    font-family: 'Pridi', serif !important;
}

/* 5. Chonburi - decorative display font */
.font-chonburi {
    font-family: 'Chonburi', cursive !important;
}

/* 6. Sriracha - handwritten style */
.font-sriracha {
    font-family: 'Sriracha', cursive !important;
}

/* === LOOPLESS/SIMPLIFIED FONTS (4) === */

/* 1. Noto Sans Thai - clean sans-serif */
.font-noto-sans {
    font-family: 'Noto Sans Thai', sans-serif !important;
}

/* 2. Kanit - modern geometric */
.font-kanit {
    font-family: 'Kanit', sans-serif !important;
}

/* 3. Prompt - clean geometric (default loopless) */
.font-prompt {
    font-family: 'Prompt', sans-serif !important;
}

/* 4. IBM Plex Sans Thai - technical precision */
.font-ibm-plex {
    font-family: 'IBM Plex Sans Thai', sans-serif !important;
}

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

.option-card {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

[data-theme="dark"] .option-card {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

/* Light theme - correct card */
.option-card.correct {
    background: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #000000 !important;
    font-weight: 700;
}

.option-card.correct .option-transcription-en,
.option-card.correct .option-transcription-ru,
.option-card.correct .option-ipa,
.option-card.correct .option-tone {
    color: #000000 !important;
    opacity: 1 !important;
}

.option-card.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-transcription-en {
    font-size: 1.25rem;
    font-weight: 700;
    color: inherit;
}

.option-transcription-ru {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    opacity: 0.8;
}

.option-ipa {
    font-size: 0.875rem;
    color: inherit;
    opacity: 0.7;
    font-style: italic;
}

.option-tone {
    font-size: 0.875rem;
    color: inherit;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.option-class {
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.option-name-en {
    font-size: 0.875rem;
    color: inherit;
    opacity: 0.85;
    font-weight: 500;
}

.result-message {
    text-align: center;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.result-message .emoji {
    font-size: 1.1em;
    margin: 0 0.25rem;
}

/* Light theme - correct message */
.result-message.correct {
    background: #a7f3d0 !important;
    color: #000000 !important;
    border: 2px solid #059669 !important;
    font-weight: 700;
}

.result-message.correct span {
    color: #000000 !important;
}

.result-message.incorrect {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.stats-display {
    display: none !important; /* Hidden - stats shown in result message */
}

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

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

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.next-button-container {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.next-button-enter-hint {
    height: 1.75rem;
    padding: 0 0.625rem;
    border-radius: 0.375rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-color);
    font-size: 0.6875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    white-space: nowrap;
}

[data-theme="dark"] .next-button-enter-hint {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .next-button-enter-hint {
        display: none;
    }
}

/* Option number buttons */
.option-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.option-number-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .option-number-btn {
        display: none;
    }
}

.option-number-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

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

.option-number-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

[data-theme="dark"] .option-number-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary-color);
}

[data-theme="dark"] .option-number-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Adjust option card to work with wrapper */
.option-card-wrapper .option-card {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Learn with AI page styles */
.loading-message,
.error-message {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
}

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

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
    border-radius: 0.75rem;
    font-size: 1rem;
}

.prompts-container {
    max-width: 1000px;
    margin: 0 auto;
}

.language-selector-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.75rem;
}

[data-theme="dark"] .language-selector-container {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.language-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.language-select {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--input-bg);
    cursor: pointer;
    transition: all 0.3s;
}

[data-theme="dark"] .language-select {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.prompts-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.prompts-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.prompt-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .prompt-card {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.prompt-card:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.prompt-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.prompt-header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.expand-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

[data-theme="dark"] .expand-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.expand-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.expand-button.expanded {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.expand-icon {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-button:hover {
    background: var(--primary-color-dark, #4f46e5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.copy-button.copied {
    background: #10b981;
}

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

/* Collapsible prompt text */
.prompt-text-wrapper {
    position: relative;
    margin-top: 1rem;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.prompt-text-wrapper.collapsed {
    max-height: 7.2em; /* ~3 lines at 1.8 line-height + padding */
}

.prompt-text-wrapper:not(.collapsed) {
    max-height: none;
}

.prompt-text {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.75rem;
    margin: 0;
}

[data-theme="dark"] .prompt-text {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.prompt-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: linear-gradient(transparent, var(--bg-secondary));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
    border-radius: 0 0 0.75rem 0.75rem;
}

.prompt-text-wrapper:not(.collapsed) .prompt-fade-overlay {
    opacity: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .learn-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .learn-section .page-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .learn-section {
        padding: 2rem 0 3rem;
    }

    .learn-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .learn-section .page-title {
        font-size: 2rem;
    }

    .learn-section .page-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .learn-card {
        padding: 1.75rem 1.5rem;
    }

    .learn-card-icon {
        font-size: 3rem;
    }
}

@media (max-width: 1024px) {
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {

    .character-symbol-large {
        font-size: 4rem;
    }

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

    .prompt-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .copy-button {
        width: 100%;
        justify-content: center;
    }

    .prompt-text {
        font-size: 0.9rem;
    }

    .language-selector-container {
        flex-direction: column;
        align-items: stretch;
    }

    .language-select {
        width: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    .result-message.correct {
        background: rgba(16, 185, 129, 0.3);
        color: #6ee7b7;
        border-color: #10b981;
    }

    .result-message.correct span {
        color: #6ee7b7;
    }

    .result-message.incorrect {
        background: rgba(239, 68, 68, 0.2);
        color: #fca5a5;
        border-color: rgba(239, 68, 68, 0.5);
    }

    .option-card.correct {
        background: rgba(16, 185, 129, 0.3);
        border-color: #10b981;
        color: #6ee7b7;
    }

    .option-card.correct .option-transcription-en,
    .option-card.correct .option-transcription-ru,
    .option-card.correct .option-ipa,
    .option-card.correct .option-tone {
        color: #6ee7b7;
        opacity: 1;
    }

    .option-card.incorrect {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
        color: #fca5a5;
    }

    .error-message {
        background: rgba(239, 68, 68, 0.2);
        color: #fca5a5;
        border-color: rgba(239, 68, 68, 0.5);
    }
}

/* Dark theme via data attribute */
[data-theme="dark"] .result-message.correct {
    background: rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
    border-color: #10b981 !important;
}

[data-theme="dark"] .result-message.correct span {
    color: #6ee7b7 !important;
}

[data-theme="dark"] .result-message.incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
}

[data-theme="dark"] .option-card.correct {
    background: rgba(16, 185, 129, 0.3) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .option-card.correct .option-transcription-en,
[data-theme="dark"] .option-card.correct .option-transcription-ru,
[data-theme="dark"] .option-card.correct .option-ipa,
[data-theme="dark"] .option-card.correct .option-tone {
    color: #6ee7b7 !important;
    opacity: 1 !important;
}

[data-theme="dark"] .option-card.incorrect {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

[data-theme="dark"] .error-message {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
}

/* Vowel placeholder styling */
.vowel-placeholder {
    color: #9ca3af; /* Distinct grey color (text-light equivalent) */
    font-family: 'Noto Sans Thai Looped', sans-serif !important; /* Always use Looped font for placeholder circle */
    font-size: 0.7em; /* Smaller size relative to parent */
    vertical-align: middle;
    font-weight: normal;
}

@media (prefers-color-scheme: dark) {
    .vowel-placeholder {
        color: #6b7280; /* Darker grey for dark mode */
    }
}

/* ===== Session Counter Component ===== */
.session-counter {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 50;
    min-width: 180px;
}

.session-counter-content {
    background: var(--card-bg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1rem;
    padding: 0.875rem 1.25rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .session-counter-content {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(99, 102, 241, 0.3);
}

.session-counter-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-align: center;
}

.session-counter-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.session-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.session-stat.pulse {
    transform: scale(1.15);
}

.session-stat-icon {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
}

.session-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 1.5ch;
    text-align: center;
}

.session-stat-correct {
    color: #10b981;
}

.session-stat-correct .session-stat-icon {
    color: #10b981;
}

.session-stat-incorrect {
    color: #ef4444;
}

.session-stat-incorrect .session-stat-icon {
    color: #ef4444;
}

.session-stat-total {
    color: var(--primary-color);
}

.session-stat-total .session-stat-icon {
    color: var(--primary-color);
    font-weight: 800;
}

.session-stat-divider {
    width: 1px;
    height: 1.25rem;
    background: var(--card-border);
    opacity: 0.5;
}

/* Progress bar */
.session-counter-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.625rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--card-border);
}

.session-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.session-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.session-progress-fill.animate {
    animation: progressPulse 0.3s ease;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.session-progress-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
    min-width: 2.5rem;
    text-align: right;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .session-counter {
        position: relative;
        top: auto;
        right: auto;
        min-width: auto;
        margin-bottom: 1rem;
    }

    .session-counter-content {
        padding: 0.625rem 1rem;
    }

    .session-counter-stats {
        gap: 0.5rem;
    }

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

/* Dark theme overrides */
[data-theme="dark"] .session-stat-correct {
    color: #34d399;
}

[data-theme="dark"] .session-stat-correct .session-stat-icon {
    color: #34d399;
}

[data-theme="dark"] .session-stat-incorrect {
    color: #f87171;
}

[data-theme="dark"] .session-stat-incorrect .session-stat-icon {
    color: #f87171;
}

[data-theme="dark"] .session-progress-text {
    color: #34d399;
}
