@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Comfortaa:wght@400;600&display=swap');
@import url('./src/auth/auth.css');

/* Version Section - Clean and Simple */
.version-section {
    margin: 1rem 0;
}

.version-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 8px;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-label {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
}

.current-version {
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Update buttons removed - app uses network-first strategy for automatic updates */

/* Version Changelog Styles */
.version-changelog {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 246, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(147, 197, 253, 0.3);
}

.version-changelog h4 {
    margin: 0 0 0.5rem 0;
    color: #1E40AF;
    font-size: 0.875rem;
}

.release-date {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.75rem;
}

.change-item {
    font-size: 0.75rem;
    color: #374151;
    margin: 0.25rem 0;
    padding-left: 0.5rem;
}

/* Admin Access Styles */
.admin-access-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(249, 250, 251, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.3);
}

.admin-details {
    color: #6B7280;
}

.admin-summary {
    cursor: pointer;
    font-weight: 500;
    padding: 0.5rem 0;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.admin-summary:hover {
    color: #4B5563;
}

.admin-content {
    padding: 1rem 0 0.5rem;
    border-top: 1px solid rgba(209, 213, 219, 0.2);
    margin-top: 0.5rem;
}

.admin-description p {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #6B7280;
}

.admin-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-code-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.admin-code-input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-unlock-btn {
    padding: 0.75rem 1.5rem;
    background: #6B7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.admin-unlock-btn:hover {
    background: #4B5563;
}

.admin-console-hint {
    padding: 0.75rem;
    background: rgba(55, 65, 81, 0.05);
    border-radius: 6px;
    border-left: 3px solid #6B7280;
}

.admin-console-hint p {
    margin: 0;
    font-size: 0.75rem;
    color: #4B5563;
}

.admin-console-hint code {
    background: rgba(55, 65, 81, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-dark);
    font-family: var(--font-system);
    line-height: 1.6;
}

.app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(34, 139, 34, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}


.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #EF4444;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

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

.app-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 5rem;
    background: transparent;
}

.section {
    display: none;
    padding: var(--container-padding);
    background: transparent;
}

.section.active {
    display: block;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
    opacity: 0.7;
}

.header-content {
    flex: 1;
    text-align: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: black;
    margin: 0 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content h2 {
    font-family: var(--font-geez), serif;
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: black;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    position: relative;
}

.header-content h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
    border-radius: 1px;
}

.level-description {
    font-family: var(--font-modern);
    font-size: var(--font-size-base);
    color: #333333 !important;
    font-weight: 400;
    text-shadow: none;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    font-style: italic;
    letter-spacing: 0.01em;
    margin-top: 0.75rem;
    opacity: 0.9;
}

.level-progress {
    display: flex;
    align-items: center;
}

.progress-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.progress-circle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ===== COMPACT HEADER STYLES ===== */
.header-content-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    color: black;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.level-info-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.level-number {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
}

.level-change-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.level-change-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.level-selector-arrow {
    font-size: 0.75rem;
    opacity: 0.7;
}

.progress-indicator {
    display: flex;
    align-items: center;
}

.progress-text-compact {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--primary);
}

/* Update app-header height for compact layout */
.app-header {
    padding: 0.5rem var(--container-padding); /* Reduced from 1rem */
}

/* ===== BOTTOM NAVIGATION WITH ACCESSIBILITY ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 2px solid var(--primary-light);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    background: none;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-medium);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
}

/* Focus indicator for keyboard navigation */
.nav-item:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(255, 220, 0, 0.3);
}

.nav-item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

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

.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary);
    font-weight: 700;
}

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

.nav-icon {
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
    transition: transform 0.2s ease;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

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

.nav-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* ===== FLASHCARD COMPONENTS ===== */
.flashcard-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem var(--container-padding);
}

.flashcard {
    width: 100%;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.flashcard:active .flashcard-inner {
    transform: scale(0.98);
    transition: transform 0.1s ease-out;
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.flashcard-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 1rem;
    gap: 0.5rem;
    position: relative;
    z-index: 10;
}

.card-actions > div:empty {
    width: 60px; /* Reserve space for back button when not present */
}

.tap-hint {
    font-size: 0.75rem;
    color: var(--gray-600);
    opacity: 0.7;
    font-style: italic;
    text-align: center;
}

.keyboard-hint {
    font-size: 0.65rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    font-family: monospace;
    opacity: 0.8;
}

.character-display {
    font-family: var(--font-geez);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 400;
    color: var(--slate-800);
    margin-bottom: 1rem;
    line-height: 1;
}

.sound-display {
    font-family: var(--font-playful);
    font-size: 2rem;
    font-weight: 600;
    color: var(--emerald-600);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--emerald-50), var(--emerald-100));
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--emerald-200);
    display: inline-block;
    min-width: 8rem;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sound-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.flashcard.flipped .sound-display::before {
    left: 100%;
}

.sound-display:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.2);
    border-color: var(--emerald-300);
}

.phonetic-marker {
    font-family: var(--font-system);
    color: var(--emerald-500);
    opacity: 0.6;
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0.1em;
}

.formula-hint {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    font-style: italic;
}

.formula-display {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    font-family: var(--font-system);
}

.formula-display .geez-char {
    font-family: var(--font-geez);
    font-size: 1.25rem;
}

/* ===== BUTTONS WITH ETHIOPIAN COLORS ===== */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.875rem 1.75rem;
    font-weight: 700;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: var(--touch-target);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-nav {
    background: var(--primary-light);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

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

.btn-nav:active {
    transform: translateY(0) scale(0.98);
}



/* Flip button styles removed - using simple click-to-flip instead */

/* ===== PROGRESS INDICATORS WITH ETHIOPIAN COLORS ===== */
.progress-dots {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    justify-content: center;
    align-items: center;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-light);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.progress-dot.active {
    background: var(--primary);
    border-color: var(--primary-hover);
    transform: scale(1.4);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(34, 139, 34, 0.2);
}

.progress-dot.active::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

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

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    margin: 0.75rem 0;
    border: 1px solid var(--border-medium);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--ethiopian-green-light) 50%, 
        var(--primary) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

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

/* ===== QUIZ COMPONENTS WITH ETHIOPIAN COLORS ===== */
.quiz-container {
    max-width: 560px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-light);
    position: relative;
}

.quiz-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.quiz-progress {
    font-size: var(--font-size-base);
    color: var(--text-black);
    font-weight: 700;
    background: var(--primary-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--primary);
}

.quiz-xp {
    font-size: var(--font-size-base);
    color: var(--accent-hover);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--accent-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--accent);
}

.formula-hint::before {
    content: '💡';
    font-size: 1rem;
}

.quiz-question {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.quiz-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
}

.quiz-prompt {
    font-size: var(--font-size-xl);
    color: var(--text-black);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.quiz-display {
    font-family: var(--font-geez);
    font-size: var(--font-size-geez);
    color: var(--text-black);
    margin: 2rem 0;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--cream);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-light);
    line-height: 0.9;
}

.quiz-display.word-reading {
    font-size: var(--font-size-geez);
    margin-bottom: 1rem;
}

.word-meaning {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin: 0.75rem 0 2rem 0;
    font-weight: 500;
    font-style: italic;
    background: var(--primary-light);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--primary);
    display: inline-block;
}

.quiz-sound {
    font-size: var(--font-size-2xl);
    color: var(--primary);
    margin: 2rem 0;
    font-weight: 700;
    font-style: italic;
    background: var(--primary-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--primary);
    display: inline-block;
}

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

/* ========== AUDIO PLAYER STYLES ========== */

/* Audio player container */
.quiz-audio-player {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Audio play button */
.audio-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Hover effect */
.audio-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
}

/* Active (pressed) state */
.audio-play-btn:active {
    transform: translateY(0);
}

/* Disabled state */
.audio-play-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Playing animation */
.audio-play-btn.playing {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    animation: audioPulse 1s ease-in-out infinite;
}

/* Audio icon */
.audio-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Audio label text */
.audio-label {
    font-size: 1rem;
    white-space: nowrap;
}

/* Pulse animation for playing state */
@keyframes audioPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Word sound display - special styling for word quizzes */
.quiz-sound.word-sound {
    font-size: 1.875rem;
    color: #6366F1;
    font-weight: 600;
    padding: 1rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.75rem;
    border: 2px solid #6366F1;
    margin: 1.5rem 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .audio-play-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .audio-icon {
        width: 20px;
        height: 20px;
    }

    .quiz-sound.word-sound {
        font-size: 1.5rem;
        padding: 0.875rem 1.25rem;
    }
}

/* Touch devices - larger tap targets (iOS/Android best practice) */
@media (max-width: 768px) and (hover: none) {
    .audio-play-btn {
        min-height: 48px;
        min-width: 120px;
    }
}

