/* Global Reset & Base Variable Declarations */
:root {
    --color-bg-base: #FDF9F2; /* Warm Egyptian sandy cream background */
    --color-primary: #FF8C42; /* Vibrant terracotta orange */
    --color-primary-hover: #E0732A;
    --color-secondary: #00A896; /* Warm sea turquoise */
    --color-secondary-hover: #028C7D;
    --color-accent-gold: #F1C40F; /* Golden Egyptian sunset */
    --color-accent-red: #E74C3C; /* Festive coral red */
    --color-text-dark: #2C3E50; /* Charcoal navy for high-contrast reading */
    --color-text-light: #FFFFFF;
    --color-glass-bg: rgba(255, 255, 255, 0.75);
    --color-glass-border: rgba(255, 255, 255, 0.6);
    --font-arabic: 'Cairo', sans-serif;
    --font-english: 'Fredoka', sans-serif;
    --shadow-soft: 0 12px 28px rgba(230, 126, 34, 0.12);
    --shadow-bouncy: 0 16px 36px rgba(44, 62, 80, 0.15);
    --border-radius-cartoon: 24px;
    --border-radius-pill: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-base);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(241, 196, 15, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(26, 188, 156, 0.08) 0%, transparent 40%);
    font-family: var(--font-arabic);
    color: var(--color-text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== CORE UTILITIES & GLOBAL LAYOUT ==================== */

.app-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.glass-panel {
    background: var(--color-glass-bg);
    border: 3px solid var(--color-glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-cartoon);
    box-shadow: var(--shadow-soft);
    padding: 30px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #F5EFEB;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border: 2px solid #F5EFEB;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-hover);
}

/* Playful Bouncy Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatCloud {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(40px) translateY(-5px); }
    100% { transform: translateX(0) translateY(0); }
}

@keyframes giggling {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-6deg) scale(1.05); }
    75% { transform: rotate(6deg) scale(1.05); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1); }
}

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

.bouncy {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}
.bouncy:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.15);
}
.bouncy:active {
    transform: translateY(1px) scale(0.98);
}

/* ==================== BUTTONS & INTERACTIVE ELEMENTS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--border-radius-pill);
    border: 3px solid var(--color-text-dark);
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-arabic);
}

.btn-primary {
    background-color: var(--color-accent-gold);
    color: var(--color-text-dark);
    box-shadow: 0 6px 0 var(--color-text-dark);
    position: relative;
    top: 0;
    transition: all 0.15s ease;
}
.btn-primary:hover {
    background-color: #F39C12;
}
.btn-primary:active {
    top: 6px;
    box-shadow: 0 0 0 var(--color-text-dark);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    border-color: var(--color-text-dark);
    box-shadow: 0 6px 0 var(--color-text-dark);
    position: relative;
    top: 0;
    transition: all 0.15s ease;
}
.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
}
.btn-secondary:active {
    top: 6px;
    box-shadow: 0 0 0 var(--color-text-dark);
}

/* ==================== STAGE 1: SPLASH SCREEN ==================== */

.stage-section {
    display: none;
    width: 100%;
    animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

#splash-screen {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.splash-card {
    max-width: 580px;
    width: 100%;
    text-align: center;
    border-radius: var(--border-radius-cartoon);
    border: 4px solid var(--color-text-dark);
    background: #FFFDF8;
}

.mascot-animation-container {
    margin-bottom: 20px;
    animation: bounce 4s ease-in-out infinite;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 12px;
    text-shadow: 2px 2px 0 var(--color-text-dark);
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: #5D6D7E;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.input-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-dark);
}

.text-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.2rem;
    font-family: var(--font-arabic);
    border: 3px solid var(--color-text-dark);
    border-radius: var(--border-radius-cartoon);
    outline: none;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.text-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 5px rgba(255, 140, 66, 0.2);
}

/* Background Animations */
.cloud {
    position: absolute;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
    pointer-events: none;
}
.cloud-1 {
    top: 15%;
    left: 10%;
    animation: floatCloud 14s infinite ease-in-out;
}
.cloud-2 {
    bottom: 25%;
    right: 8%;
    animation: floatCloud 18s infinite ease-in-out reverse;
}
.pyramid-bg {
    position: absolute;
    bottom: 5%;
    left: 5%;
    font-size: 8rem;
    opacity: 0.12;
    transform: rotate(-10deg);
}

/* ==================== STAGE 2: MAIN DASHBOARD ==================== */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 3px solid var(--color-text-dark);
    padding: 16px 30px;
    margin-bottom: 20px;
    background: #FFFDF8;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-emoji {
    font-size: 2.2rem;
    animation: bounce 3s infinite ease-in-out;
}

.logo-text h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-primary);
}

.logo-sub {
    font-family: var(--font-english);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--color-secondary);
}

.user-greeting-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 2px solid var(--color-text-dark);
    padding: 8px 16px;
    border-radius: var(--border-radius-pill);
}