.quiz-option {
    background: #FFFFFF;
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem 1rem;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #1A202C;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px; /* Larger touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-system);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--text-black);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(34, 139, 34, 0.1);
}

.quiz-option:active {
    transform: translateY(0) scale(0.98);
}

.quiz-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(34, 139, 34, 0.3);
    transform: scale(1.02);
}

/* ✨ Clean quiz feedback - now using inline styles for simplicity */

.quiz-tts {
    background: #F59E0B;
    color: #1A202C;
    border: 2px solid #D97706;
    border-radius: var(--border-radius-sm);
    padding: 0.875rem 1.75rem;
    margin: 1.5rem 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    font-size: 1rem;
    min-width: 180px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.quiz-tts:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ✨ Removed complex animations - using simple inline styles for clean feedback */

/* ===== ACHIEVEMENT SYSTEM WITH ETHIOPIAN FLAIR ===== */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-width: 360px;
    text-align: center;
    animation: achievementAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.achievement-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
}

.achievement-popup::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(34, 139, 34, 0.05) 0%, transparent 70%);
    z-index: -1;
    animation: achievementGlow 2s infinite alternate;
}

@keyframes achievementGlow {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes achievementAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotateY(-90deg);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1) rotateY(10deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
    }
}

/* Feedback animations */
@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes bounceIn {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes celebrationBounce {
    0% {
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: achievementIconBounce 2s infinite;
}

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

.achievement-name {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.achievement-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.achievement-xp {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--accent-hover);
    background: var(--accent-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--accent);
    display: inline-block;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== INSTALL PROMPT ===== */
.install-prompt {
    position: fixed;
    bottom: 6rem;
    left: var(--container-padding);
    right: var(--container-padding);
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 200;
    animation: slideUp 0.3s ease-out;
}

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

.install-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 0.5rem;
}

.install-content p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

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

.install-actions .btn-primary,
.install-actions .btn-secondary {
    flex: 1;
    padding: 0.75rem 1rem;
}

/* ===== DESIGN SYSTEM WITH ETHIOPIAN COLORS ===== */
:root {
    /* Ethiopian flag colors - Primary palette */
    --ethiopian-green: #228B22;
    --ethiopian-green-light: #32CD32;
    --ethiopian-green-dark: #006400;
    --ethiopian-green-50: #E8F5E8;
    --ethiopian-green-100: #D4F4D4;
    --ethiopian-green-200: #A7F3A7;
    
    --ethiopian-yellow: #FFDC00;
    --ethiopian-yellow-light: #FFF200;
    --ethiopian-yellow-dark: #DAA520;
    --ethiopian-yellow-50: #FFF9E6;
    --ethiopian-yellow-100: #FFF4CC;
    --ethiopian-yellow-200: #FFEB99;
    
    --ethiopian-red: #DA020E;
    --ethiopian-red-light: #FF1B28;
    --ethiopian-red-dark: #B8010C;
    --ethiopian-red-50: #FDEAEA;
    --ethiopian-red-100: #FBC7C8;
    --ethiopian-red-200: #F89D9F;
    
    /* High contrast neutrals for maximum readability */
    --white: #FEFEFE;
    --cream: #FCFCFC;
    --light-gray: #F8F9FA;
    --border-light: #E9ECEF;
    --border-medium: #CED4DA;
    --text-light: #6C757D;
    --text-medium: #495057;
    --text-dark: #212529;
    --text-black: #1A202C;
    
    /* Educational app colors for status and feedback */
    --success: var(--ethiopian-green);
    --warning: var(--ethiopian-yellow-dark);
    --danger: var(--ethiopian-red);
    --info: #0EA5E9;
    
    /* Semantic colors with Ethiopian integration */
    --primary: var(--ethiopian-green);
    --primary-hover: var(--ethiopian-green-dark);
    --primary-light: var(--ethiopian-green-50);
    --accent: var(--ethiopian-yellow);
    --accent-hover: var(--ethiopian-yellow-dark);
    --accent-light: var(--ethiopian-yellow-50);
    
    /* Background hierarchy for clean design */
    --bg-primary: var(--white);
    --bg-secondary: var(--cream);
    --bg-tertiary: var(--light-gray);
    
    /* Legacy support (gradually remove these) */
    --emerald-50: var(--ethiopian-green-50);
    --emerald-100: var(--ethiopian-green-100);
    --emerald-200: var(--ethiopian-green-200);
    --emerald-300: #86EFAC;
    --emerald-500: var(--ethiopian-green);
    --emerald-600: var(--ethiopian-green-dark);
    --emerald-700: #15803D;
    --gray-50: var(--light-gray);
    --gray-200: var(--border-light);
    --gray-600: var(--text-medium);
    --slate-800: var(--text-black);
    
    /* Design tokens */
    --font-geez: 'Noto Sans Ethiopic', 'Abyssinica SIL', serif;
    --font-system: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', 'SF Pro Display', -apple-system, system-ui, sans-serif;
    --font-elegant: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --font-modern: 'Poppins', 'Inter', -apple-system, system-ui, sans-serif;
    --font-playful: 'Comfortaa', 'Nunito', 'Poppins', system-ui, sans-serif;
    --font-friendly: 'Nunito', 'Comfortaa', 'Poppins', system-ui, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-geez: clamp(4rem, 8vw, 6rem);
    
    --border-radius: 0.75rem;
    --border-radius-sm: 0.5rem;
    --border-radius-xs: 0.25rem;
    --container-padding: 1rem;
    --touch-target: 48px; /* Increased for better accessibility */
    
    /* Shadows for depth hierarchy */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 12px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.12);
    
}

/* ===== ACCESSIBILITY & FOCUS INDICATORS ===== */
/* Global focus styles with Ethiopian colors */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--border-radius-xs);
}

/* Button focus states */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-nav:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(255, 220, 0, 0.3);
}

/* Interactive element focus */
.flashcard:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.quiz-option:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(255, 220, 0, 0.3);
}

.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(255, 220, 0, 0.4);
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius-xs);
    font-weight: 600;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --text-black: #000000;
        --white: #FFFFFF;
        --border-light: #000000;
    }
    
    .flashcard-front,
    .flashcard-back {
        border: 3px solid var(--text-black);
    }
    
    .quiz-option {
        border: 3px solid var(--text-black);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .flashcard-inner {
        transition: none;
    }
    
    .progress-dot.active::before {
        animation: none;
    }
}

/* ===== ADDITIONAL FLASHCARD STYLES ===== */
/* Removed hover effect to prevent conflicts with flip animation */

.flashcard .btn:hover {
    transform: scale(1.1);
}

.formula-display {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-size: 1rem;
}

/* Enhanced Visual Formula Styling with Ethiopian Colors */
.visual-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--accent-light);
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.visual-formula::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
}

.formula-component {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-medium);
    min-width: 70px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.formula-component:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.formula-component .geez-char {
    font-family: var(--font-geez);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-black);
    line-height: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.formula-component .sound-label {
    font-size: var(--font-size-xs);
    color: var(--text-medium);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--border-radius-xs);
    font-family: var(--font-system);
}

.formula-operator {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    padding: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    background: var(--white);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary);
}

/* Ethiopian color coding for formula components */
.parent-char {
    border-color: var(--ethiopian-green);
    background: linear-gradient(135deg, var(--ethiopian-green-50) 0%, var(--ethiopian-green-100) 100%);
    position: relative;
}

.parent-char::after {
    content: 'Parent';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ethiopian-green);
    color: white;
    font-size: 0.5rem;
    padding: 0.125rem 0.25rem;
    border-radius: var(--border-radius-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vowel-char {
    border-color: var(--ethiopian-yellow-dark);
    background: linear-gradient(135deg, var(--ethiopian-yellow-50) 0%, var(--ethiopian-yellow-100) 100%);
    position: relative;
}

.vowel-char::after {
    content: 'Vowel';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ethiopian-yellow-dark);
    color: white;
    font-size: 0.5rem;
    padding: 0.125rem 0.25rem;
    border-radius: var(--border-radius-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-char {
    border-color: var(--ethiopian-red);
    background: linear-gradient(135deg, var(--ethiopian-red-50) 0%, var(--ethiopian-red-100) 100%);
    transform: scale(1.08);
    font-weight: 700;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.result-char::after {
    content: 'Result';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ethiopian-red);
    color: white;
    font-size: 0.5rem;
    padding: 0.125rem 0.25rem;
    border-radius: var(--border-radius-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-char .geez-char {
    color: var(--ethiopian-red-dark);
    font-weight: 600;
}

.result-char .sound-label {
    color: var(--ethiopian-red-dark);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
}

/* Formula loading state */
.formula-loading, .formula-error {
    padding: 0.5rem;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
    font-size: 0.875rem;
}

.formula-error {
    color: var(--red-600);
    background: var(--red-50);
    border: 1px solid var(--red-200);
    border-radius: 6px;
}

/* Formula positioned in bottom-left corner for advanced levels */
.formula-corner {
    position: absolute;
    bottom: 60px;
    left: 20px;
    opacity: 0.8;
    transform: scale(0.5);
    transform-origin: left bottom;
    z-index: 1;
}

.formula-corner .formula-display {
    margin: 0;
    padding: 0.3rem;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

.formula-corner .visual-formula {
    padding: 0.4rem;
    margin: 0;
    gap: 0.3rem;
    border-width: 1px;
}

.formula-corner .formula-component {
    font-size: 0.8rem;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* ===== COMPLETION COMPONENTS ===== */
.completion-message-card {
    background: var(--white) !important;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    margin: 2rem auto;
    border: 2px solid var(--primary-light);
    position: relative;
    overflow: hidden;
    /* Ensure background stays white */
    background-color: #FFFFFF !important;
}

.completion-message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
}

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

.completion-message-card h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.level-name {
    font-size: var(--font-size-lg);
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.completion-text {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 500;
}

.completion-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .completion-actions {
        flex-direction: row;
        justify-content: center;
    }
}

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

.completion-hint {
    color: var(--text-medium);
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.completion-hint small {
    color: var(--text-medium);
    font-weight: 600;
}

.quiz-prompt-card {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    border: 2px solid var(--accent);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    /* Force white background */
    color: #000000 !important;
}

.quiz-prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
}

/* Removed - flags now handled by quiz-prompt-flags */

.quiz-prompt-flags {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
}

.quiz-flag-left, .quiz-flag-right {
    font-size: 1.25rem;
    opacity: 0.6;
}

.quiz-prompt-content {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000 !important;
}

/* Removed - no longer using quiz prompt icon */

.quiz-prompt-text {
    flex: 1;
    color: #000000 !important;
}

.quiz-prompt-text strong {
    color: #000000 !important;
    font-size: var(--font-size-lg);
    font-weight: 700;
    text-shadow: none;
}

.quiz-prompt-subtitle {
    font-size: var(--font-size-base);
    color: #000000 !important;
    margin-top: 0.25rem;
    font-weight: 600;
    opacity: 0.8;
}

.quiz-prompt-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

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

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
        --touch-target: 48px;
    }
    
    .flashcard-container {
        max-width: 500px;
    }
    
    .character-display {
        font-size: clamp(4rem, 10vw, 6rem);
    }
    
    .quiz-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .install-prompt {
        max-width: 400px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

@media (min-width: 1024px) {
    :root {
        --container-padding: 3rem;
        --touch-target: 40px;
    }
    
    .flashcard-container,
    .quiz-container {
        max-width: 600px;
    }
    
    .character-display {
        font-size: 6rem;
    }
}

/* ===== SMOOTH TRANSITIONS ===== */
.section {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

.quiz-option {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:hover {
    transform: translateY(-3px) scale(1.02);
}

.flashcard-inner {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary, .btn-secondary, .btn-nav {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.flashcard {
    animation: fadeIn 0.5s ease-out;
}

.quiz-question {
    animation: slideInRight 0.4s ease-out;
}

.completion-message-card {
    animation: slideInLeft 0.5s ease-out;
}

/* XP Animation */
@keyframes xpFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
}

.xp-feedback {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    font-weight: 600;
    color: #D97706;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: xpFloat 2s ease-out forwards;
}

/* Ethiopian Confetti Animation */
@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Ethiopian themed confetti colors */
.confetti-ethiopian {
    background: var(--ethiopian-green) !important;
}

.confetti-ethiopian:nth-child(2n) {
    background: var(--ethiopian-yellow) !important;
}

.confetti-ethiopian:nth-child(3n) {
    background: var(--ethiopian-red) !important;
}

/* Success celebration with Ethiopian colors */
@keyframes ethiopianCelebration {
    0% { 
        transform: scale(1);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.1);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(0.95);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.05);
        filter: hue-rotate(270deg);
    }
    100% {
        transform: scale(1);
        filter: hue-rotate(360deg);
    }
}

.celebration-element {
    animation: ethiopianCelebration 1.5s ease-in-out;
}

/* ===== ERROR HANDLING ===== */
.error-message {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    color: #991B1B;
    max-width: 400px;
    margin: 2rem auto;
}

.error-message p {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.error-message .btn-primary {
    background: #EF4444;
    border-color: #DC2626;
}

.error-message .btn-primary:hover {
    background: #DC2626;
}

/* Global error toast */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #EF4444;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
    font-weight: 500;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-shake {
    animation: errorShake 0.5s ease-in-out;
}

/* ===== ENHANCED NAVIGATION WITH ACCESSIBILITY ===== */
.nav-spacer {
    width: 60px; /* Reserve space for navigation button when not present */
}

/* Keyboard navigation improvements */
.card-actions {
    gap: 0.75rem;
}

.card-actions button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    z-index: 1;
}

.nav-prev, .nav-next {
    background: var(--emerald-100);
    color: var(--emerald-700);
    border: 1px solid var(--emerald-200);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-width: 60px;
    position: relative;
}

.nav-prev:hover, .nav-next:hover {
    background: var(--emerald-200);
    border-color: var(--emerald-300);
    transform: translateY(-1px);
}

.nav-prev:active, .nav-next:active {
    transform: translateY(0) scale(0.98);
}

/* Desktop navigation tooltips */
@media (min-width: 768px) {
    .nav-prev::after, .nav-next::after {
        content: attr(title);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
        z-index: 1000;
    }
    
    .nav-prev:hover::after, .nav-next:hover::after {
        opacity: 1;
    }
}

/* ===== MASTER-LEVEL LEVEL SELECTION SYSTEM ===== */

/* Level Selection Container */
.level-selection-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
    min-height: calc(100vh - 140px);
}

/* Level Header */
.level-header {
    text-align: center;
    margin-bottom: 2rem;
}

.level-header-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.back-to-learning {
    background: var(--ethiopian-green);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-to-learning:hover {
    background: var(--ethiopian-green-dark);
    transform: translateY(-2px);
}

.level-header h2 {
    font-family: var(--font-elegant);
    font-size: var(--font-size-3xl);
    color: var(--ethiopian-green-dark);
    margin-bottom: 0.5rem;
    position: relative;
}

.level-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green) 0% 33%, 
        var(--ethiopian-yellow) 33% 66%, 
        var(--ethiopian-red) 66% 100%);
    border-radius: 2px;
}

/* Progress Summary */
.level-progress-summary {
    background: linear-gradient(135deg, var(--ethiopian-green-50), var(--ethiopian-yellow-50));
    border: 2px solid var(--ethiopian-green-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

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

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

.stat-number {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--ethiopian-green-dark);
    font-family: var(--font-modern);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    font-weight: 600;
}

/* Level Cards */
.level-list, .level-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .level-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .level-list.mobile-optimized {
        display: none;
    }
    
    .level-grid.desktop-only {
        display: grid;
    }
}

.level-card {
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-light);
    transition: all 0.3s ease;
}

/* Level Card States */
.level-card.completed {
    border-color: var(--ethiopian-green-200);
    background: linear-gradient(135deg, var(--ethiopian-green-50) 0%, var(--white) 100%);
}

.level-card.completed::before {
    background: var(--ethiopian-green);
}

.level-card.completed:hover {
    border-color: var(--ethiopian-green);
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.15);
    transform: translateY(-4px);
}

.level-card.current {
    border-color: var(--ethiopian-yellow);
    background: linear-gradient(135deg, var(--ethiopian-yellow-50) 0%, var(--white) 100%);
    animation: currentLevelPulse 3s ease-in-out infinite;
}

.level-card.current::before {
    background: linear-gradient(90deg, var(--ethiopian-yellow), var(--ethiopian-red));
}

.level-card.current:hover {
    border-color: var(--ethiopian-yellow-dark);
    box-shadow: 0 8px 25px rgba(255, 220, 0, 0.25);
    transform: translateY(-4px);
}

.level-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--gray-50);
    border-color: var(--border-light);
    filter: grayscale(0.5);
}

@keyframes currentLevelPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 220, 0, 0.2);
    }
    50% {
        box-shadow: 0 8px 30px rgba(255, 220, 0, 0.4);
    }
}

/* Level Card Content */
.level-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.level-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ethiopian-green-100);
}

.level-card.current .level-icon {
    background: var(--ethiopian-yellow-100);
}

.level-card.locked .level-icon {
    background: var(--gray-200);
}

.level-name {
    font-family: var(--font-geez), var(--font-elegant);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.level-description {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    line-height: 1.5;
}

/* Enhanced Learning Header */
.level-selector-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
}