.welcome-text {
    font-weight: 700;
    color: var(--color-text-dark);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Stats Ribbon */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: center;
    border: 3px solid var(--color-text-dark);
    background: #FFFDF8;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

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

.stat-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-text-dark);
}

.stat-label {
    font-size: 0.9rem;
    color: #7F8C8D;
    font-weight: 600;
}

.progress-bar-container {
    grid-column: 1 / -1;
    width: 100%;
    height: 12px;
    background: #EAECEE;
    border: 2px solid var(--color-text-dark);
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        var(--color-accent-gold),
        var(--color-accent-gold) 10px,
        #F39C12 10px,
        #F39C12 20px
    );
    border-radius: var(--border-radius-pill);
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==================== WORKSPACE LAYOUT & MASCOT ==================== */

.workspace-layout {
    display: block;
    width: 100%;
}

.mascot-widget {
    border: 3px solid var(--color-text-dark);
    background: #FFFDF8;
    position: sticky;
    top: 20px;
}

.mascot-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mascot-svg-wrapper {
    cursor: pointer;
    transition: transform 0.2s ease;
}
.mascot-svg-wrapper:hover {
    transform: scale(1.08);
}

.active-mascot {
    width: 150px;
    height: 150px;
}

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

.speech-bubble-container {
    width: 100%;
}

.mascot-name {
    display: block;
    text-align: center;
    font-weight: 900;
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.speech-bubble {
    background: #FFFFFF;
    border: 3px solid var(--color-text-dark);
    border-radius: var(--border-radius-cartoon);
    padding: 16px;
    position: relative;
    box-shadow: 0 4px 0 rgba(44, 62, 80, 0.1);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 15px 15px;
    border-style: solid;
    border-color: transparent transparent var(--color-text-dark);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 13px 13px;
    border-style: solid;
    border-color: transparent transparent #FFFFFF;
}

.speech-bubble p {
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 700;
    color: var(--color-text-dark);
    text-align: center;
}

/* ==================== CARD GRID & CATEGORIES ==================== */

.category-ribbon {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
    scrollbar-width: thin;
}

.ribbon-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius-pill);
    border: 2px solid var(--color-text-dark);
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ribbon-btn:hover {
    background: #FDF6E2;
    transform: scale(1.05);
}

.ribbon-btn.active {
    background: var(--color-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 0 var(--color-text-dark);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.phrase-card {
    border: 3px solid var(--color-text-dark);
    background: #FFFFFF;
    border-radius: var(--border-radius-cartoon);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 250px;
    box-shadow: 0 6px 0 var(--color-text-dark);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: visible;
    animation: popIn 0.4s ease-out;
}

.phrase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 0 var(--color-text-dark);
}

.phrase-card.active-play {
    border-color: var(--color-secondary);
    box-shadow: 0 8px 0 var(--color-secondary);
}

.card-category-tag {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--color-secondary);
    color: #FFFFFF;
    border: 2px solid var(--color-text-dark);
    border-radius: var(--border-radius-pill);
    padding: 2px 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-english-text {
    font-family: var(--font-english);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-top: 10px;
    line-height: 1.3;
    direction: ltr;
    text-align: left;
}

/* Card Control Row */
.card-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.card-play-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 3px solid var(--color-text-dark);
    background: var(--color-accent-gold);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--color-text-dark);
    transition: all 0.1s ease;
}

.card-play-btn:hover {
    background: #F39C12;
    transform: scale(1.08);
}

.card-play-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--color-text-dark);
}

.card-hint-btn {
    background: none;
    border: none;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: var(--border-radius-pill);
    border: 2px dashed transparent;
    transition: all 0.2s ease;
}

.card-hint-btn:hover {
    border-color: var(--color-primary);
    background: rgba(255, 140, 66, 0.08);
}

/* Cartoon Popout Speech Bubble for Arabic Hint */
.arabic-popover {
    display: none;
    position: absolute;
    bottom: 85px;
    left: 20px;
    right: 20px;
    background: #FFFDF8;
    border: 3px solid var(--color-text-dark);
    border-radius: var(--border-radius-cartoon);
    padding: 12px;
    z-index: 100;
    box-shadow: var(--shadow-bouncy);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.arabic-popover.visible {
    display: block;
}

.arabic-popover::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 40px;
    border-width: 15px 15px 0;
    border-style: solid;
    border-color: var(--color-text-dark) transparent;
    display: block;
    width: 0;
}

.arabic-popover-text {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--color-secondary);
    text-align: center;
    line-height: 1.4;
}

.arabic-popover-msa {
    font-size: 0.8rem;
    color: #7F8C8D;
    text-align: center;
    margin-top: 4px;
    border-top: 1px dashed #BDC3C7;
    padding-top: 4px;
}

/* ==================== PLAYFUL QUIZ GAME MODE ==================== */

.quiz-workspace {
    width: 100%;
}