.level-selector-btn:hover {
    transform: translateY(-2px);
}

.level-change-icon {
    font-size: 1.5rem;
    background: var(--ethiopian-green-100);
    padding: 0.5rem;
    border-radius: 50%;
}

.change-level-text {
    font-size: var(--font-size-sm);
    color: var(--ethiopian-green);
    font-weight: 600;
    opacity: 0.8;
}

/* Accessibility */
.level-card:focus {
    outline: 3px solid var(--ethiopian-yellow);
    outline-offset: 2px;
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .level-card {
        min-height: 60px;
    }
    
    .level-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Profile Page Styles */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #059669, #10B981);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.profile-rank {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.profile-rank h2 {
    margin: 0;
    font-size: 1.5rem;
}

.profile-xp {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.stat-card {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #E2E8F0;
}

.stat-card.primary {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

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

.achievement-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #E2E8F0;
}

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

.achievement-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.export {
    background: #10B981;
    color: white;
}

.action-btn.reset {
    background: #EF4444;
    color: white;
}

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

/* Quiz Menu Styles */
.quiz-menu {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

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

.quiz-menu-header h2 {
    margin: 0 0 0.5rem 0;
    color: #1A202C;
}

.quiz-menu-header p {
    color: #475569;
    margin: 0;
}

.quiz-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.quiz-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #E2E8F0;
    transition: all 0.3s ease;
}

.quiz-card:not(.locked):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #10B981;
}

.quiz-card.completed {
    border-color: #10B981;
    background: linear-gradient(135deg, #F0FDF4, #FFFFFF);
}

.quiz-card.locked {
    opacity: 0.6;
    background: #F8FAFC;
    border-color: #CBD5E1;
}

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

.quiz-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-icon {
    font-size: 1.5rem;
}

.quiz-title-text {
    flex: 1;
}

.quiz-title h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #1A202C;
}

.quiz-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #64748B;
    font-weight: 500;
}

.quiz-type-badge {
    display: inline-block;
    background: #F1F5F9;
    color: #475569;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #E2E8F0;
}

.quiz-preview {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.preview-label {
    font-size: 0.75rem;
    color: #64748B;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-chars {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.preview-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1A202C;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.preview-more {
    color: #9CA3AF;
    font-weight: 600;
    font-size: 0.875rem;
}

.quiz-status {
    font-size: 1.25rem;
}

.quiz-info {
    margin-bottom: 1.5rem;
}

.quiz-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.quiz-score {
    font-size: 0.875rem;
    color: #059669;
    font-weight: 600;
}

.quiz-start-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.quiz-start-btn.start {
    background: #10B981;
    color: white;
}

.quiz-start-btn.retake {
    background: #F59E0B;
    color: white;
}

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

/* ===== RECOMMENDED QUIZ SYSTEM ===== */
.recommended-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
    text-align: center;
}

.section-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #1A202C;
}

.section-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748B;
}

.quiz-card.recommended {
    border: 3px solid #10B981;
    background: linear-gradient(135deg, #ECFDF5, #FFFFFF);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    transform: scale(1.02);
    position: relative;
    margin-bottom: 1rem;
}

.quiz-card.recommended:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.25);
}

.recommended-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.quiz-card.recommended .quiz-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

.quiz-card.recommended .quiz-icon {
    font-size: 1.75rem;
}

.quiz-start-btn.recommended {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem 1.5rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.quiz-start-btn.recommended:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.other-quizzes-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #E2E8F0;
}

.other-quizzes-section .section-header {
    margin-bottom: 1.5rem;
}

.other-quizzes-section .quiz-card {
    opacity: 0.85;
    transform: scale(0.98);
}

.other-quizzes-section .quiz-card:hover {
    opacity: 1;
    transform: scale(1) translateY(-2px);
}

.quiz-locked-msg {
    text-align: center;
    color: #6B7280;
    font-style: italic;
    font-size: 0.875rem;
    padding: 0.875rem;
    background: #F9FAFB;
    border-radius: 6px;
}

.quiz-exit-btn {
    background: #EF4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-exit-btn:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    /* Mobile-first responsive fixes */
    .quiz-list {
        grid-template-columns: 1fr;
    }
    
    .quiz-details {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    /* Ensure mobile touch targets */
    .btn, .quiz-option, .nav-item, .flashcard {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Mobile navigation improvements */
    .nav-item {
        padding: 0.75rem 1rem;
    }
    
    /* Better mobile spacing */
    .container, .main-container {
        padding: 0.5rem;
    }
    
    /* Mobile flashcard adjustments */
    .flashcard-container {
        padding: 0.25rem;
        gap: 0.25rem;
    }
    
    .flashcard {
        height: 260px;
    }
    
    /* Mobile flashcard content adjustments */
    .flashcard-front,
    .flashcard-back {
        padding: 1.25rem;        /* Reduce padding for mobile */
    }
    
    .character-display {
        font-size: 3rem;         /* Reduce from 4rem */
    }
    
    .sound-display {
        font-size: 1.5rem;       /* Reduce from 2rem for mobile */
        margin-bottom: 0.75rem;  /* Reduce margin */
    }
    
    /* Mobile navigation button adjustments */
    .btn-nav, .nav-prev, .nav-next {
        padding: 0.5rem 0.875rem; /* Smaller padding */
        font-size: 0.75rem;       /* Smaller text */
        min-width: 55px;          /* Smaller minimum width */
    }
    
    .completion-trigger {
        padding: 0.5rem 0.875rem; /* Match other nav buttons */
        font-size: 0.75rem;
    }
    
    /* Reduce overall page container height */
    main {
        min-height: auto;
        padding-bottom: 1rem;
    }
    
    .main-container {
        min-height: calc(100vh - 400px);
    }
    
    /* Also reduce header space */
    .header-content {
        padding: 0.5rem;
    }
    
    /* CRITICAL FIX: Ultra-compact completion message cards */
    .completion-message-card {
        padding: 0.75rem;        /* Ultra-compact padding */
        margin: 0.25rem auto;    /* Minimal margins */
        max-width: 260px;        /* Smaller width for mobile */
    }
    
    .completion-message-card h2 {
        font-size: 1.125rem;     /* Smaller title */
        margin-bottom: 0.25rem;  /* Reduce spacing to make room for progress */
    }
    
    .completion-icon {
        font-size: 1.5rem;       /* Smaller icon */
        margin-bottom: 0.25rem;  /* Minimal spacing */
    }
    
    .level-progress {
        font-size: 0.75rem;      /* Small progress text */
        color: var(--primary);   /* Green color to match theme */
        font-weight: 600;        /* Bold for emphasis */
        margin-bottom: 0.75rem;  /* Space before buttons */
        opacity: 0.9;            /* Slightly subtle */
    }
    
    .completion-actions {
        display: flex;
        gap: 0.5rem;            /* Small gap between buttons */
        justify-content: center;
    }
    
    .completion-actions .completion-btn {
        padding: 0.5rem 0.75rem; /* Compact button padding */
        font-size: 0.75rem;      /* Smaller button text */
        font-weight: 600;        /* Bold for readability */
        min-height: 36px;        /* Smaller button height */
        flex: 1;                 /* Equal button width */
        max-width: 100px;        /* Limit button width */
    }
    
    /* Fix other modal/overlay sizing issues */
    .achievement-popup {
        padding: 1rem;           /* Was 2.5rem - saves 48px */
        max-width: 280px;        /* Reduce from 360px */
    }
    
    /* Level complete modal - add missing styles */
    .level-complete-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .level-complete-modal .modal-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .level-complete-modal .modal-content {
        background: var(--white);
        border-radius: var(--border-radius);
        padding: 1rem;           /* Compact padding for mobile */
        max-width: 300px;        /* Smaller than desktop */
        max-height: 250px;       /* Prevent overflow */
        text-align: center;
        position: relative;
        z-index: 2001;
        box-shadow: var(--shadow-xl);
        overflow: hidden;
    }
    
    .level-complete-modal h2 {
        font-size: 1.25rem;      /* Smaller title */
        margin-bottom: 0.5rem;
    }
    
    .level-complete-modal .level-name {
        font-size: 0.875rem;     /* Smaller level name */
        margin-bottom: 0.5rem;
    }
    
    .level-complete-modal .completion-message {
        font-size: 0.875rem;     /* Smaller message text */
        margin-bottom: 1rem;
    }
    
    /* Level complete feedback (inline) */
    .level-complete-feedback {
        max-height: 80px;        /* Prevent taking too much space */
    }
    
    .level-complete-feedback .level-complete-icon {
        font-size: 1.5rem;       /* Smaller celebration icon */
    }
    
    .level-complete-feedback .level-complete-text {
        font-size: 1rem;         /* Smaller text */
    }
    
    /* Apply global component spacing optimizations */
    
    /* Quiz page optimizations */
    .quiz-container {
        padding-top: 0.5rem;     /* Was 1.5rem - reduce top padding */
    }
    
    .quiz-header {
        margin-bottom: 1rem;     /* Was 2rem - reduce bottom margin */
        padding: 1rem;           /* Was 1.25rem - slight reduction */
    }
    
    .quiz-card {
        padding: 1rem;           /* Was 1.5rem - reduce padding */
    }
    
    /* Profile page optimizations */
    .profile-header {
        padding: 1rem;           /* Was 2rem - reduce padding */
        margin-bottom: 1rem;     /* Was 2rem - reduce margin */
    }
    
    .profile-container {
        padding: 0.5rem;         /* Was 1rem - reduce padding */
    }
    
    /* Level selection optimizations */
    .level-card {
        padding: 1rem;           /* Was 1.5rem - reduce padding */
    }
    
    /* Games page optimizations (if exists) */
    .games-container {
        padding: 0.5rem;         /* Compact padding */
    }
    
    .mini-game-card {
        padding: 1rem;           /* Compact padding for game cards */
        margin-bottom: 0.5rem;   /* Reduce spacing between cards */
    }
    
    /* Install prompt optimization */
    .install-prompt .install-content {
        padding: 1rem;           /* Compact install prompt */
        max-width: 300px;        /* Smaller on mobile */
    }
}

/* Additional mobile touch support */
@media (hover: none) and (pointer: coarse) {
    /* Enhanced touch targets for mobile */
    .btn, .quiz-option, .nav-item {
        min-height: 48px;
        padding: 0.75rem 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover, .quiz-option:hover, .nav-item:hover {
        transform: none;
    }
    
    /* Add active states for better touch feedback */
    .btn:active, .quiz-option:active, .nav-item:active, .touch-active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Compact header mobile adjustments */
    .header-content-compact {
        padding: 0.375rem 0.75rem; /* Slightly smaller padding on mobile */
        margin: 0 0.5rem;
    }
    
    .level-info-compact {
        gap: 0.5rem; /* Reduce gap on mobile */
    }
    
    .level-number {
        font-size: var(--font-size-base); /* Slightly smaller on mobile */
    }
    
    .level-change-btn {
        padding: 0.25rem 0.375rem; /* Smaller padding */
        font-size: 0.75rem; /* Smaller text */
        min-height: 32px; /* Ensure touch target */
        min-width: 60px;
    }
    
    .progress-text-compact {
        font-size: var(--font-size-base); /* Smaller on mobile */
        padding: 0.25rem 0.375rem;
    }
    
    /* Reduce app-header padding even more on mobile */
    .app-header {
        padding: 0.375rem var(--container-padding);
    }
}

/* Touch feedback class for mobile devices */
.touch-active {
    transform: scale(0.98) !important;
    opacity: 0.8;
    transition: all 0.1s ease;
}

/* ===== HEADER USER PROFILE STYLES ===== */

/* Header authentication button */
.auth-trigger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--emerald-50);
    color: var(--emerald-700);
    border: 1px solid var(--emerald-200);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-trigger-btn:hover {
    background: var(--emerald-100);
    border-color: var(--emerald-300);
    transform: translateY(-1px);
}

.auth-trigger-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Header user profile */
.header-user-profile {
    position: relative;
}

.header-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.header-profile-btn:hover {
    background: var(--gray-50);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

/* Word Reading Quiz Styles */
.word-display {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0;
    text-align: center;
}

.word-meaning {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 1.5rem 0;
    text-align: center;
    font-style: italic;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.header-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.header-user-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.header-user-status.verified {
    color: var(--emerald-600);
}

.header-user-status.anonymous {
    color: var(--amber-600);
}

.header-menu-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.header-profile-btn[aria-expanded="true"] .header-menu-arrow {
    transform: rotate(180deg);
}

/* Header profile dropdown menu */
.header-profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    min-width: 200px;
    padding: 0.5rem 0;
    animation: fadeInDown 0.2s ease-out;
}

.header-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-align: left;
}

.header-menu-item:hover {
    background: var(--gray-50);
}

.header-menu-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.header-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

/* Dropdown animation */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive adjustments for header profile */
@media (max-width: 640px) {
    .header-profile-btn {
        padding: 0.25rem 0.5rem;
        min-width: 120px;
    }
    
    .header-user-name {
        font-size: 0.75rem;
        max-width: 60px;
    }
    
    .header-user-status {
        font-size: 0.625rem;
    }
    
    .header-avatar {
        width: 28px;
        height: 28px;
    }
    
    .auth-trigger-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .auth-trigger-btn .auth-btn-text {
        display: none; /* Hide text on mobile, show only icon */
    }
    
    .header-profile-menu {
        right: -1rem; /* Offset for mobile */
        left: -1rem;
        min-width: auto;
    }
}


/* Word Reading Level Introduction */
.word-reading-intro {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.word-reading-intro .level-header h2 {
    font-size: 2rem;
    color: #7C3AED;
    margin-bottom: 0.5rem;
}

.word-reading-intro .level-header p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.word-reading-explanation {
    margin: 1.5rem 0;
    text-align: left;
}

.word-reading-explanation p {
    margin: 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #475569;
}

.quiz-start-btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

/* Checkpoint Quiz Level Introduction */
.checkpoint-quiz-intro {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(245, 158, 11, 0.2);
}

.checkpoint-quiz-intro .level-header h2 {
    font-size: 2rem;
    color: #D97706;
    margin-bottom: 0.5rem;
}

.checkpoint-quiz-intro .level-header p {
    font-size: 1.1rem;
    color: #92400e;
    margin-bottom: 1.5rem;
}

.checkpoint-explanation {
    margin: 1.5rem 0;
    text-align: left;
}

/* ===== ADMIN WORD EDITOR ===== */
.admin-word-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-word-editor {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #EF4444;
}

.admin-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    border-radius: 16px 16px 0 0;
}

.admin-editor-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.admin-editor-content {
    padding: 2rem;
}

.admin-editor-instructions {
    background: #FEF3C7;
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.admin-editor-instructions p {
    margin: 0.5rem 0;
    color: #92400E;
    font-weight: 500;
}

.admin-words-list {
    margin-bottom: 2rem;
}

.admin-word-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #F9FAFB;
    transition: all 0.3s ease;
}

.admin-word-item:hover {
    border-color: #10B981;
    background: #F0FDF4;
}

.admin-word-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
}

.admin-field {
    display: flex;
    flex-direction: column;
}

.admin-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.admin-field input {
    padding: 0.75rem;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.admin-field input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.admin-word-input {
    font-family: var(--font-geez);
    font-size: 1.25rem !important;
}

.admin-word-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-danger-small {
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.btn-danger-small:hover {
    background: #DC2626;
    transform: scale(1.1);
}

.admin-editor-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 2px solid #E5E7EB;
}

.admin-editor-actions .btn-primary,
.admin-editor-actions .btn-accent,
.admin-editor-actions .btn-secondary {
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.admin-editor-actions .btn-primary {
    background: #10B981;
    color: white;
}

.admin-editor-actions .btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.admin-editor-actions .btn-accent {
    background: #F59E0B;
    color: white;
}

.admin-editor-actions .btn-accent:hover {
    background: #D97706;
    transform: translateY(-2px);
}

.admin-editor-actions .btn-secondary {
    background: #6B7280;
    color: white;
}

.admin-editor-actions .btn-secondary:hover {
    background: #4B5563;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .admin-word-editor {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .admin-word-fields {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .admin-word-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-editor-actions {
        flex-direction: column;
    }
}

.checkpoint-explanation p {
    margin: 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #78350f;
}

/* ===== HOME PAGE STYLES ===== */

.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60vh;
    padding: 2rem 0;
    position: relative;
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.05) 0%,
        rgba(99, 102, 241, 0.05) 100%);
    border-radius: 24px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.hero-icon {
    font-family: var(--font-geez);
    font-size: 4rem;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
}