.quiz-card {
    border: 4px solid var(--color-text-dark);
    background: #FFFDF8;
    border-radius: var(--border-radius-cartoon);
    box-shadow: 0 12px 0 var(--color-text-dark);
    padding: 40px 30px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px dashed var(--color-text-dark);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.quiz-tag {
    background: var(--color-primary);
    color: #FFFFFF;
    border: 2px solid var(--color-text-dark);
    border-radius: var(--border-radius-pill);
    padding: 4px 16px;
    font-weight: 900;
    font-size: 1.1rem;
}

.hearts-row {
    display: flex;
    gap: 6px;
}

.heart-icon {
    font-size: 1.8rem;
    filter: grayscale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.heart-icon.active {
    filter: none;
    animation: bounce 2s infinite ease-in-out;
}

.quiz-body {
    text-align: center;
}

.quiz-body h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 30px;
}

/* Audio Pulse Button */
.audio-pulse-button {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid var(--color-text-dark);
    background: var(--color-accent-gold);
    font-size: 3rem;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 0 var(--color-text-dark);
    margin-bottom: 20px;
    transition: all 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audio-pulse-button:hover {
    transform: scale(1.05);
    background: #F39C12;
}

.audio-pulse-button:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 var(--color-text-dark);
}

/* Infinite radiating rings */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--color-accent-gold);
    top: 0;
    left: 0;
    animation: radiatingRing 2s infinite;
    opacity: 0;
    pointer-events: none;
}

@keyframes radiatingRing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.quiz-hint-text {
    font-size: 0.95rem;
    color: #7F8C8D;
    margin-bottom: 35px;
    font-weight: 700;
}

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

.quiz-option-btn {
    border: 3px solid var(--color-text-dark);
    background: #FFFFFF;
    border-radius: var(--border-radius-cartoon);
    padding: 20px;
    font-family: var(--font-english);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 6px 0 var(--color-text-dark);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-option-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 var(--color-text-dark);
    background: #FDF9F0;
}

.quiz-option-btn.correct-choice {
    background-color: #2ECC71 !important;
    color: #FFFFFF !important;
    border-color: var(--color-text-dark) !important;
    animation: giggling 0.5s ease;
}

.quiz-option-btn.wrong-choice {
    background-color: #E74C3C !important;
    color: #FFFFFF !important;
    border-color: var(--color-text-dark) !important;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.quiz-footer {
    display: flex;
    justify-content: center;
    border-top: 3px dashed #EAECEE;
    padding-top: 20px;
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* ==================== CELEBRATION MODALS ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.modal-content {
    max-width: 460px;
    width: 100%;
    background: #FFFDF8;
    border: 4px solid var(--color-text-dark);
    border-radius: var(--border-radius-cartoon);
    text-align: center;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 20px 0 rgba(44, 62, 80, 0.2);
}

.celebration-emoji {
    font-size: 5rem;
    display: block;
    margin-bottom: 20px;
    animation: bounce 2s infinite ease-in-out;
}

.modal-content h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 1.1rem;
    font-weight: 700;
    color: #5D6D7E;
    margin-bottom: 25px;
}

.points-badge {
    background: var(--color-accent-gold);
    border: 3px solid var(--color-text-dark);
    border-radius: var(--border-radius-cartoon);
    padding: 12px;
    display: inline-flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.points-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--color-text-dark);
}

.points-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #7F8C8D;
}

/* Reveal Arabic phrase box in Quiz Mode */
.quiz-reveal-box {
    margin: 20px auto 25px;
    padding: 16px;
    background: rgba(0, 168, 150, 0.08);
    border: 3px dashed var(--color-secondary);
    border-radius: var(--border-radius-cartoon);
    max-width: 500px;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 6px;
}

.reveal-text {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-text-dark);
    line-height: 1.4;
}

/* Clickable Arabic Popover text for playing pronunciation */
.clickable-speech {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.clickable-speech:hover {
    transform: scale(1.03);
    opacity: 0.9;
}
.clickable-speech:active {
    transform: scale(0.98);
}
.clickable-speech::after {
    content: " 🔊";
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.clickable-speech:hover::after {
    opacity: 1;
}

/* ==================== SPEECH MODE SELECTOR WIDGET ==================== */
.speech-mode-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.85);
    border: 3px solid var(--color-text-dark);
    border-radius: var(--border-radius-pill);
    padding: 4px;
    gap: 4px;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 100;
}

.speech-mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-dark);
    font-family: var(--font-arabic);
    background: transparent;
    border: 3px solid transparent;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speech-mode-btn:hover:not(.active) {
    background: rgba(44, 62, 80, 0.05);
    transform: translateY(-2px);
}

.speech-mode-btn.active {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    border-color: var(--color-text-dark);
    box-shadow: 0 4px 0 var(--color-text-dark);
    transform: translateY(-2px);
}

/* Accent color override for active Fusha */
#speech-mode-fusha.active {
    background-color: var(--color-primary);
}

.btn-flag {
    font-size: 1.2rem;
}

.btn-text {
    font-size: 0.95rem;
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px 15px;
    }
    
    .header-logo {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .speech-mode-selector {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
    
    .speech-mode-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
    }
}