.hero-title {
    font-family: 'Comfortaa', system-ui, sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    background: linear-gradient(135deg, var(--slate-800), var(--gray-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.5;
    max-width: 500px;
}

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

.hero-cta {
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.hero-secondary {
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--emerald-600);
    border: 2px solid var(--emerald-600);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-secondary:hover {
    background: var(--emerald-600);
    color: white;
    transform: translateY(-1px);
}

/* Floating Characters Animation */
.hero-visual {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.floating-characters {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 300px;
}

.floating-char {
    position: absolute;
    font-family: var(--font-geez);
    font-size: 2.5rem;
    color: var(--emerald-500);
    opacity: 0.8; /* Slightly more visible */
    animation: float 6s ease-in-out infinite;
    z-index: 5; /* Ensure they're above everything */
}

.floating-char.char-1 {
    top: 5%;
    left: 20%;
    animation-delay: 0s;
}

.floating-char.char-2 {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.floating-char.char-3 {
    bottom: 50%;
    left: 10%;
    animation-delay: 2s;
}

.floating-char.char-4 {
    bottom: 35%;
    right: 30%;
    animation-delay: 3s;
}

.floating-char.char-5 {
    top: 35%;
    left: 50%;
    animation-delay: 4s;
}

.floating-char.char-6 {
    top: 10%;
    right: 40%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(-1deg);
    }
    75% {
        transform: translateY(-15px) rotate(1deg);
    }
}

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

/* Progress Overview */
.progress-overview {
    margin-bottom: 2rem;
}

.progress-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.progress-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-800);
    margin: 0;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald-600);
}

.progress-visual .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-visual .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-600), var(--emerald-500));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.progress-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-800);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.current-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.level-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.level-name {
    font-weight: 500;
    color: var(--slate-800);
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

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

.action-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--emerald-500);
}

.action-card.primary {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
    color: white;
}

.action-card.primary:hover {
    border-color: white;
}

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

.action-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.action-card p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.4;
}

.action-card.primary p {
    opacity: 0.9;
}

/* Features Showcase */
.features-showcase {
    margin-bottom: 2rem;
}

.features-showcase h3 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 2rem;
}

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

.feature-item {
    text-align: center;
    padding: 1.5rem;
}

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

.feature-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--slate-800);
    margin: 0 0 0.5rem;
}

.feature-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: 2rem 1rem;
    }

    .hero-visual {
        height: 200px;
        margin-top: 2rem;
    }


    .floating-characters {
        width: 200px;
        height: 200px;
    }

    .floating-char {
        font-size: 2rem;
    }

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

    .progress-stats {
        gap: 1rem;
    }

    .current-level {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

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

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

@media (max-width: 480px) {
    .home-container {
        padding: 0.5rem;
    }

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

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

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

    .progress-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .floating-char {
        font-size: 1.5rem;
    }
}

/* ===== MODERN HOME PAGE STYLES - MOBILE FIRST ===== */
/* Base styles for mobile (320px+) */
:root {
    --hero-min-height: 60vh;
    --hero-padding: 1rem;
    --card-padding: 1rem;
    --button-height: 48px;
    --border-radius-modern: 16px;
    --shadow-elegant: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --spring-easing: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modern Home Container */
.home-container-modern {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0;
    max-width: 100%;
    overflow: hidden;
}

/* ===== HERO SECTION - ELEGANT ===== */
.hero-section-elegant {
    position: relative;
    min-height: var(--hero-min-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--hero-padding);
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 139, 34, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #fefefe 0%, #f8fafc 50%, #f1f5f9 100%);
    overflow: hidden;
    border-radius: 24px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Auth Section - Top Right */
.hero-auth {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 139, 34, 0.2);
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: -0.01em;
}

.auth-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(34, 139, 34, 0.15);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(34, 139, 34, 0.4);
}

.auth-btn:focus {
    outline: 2px solid rgba(16, 185, 129, 0.5);
    outline-offset: 2px;
}

.auth-icon {
    font-size: 0.875rem; /* Smaller icon */
}

.auth-text {
    font-size: 0.75rem;
    font-weight: 600;
}

.auth-btn.authenticated {
    background: linear-gradient(135deg, var(--primary) 0%, #10B981 100%);
    color: white;
    border-color: var(--primary);
}

.user-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.user-greeting {
    font-size: 0.8rem;
    color: #047857;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #374151;
    letter-spacing: -0.01em;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.trust-icon {
    font-size: 0.9rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.trust-text {
    white-space: nowrap;
}


/* Hero Content */
/* Enhanced Floating Letters (PRESERVE & ENHANCE) */
.hero-visual-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3; /* Higher z-index to show above content */
    pointer-events: none; /* Don't block interactions */
}

.floating-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(34, 139, 34, 0.03) 0%,
        transparent 60%
    );
    z-index: 2;
}

/* Hero Content */
.hero-content-modern {
    position: relative;
    z-index: 2;
    max-width: 100%;
    padding: 3rem 2rem 2rem 2rem;
    margin-top: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(31, 38, 135, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-title-elegant {
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: #1f2937;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
    pointer-events: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.hero-subtitle-refined {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #6b7280;
    font-weight: 400;
    margin: 0.75rem 0 2rem 0;
    line-height: 1.5;
    max-width: 520px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    letter-spacing: -0.01em;
    pointer-events: auto;
}


/* Trust Badges */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.trust-item {
    font-size: 0.8rem;
    color: #111827; /* Gray-900 for maximum visibility */
    font-weight: 600; /* Bolder */
    background: rgba(255, 255, 255, 0.95); /* More opaque background for contrast */
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(34, 139, 34, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

/* Hero Actions */
.hero-actions-simplified {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin-top: 1rem;
    pointer-events: auto; /* Re-enable pointer events for buttons */
}

/* Audience Message Styling */
.audience-message {
    margin-top: 1.5rem;
    text-align: center;
    max-width: 400px;
    opacity: 0.9;
    pointer-events: auto;
}

.audience-text {
    font-size: 1.05rem;
    color: #374151;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.01em;
}

.geez-highlight {
    font-family: var(--font-geez);
    font-weight: 600;
    color: #059669;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.audience-subtext {
    font-size: 0.875rem;
    color: #475569;
    font-style: italic;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-hero-primary {
    background: linear-gradient(135deg, #059669 0%, #10B981 50%, #34D399 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: var(--button-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s;
}

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(16, 185, 129, 0.45),
        0 4px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10B981 100%);
}

.btn-hero-primary:active {
    transform: scale(0.98);
}

.btn-hero-primary:focus {
    outline: 3px solid rgba(16, 185, 129, 0.4);
    outline-offset: 2px;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #047857;
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: var(--button-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-hero-secondary:hover {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    border-color: rgba(16, 185, 129, 0.6);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 25px rgba(16, 185, 129, 0.25),
        0 3px 12px rgba(0, 0, 0, 0.12);
}

.btn-hero-secondary:focus {
    outline: 3px solid rgba(16, 185, 129, 0.4);
    outline-offset: 2px;
}

/* ===== PROGRESS SECTION - MODERN ===== */
.progress-section-modern {
    padding: 0 1rem;
}

.progress-card-elegant {
    background: white;
    border-radius: var(--border-radius-modern);
    padding: 1.5rem;
    box-shadow: var(--shadow-elegant);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(34, 139, 34, 0.1);
}

/* Progress Ring */
.progress-ring-container {
    display: flex;
    justify-content: center;
}

.progress-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary) 0deg,
        var(--primary) calc(var(--progress) * 3.6deg),
        #e5e7eb calc(var(--progress) * 3.6deg),
        #e5e7eb 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-ring::before {
    content: '';
    width: 75px;
    height: 75px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.progress-center {
    position: relative;
    text-align: center;
    z-index: 1;
}

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

.progress-label {
    font-size: 0.8rem;
    color: #1f2937; /* Gray-800 for excellent visibility */
    font-weight: 600; /* Bolder */
}

/* Stats Elegant */
.stats-elegant {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.stat-label {
    font-size: 0.8rem;
    color: #1f2937; /* Gray-800 for excellent visibility */
    font-weight: 600; /* Bolder */
    margin-top: 0.25rem;
}

/* Current Level */
.current-level-modern {
    text-align: center;
    width: 100%;
}

.level-text {
    font-size: 0.9rem;
    color: #111827; /* Gray-900 for maximum visibility */
    font-weight: 500; /* Slightly bolder */
    margin: 0 0 1rem 0;
}

.btn-continue {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--spring-easing);
    min-height: 44px;
}

.btn-continue:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* ===== LEARNING PATHS ===== */
.learning-paths {
    padding: 0 1rem;
}

.section-title-modern {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-800);
    margin: 0 0 1.5rem 0;
}

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

.path-card {
    background: white;
    border-radius: var(--border-radius-modern);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--spring-easing);
    border: 2px solid transparent;
    box-shadow: var(--shadow-elegant);
    position: relative;
    overflow: hidden;
}

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

.path-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.card-icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.path-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-800);
    margin: 0 0 0.5rem 0;
}

.path-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.4;
}

.card-badge-featured {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== FEATURES MINIMAL ===== */
.features-minimal {
    padding: 0 1rem 2rem 1rem;
}

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

.feature-highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(34, 139, 34, 0.1);
}

.feature-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* ===== TABLET STYLES (768px+) ===== */
@media (min-width: 768px) {
    :root {
        --hero-min-height: 60vh;
        --hero-padding: 2rem;
        --card-padding: 2rem;
    }

    .hero-content-modern {
        max-width: 600px;
    }


    .trust-badges {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }

    .hero-actions-simplified {
        flex-direction: row;
        max-width: 400px;
        gap: 1rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        flex: 1;
    }

    .progress-ring {
        width: 120px;
        height: 120px;
    }

    .progress-ring::before {
        width: 90px;
        height: 90px;
    }

    .stats-elegant {
        flex-direction: row;
        justify-content: space-around;
    }

    .path-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .path-card.featured {
        grid-column: span 2;
    }

    .feature-highlights {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ===== DESKTOP STYLES (1024px+) ===== */
@media (min-width: 1024px) {
    :root {
        --hero-min-height: 70vh;
        --hero-padding: 3rem;
    }

    .home-container-modern {
        max-width: 1200px;
        margin: 0 auto;
    }

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

    .path-card.featured {
        grid-column: span 1;
    }

    /* Enhanced hover effects for desktop */
    .path-card:hover {
        transform: translateY(-4px);
    }

    .btn-hero-primary:hover {
        transform: translateY(-3px);
    }
}

/* Mobile optimizations for new elements */
@media (max-width: 768px) {
    .hero-content-modern {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        margin-top: 4rem;
    }

    .hero-auth {
        top: 1rem;
        right: 1rem;
        padding: 0.4rem;
    }

    .auth-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.4rem;
    }

    .user-greeting {
        font-size: 0.7rem;
    }

    .trust-indicators {
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .trust-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.4rem;
    }

    .hero-title-elegant {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .hero-subtitle-refined {
        font-size: clamp(1rem, 3vw, 1.15rem);
        margin: 0.5rem 0 1.5rem 0;
    }

    .audience-text {
        font-size: 1rem;
    }
}

/* ===== GAMES COMING SOON STYLES ===== */
.games-coming-soon {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.coming-soon-header {
    margin-bottom: 3rem;
}

.construction-icon {
    font-size: 4rem;
    animation: bounce 2s infinite;
    margin-bottom: 1rem;
}

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

.coming-soon-subtitle {
    color: #64748b;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

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

.game-preview-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: transform 0.3s ease;
}

.game-preview-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.game-preview-card .game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-preview-card h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.game-preview-card p {
    color: #64748b;
    margin: 0 0 1rem 0;
}

.coming-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fbbf24;
    color: #78350f;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.focus-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.coming-soon-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.coming-soon-footer {
    color: #94a3b8;
    font-size: 0.9rem;
}

.eta-text {
    margin: 0;
}

/* Mobile responsive for games coming soon */
@media (max-width: 768px) {
    .games-coming-soon {
        padding: 1rem;
    }

    .games-preview {
        grid-template-columns: 1fr;
    }

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

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

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .path-card,
    .btn-hero-primary,
    .btn-hero-secondary,
    .auth-btn {
        transition: none;
    }

    .path-card:hover,
    .btn-hero-primary:hover,
    .auth-btn:hover {
        transform: none;
    }

    .construction-icon {
        animation: none;
    }
}

/* ===== GAME LEVEL SELECTION STYLES ===== */

.games-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.games-header {
    text-align: center;
    margin-bottom: 30px;
}

.games-header h2 {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: var(--primary);
}

.games-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Quick Start Section */
.quick-start-section {
    background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.current-level-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.current-level-icon {
    font-size: 64px;
    line-height: 1;
}

.current-level-text {
    color: white;
}

.current-level-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: 600;
    margin-bottom: 4px;
}

.current-level-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.current-level-stats {
    font-size: 14px;
    opacity: 0.85;
}

.quick-start-btn {
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

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

.quick-start-btn .btn-icon {
    font-size: 24px;
}

.quick-start-btn .btn-difficulty {
    font-size: 13px;
    background: var(--background);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: capitalize;
}

.levels-divider {
    text-align: center;
    margin: 30px 0 20px 0;
    position: relative;
}

.levels-divider::before,
.levels-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 120px);
    height: 1px;
    background: var(--border);
}

.levels-divider::before {
    left: 0;
}

.levels-divider::after {
    right: 0;
}

.levels-divider span {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 20px;
    background: var(--background);
}

.game-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-level-card {
    background: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-level-card:not(.locked):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.game-level-card.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.game-level-card.current {
    border: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.game-level-card.current .level-header::after {
    content: '▶ CONTINUE';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.level-header {
    padding: 20px;
    text-align: center;
    color: white;
    position: relative;
}

.level-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.level-number {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.level-body {
    padding: 20px;
}

.level-body h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: var(--text);
}

.level-body p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.level-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
}

.char-count {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.high-score {
    color: var(--primary);
    font-weight: 600;
}

.difficulty-selector {
    display: flex;
    gap: 8px;
}

.diff-btn {
    flex: 1;
    padding: 10px 12px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}

.diff-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

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

.level-locked-msg {
    text-align: center;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Level unlock notification */
.level-unlocked-notification {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin: 16px 0;
    animation: slideIn 0.3s ease-out;
}

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

.level-info {
    text-align: center;
    font-size: 18px;
    color: var(--text-muted);
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.level-info .difficulty-badge {
    font-size: 14px;
    padding: 4px 12px;
    background: var(--background);
    border-radius: 20px;
    font-weight: 600;
}

/* ===== SOUND RUSH GAME STYLES ===== */

/* Game Container */
.sound-rush-game {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Start Screen */
.start-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.start-content {
  text-align: center;
  padding: 40px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 20px;
  border: 2px solid #059669;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 400px;
}

.start-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #059669, #10B981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.start-desc {
  font-size: 18px;
  color: #94A3B8;
  margin-bottom: 30px;
}

.difficulty-info {
  font-size: 24px;
  margin-bottom: 30px;
  padding: 15px;
  background: rgba(5, 150, 105, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.difficulty-info small {
  font-size: 14px;
  color: #94A3B8;
  display: block;
  margin-top: 5px;
}

.start-btn {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  transition: all 200ms;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

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

/* Header */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pause-btn {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.difficulty-badge {
  font-size: 24px;
}

/* Status Bar */
.game-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 20px;
}

.score {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Audio Visualizer */
.game-audio-viz {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  height: 40px;
  margin: 20px 0;
}

.game-audio-wave {
  width: 4px;
  height: 100%;
  background: linear-gradient(to top, #059669, #8B5CF6);
  border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
  transform-origin: bottom;
}

.game-audio-wave:nth-child(1) { animation-delay: 0ms; }
.game-audio-wave:nth-child(2) { animation-delay: 100ms; }
.game-audio-wave:nth-child(3) { animation-delay: 200ms; }
.game-audio-wave:nth-child(4) { animation-delay: 300ms; }
.game-audio-wave:nth-child(5) { animation-delay: 400ms; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.3); opacity: 0.6; }
  50% { transform: scaleY(1.0); opacity: 1.0; }
}

/* Timer Bar */
.game-timer-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 20px;
}

.game-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #FBBF24 50%, #EF4444 100%);
  border-radius: 5px;
  transition: width 50ms linear;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.game-timer-fill.warning {
  animation: timer-pulse 500ms ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Question Area */
.question-area {
  margin: 20px 0;
}

/* Character Buttons */
.game-char-button {
  min-height: 56px;
  width: 100%;
  padding: 16px;
  margin: 12px 0;
  background: linear-gradient(135deg, #1E293B 0%, #2D3748 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 42px;
  font-family: 'Noto Sans Ethiopic', serif;
  color: #F1F5F9;
  text-align: center;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0.0, 0.2, 1);
  touch-action: manipulation;
  user-select: none;
}

.game-char-button:active:not(:disabled) {
  transform: scale(0.96) translateY(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-char-button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.game-char-button.correct {
  animation: correct-flash 300ms ease;
}

.game-char-button.wrong {
  animation: wrong-shake 300ms ease;
  background: #DC2626;
}

@keyframes correct-flash {
  0% { background: #1E293B; }
  50% { background: #059669; transform: scale(1.05); }
  100% { background: #1E293B; transform: scale(1); }
}

@keyframes wrong-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(-5px); }
}

/* Progress */
.progress {
  text-align: center;
  margin-top: 20px;
  opacity: 0.7;
}

/* Pause Menu */
.pause-menu {
  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;
}

.pause-content {
  background: #1E293B;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
}

.menu-btn {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 10px 0;
  font-size: 18px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.menu-btn:hover {
  background: #047857;
}

/* Combo Celebration */
.combo-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  animation: combo-pop 2s ease-out forwards;
}

.combo-milestone {
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  padding: 30px 60px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.6);
}

.combo-text {
  font-size: 48px;
  font-weight: bold;
  color: white;
}

.bonus-points {
  font-size: 32px;
  color: #FDE68A;
  margin-top: 10px;
}

@keyframes combo-pop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* Screen Glow */
.game-screen-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.6) 0%, transparent 60%);
  animation: glow-pulse 1s ease-out forwards;
  z-index: 998;
}

@keyframes glow-pulse {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Particle Effect */
.game-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-explode 500ms ease-out forwards;
  z-index: 997;
}

@keyframes particle-explode {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--vx), var(--vy)) scale(0); opacity: 0; }
}

/* Game Summary */
.game-summary {
  max-width: 600px;
  margin: 0 auto;
  padding: 15px;
  text-align: center;
}

.game-summary h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.summary-stats {
  display: flex;
  gap: 12px;
  margin: 15px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 5px;
}

.stat {
  background: #1E293B;
  padding: 12px 16px;
  border-radius: 12px;
  min-width: 120px;
  flex-shrink: 0;
}

.stat-label {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #059669;
}

.weak-chars, .strong-chars {
  display: inline-block;
  margin: 8px;
  padding: 10px 16px;
  background: #1E293B;
  border-radius: 8px;
  vertical-align: top;
  max-width: calc(50% - 20px);
}

.weak-chars h3, .strong-chars h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.chars {
  font-size: 24px;
  font-family: 'Noto Sans Ethiopic', serif;
}

.xp-earned {
  margin: 15px 0;
  padding: 16px;
  background: linear-gradient(135deg, #059669, #047857);
  border-radius: 12px;
}

.xp-label {
  font-size: 14px;
  margin-bottom: 6px;
}

.xp-value {
  font-size: 32px;
  font-weight: bold;
  color: white;
}

.xp-earned.bonus {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.xp-bonus {
  font-size: 14px;
  margin-top: 4px;
  color: #FEF3C7;
  font-weight: 600;
}

/* Victory/Defeat Screen Styling */
.game-summary.victory {
  background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  border: 3px solid #10B981;
  border-radius: 20px;
}

.game-summary.defeat {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border: 3px solid #EF4444;
  border-radius: 20px;
}

.game-summary.retry {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 3px solid #F59E0B;
  border-radius: 20px;
}

.summary-message {
  font-size: 16px;
  margin: 12px 0 20px 0;
  line-height: 1.5;
  font-weight: 500;
  color: #1F2937;
}

/* Accuracy Progress Bar */
.accuracy-progress-bar {
  margin: 20px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.progress-label {
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1F2937;
}

.progress-track {
  position: relative;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 1s ease-out;
  border-radius: 12px;
}

.progress-fill.passed {
  background: linear-gradient(90deg, #10B981, #059669);
}

.progress-fill.failed {
  background: linear-gradient(90deg, #F59E0B, #D97706);
}

.progress-target {
  position: absolute;
  top: 0;
  height: 100%;
  width: 2px;
  background: #DC2626;
}

.progress-target::before {
  content: '70%';
  position: absolute;
  top: -20px;
  left: -12px;
  font-size: 10px;
  font-weight: bold;
  color: #DC2626;
}

/* Big Unlock Notification */
.level-unlocked-big {
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  padding: 24px;
  border-radius: 16px;
  margin: 20px 0;
  text-align: center;
  animation: celebrate 0.6s ease-out;
}

.unlock-icon {
  font-size: 64px;
  margin-bottom: 12px;
}

.level-unlocked-big h2 {
  font-size: 24px;
  color: white;
  margin: 8px 0;
}

.level-unlocked-big p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

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

/* Level Complete Notification */
.level-complete-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.level-complete-content {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  border: 3px solid #10B981;
  border-radius: 24px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s ease-out;
}

.complete-icon {
  font-size: 72px;
  margin-bottom: 16px;
}

.level-complete-content h2 {
  font-size: 32px;
  color: #10B981;
  margin-bottom: 12px;
}

.level-complete-content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.complete-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.complete-stat {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 12px;
}

.complete-stat .stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  display: block;
}

.complete-stat .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.pass-message {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #047857;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: bold;
  margin: 16px 0;
}

.retry-message {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: bold;
  margin: 16px 0;
}

.complete-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0 16px 0;
}

.btn-continue, .btn-finish {
  flex: 1;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-continue {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
}

.btn-continue:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-2px);
}

.btn-finish {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.btn-finish:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
}

.bonus-hint {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 12px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Summary Action Buttons */
.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  margin: 6px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.3);
  color: #1F2937;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.5);
}

.summary-actions {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Games Menu (One Card Per Game) */
.games-menu {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.games-menu-header {
  text-align: center;
  margin-bottom: 40px;
}

.games-menu-header h1 {
  font-size: 36px;
  margin-bottom: 12px;
  color: #F1F5F9;
}

.games-menu-header p {
  font-size: 18px;
  color: rgba(241, 245, 249, 0.7);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.game-card {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.game-card:not(.locked):hover {
  transform: translateY(-4px);
  border-color: #10B981;
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.2);
}

.game-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.game-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.game-icon {
  font-size: 48px;
}

.game-card h2 {
  font-size: 24px;
  color: white;
  margin: 0;
}

.game-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 48px;
}

.game-stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.stat-mini .stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.stat-mini .stat-value {
  font-size: 16px;
  font-weight: bold;
  color: white;
}

.game-card-play-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-card-play-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  transform: scale(1.02);
}

.game-card-play-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

/* Level Selection Page */
.sound-rush-levels {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.back-to-games-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.back-to-games-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.levels-header {
  text-align: center;
  margin-bottom: 30px;
}

.levels-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: #F1F5F9;
}

.levels-header p {
  font-size: 16px;
  color: rgba(241, 245, 249, 0.7);
}

.quick-continue-banner {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-icon {
  font-size: 40px;
}

.banner-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.banner-level {
  font-size: 18px;
  font-weight: bold;
  color: white;
}

.quick-continue-btn {
  background: white;
  color: #6366F1;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-continue-btn:hover {
  transform: scale(1.05);
}

.level-stats-mini {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 8px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

/* Mobile responsive for games menu and level selection */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: 1fr;
  }

  .quick-continue-banner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .quick-continue-btn {
    width: 100%;
  }

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

  .quick-start-section {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .current-level-info {
    flex-direction: column;
    text-align: center;
  }

  .current-level-icon {
    font-size: 48px;
  }

  .current-level-name {
    font-size: 20px;
  }

  .quick-start-btn {
    width: 100%;
    justify-content: center;
  }

  .levels-divider::before,
  .levels-divider::after {
    width: calc(50% - 100px);
  }

  .game-levels-grid {
    grid-template-columns: 1fr;
  }

  .game-level-card.current .level-header::after {
    font-size: 9px;
    padding: 3px 8px;
  }

  /* Mobile Compact Game Layout */
  .sound-rush-game {
    max-width: 100%;
    padding: 8px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .game-header {
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  .game-header h1 {
    font-size: 20px;
  }

  .game-status {
    margin-bottom: 8px;
    padding: 6px 0;
  }

  .score {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .game-audio-viz {
    height: 24px;
    margin-bottom: 8px;
  }

  .game-timer-bar {
    height: 6px;
    margin-bottom: 12px;
  }

  .question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    overflow-y: auto;
  }

  .game-char-button {
    min-height: 48px;
    margin: 4px 0;
    font-size: 36px;
    padding: 12px;
  }

  .progress {
    margin-top: 8px;
    font-size: 12px;
    padding: 4px 0;
  }

  /* Mobile Summary Screen */
  .game-summary {
    padding: 12px;
    max-height: 100vh;
    overflow-y: auto;
  }

  .game-summary h1 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .summary-message {
    font-size: 14px;
    margin: 8px 0 12px 0;
  }

  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    display: grid;
  }

  .stat {
    padding: 8px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-value {
    font-size: 16px;
  }

  .level-unlocked-big {
    padding: 16px;
    margin: 12px 0;
  }

  .unlock-icon {
    font-size: 48px;
  }

  .level-unlocked-big h2 {
    font-size: 20px;
  }

  .xp-earned {
    padding: 12px;
    margin: 12px 0;
  }

  .summary-actions {
    flex-direction: column;
    gap: 8px;
  }

  .summary-actions button {
    width: 100%;
  }

  /* Mobile Level Complete Notification */
  .level-complete-content {
    padding: 24px 16px;
    max-width: 95%;
  }

  .complete-icon {
    font-size: 56px;
  }

  .level-complete-content h2 {
    font-size: 24px;
  }

  .level-complete-content p {
    font-size: 16px;
  }

  .complete-stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 16px 0;
  }

  .complete-stat {
    padding: 12px;
  }

  .complete-actions {
    flex-direction: column;
    gap: 8px;
  }

  .btn-continue,
  .btn-finish {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  .bonus-hint {
    font-size: 13px;
  }

  .pass-message,
  .retry-message {
    font-size: 14px;
    padding: 10px;
  }
}
