/* Font Imports */
@font-face {
    font-family: 'Hindi';
    src: url('fonts/hindi.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Nepali';
    src: url('fonts/nepali.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Marathi';
    src: url('fonts/krutidev-marathi-font.ttf') format('truetype');
    font-display: swap;
}

/* Root Variables */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
}

/* Font Face Declarations */
@font-face {
    font-family: 'NepaliFont';
    src: url('./fonts/nepali.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MarathiFont';
    src: url('./fonts/krutidev-marathi-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HindiFont';
    src: url('./fonts/hindi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 50%, #f3e8ff 100%);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}

/* Mobile-first responsive container */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

@media (min-width: 769px) {
    .container {
        padding: 0 1.5rem;
    }
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

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

.w-full {
    width: 100%;
}

.h-16 {
    height: 4rem;
}

.min-h-screen {
    min-height: 100vh;
}

.bg-white {
    background-color: white;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.text-white {
    color: white;
}

.text-gray-900 {
    color: #111827;
}

.text-gray-600 {
    color: #4b5563;
}

.font-bold {
    font-weight: 700;
}

.text-xl {
    font-size: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-sm {
    font-size: 0.875rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Test Configuration Section */
.test-config {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.test-config h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.config-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.config-item label {
    color: white;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.config-item select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    font-weight: 500;
}

/* Start Button */
.start-btn {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
    display: block;
    margin: 0 auto;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

/* Virtual Keyboard */
.keyboard-container {
    
    
    
    
    
    width: 100%;
    max-width: 100%;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.keyboard-container h3 {
    display: none;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.keyboard-key {
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid rgb(230, 240, 237);
    border-radius: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 0, 0.4);
    position: relative;
    overflow: hidden;
    flex-direction: column;
    text-shadow: 0 0 5px rgb(255, 255, 255);
}

.key-main {
    font-size: 14px;
    font-weight: bold;
}

.key-shift {
    font-size: 10px;
    color: #666;
    position: absolute;
    top: 2px;
    right: 4px;
}

.keyboard-key:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgb(255, 255, 255);
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-color: rgb(255, 255, 255);
    color: #fdfdfd;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.9);
}

.keyboard-key.space {
    min-width: 300px;
    height: 60px;
}

.keyboard-key.tab {
    min-width: 80px;
}

.keyboard-key.caps {
    min-width: 90px;
}

.keyboard-key.shift {
    min-width: 100px;
}

.keyboard-key.enter {
    min-width: 110px;
}

.keyboard-key.backspace {
    min-width: 90px;
}

.keyboard-key.ctrl,
.keyboard-key.alt {
    min-width: 70px;
}

/* Gaming Number Keyboard Styles for Lesson 4 */


@keyframes correctGlow {
    0% { 
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
        color: #00ff00;
    }
    50% { 
        box-shadow: 0 0 30px rgba(0, 255, 0, 1);
        color: #ffffff;
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
        color: #007bff;
        transform: scale(1);
    }
}

@keyframes incorrectFlash {
    0%, 20%, 40%, 60%, 80% { 
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
        color: #ff0000;
        transform: translateX(-2px);
    }
    10%, 30%, 50%, 70%, 90% { 
        box-shadow: 0 0 25px rgba(255, 0, 0, 1);
        color: #ffffff;
        transform: translateX(2px);
    }
    100% { 
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
        color: #007bff;
        transform: translateX(0);
    }
}

/* Key States */
.keyboard-key.pressed {
    background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 0, 0.6);
}

.keyboard-key.correct-press {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    border-color: rgba(34, 197, 94, 1);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(34, 197, 94, 0.6);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.keyboard-key.incorrect-press {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    border-color: rgba(239, 68, 68, 1);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(239, 68, 68, 0.6);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

/* Test Area */
.test-area {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.test-area h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Text Display */
.text-display {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 80px;
}

.text-display p {
    color: white;
    font-size: 1.125rem;
    line-height: 1.8;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    white-space: pre-wrap;
}

/* Input Area */
.input-area {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.typing-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Language-specific input styles */
.typing-input.nepali {
    font-family: 'NepaliFont', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

.typing-input.marathi {
    font-family: 'MarathiFont', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

.typing-input.hindi {
    font-family: 'HindiFont', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

.typing-input.urdu {
    font-family: 'Noto Nastaliq Urdu', 'Arabic Typesetting', serif;
    font-size: 1.3rem;
    line-height: 2;
    direction: rtl;
    text-align: right;
}

.typing-input.bangla {
    font-family: 'Noto Sans Bengali', 'SolaimanLipi', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

.typing-input.gujarati {
    font-family: 'Noto Sans Gujarati', 'Shruti', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

.typing-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

.btn-pause {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-pause:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.stat-card h4 {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-value {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-unit {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .keyboard-key {
        min-width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }
    
    .keyboard-key.space {
        min-width: 150px;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        min-height: 44px;
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    /* Touch-friendly buttons */
    button, .btn, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Larger touch targets for mobile */
    a, button, input, select, textarea {
        min-height: 44px;
    }
    
    /* Form elements mobile optimization */
    input, select, textarea {
        font-size: 16px;
        padding: 12px;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.pulse {
    animation: pulse 2s infinite;
}

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

/* Hidden class */
.hidden {
    display: none;
}

/* Typing effects */
.correct {
    background-color: #dcfce7;
    color: #166534;
}

.incorrect {
    background-color: #fecaca;
    color: #dc2626;
}

.current {
    background-color: #dbeafe;
    color: #1d4ed8;
}

#practice-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid #e9ecef;
    margin-bottom: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Mobile typography optimization */
@media (max-width: 480px) {
    #practice-text {
        font-size: 1rem;
        line-height: 1.6;
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    p, span, div {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Language-specific font styles */
#practice-text.nepali {
    font-family: 'NepaliFont', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

#practice-text.marathi {
    font-family: 'MarathiFont', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

#practice-text.hindi {
    font-family: 'HindiFont', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

#practice-text.urdu {
    font-family: 'Noto Nastaliq Urdu', 'Arabic Typesetting', serif;
    font-size: 1.3rem;
    line-height: 2;
    direction: rtl;
    text-align: right;
}

#practice-text.bangla {
    font-family: 'Noto Sans Bengali', 'SolaimanLipi', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

#practice-text.gujarati {
    font-family: 'Noto Sans Gujarati', 'Shruti', sans-serif;
    font-size: 1.3rem;
    line-height: 2;
}

/* Language specific fonts */
.hindi-text {
    /* Use Unicode compatible font */
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.nepali-text {
    /* Use Unicode compatible font */
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.marathi-text {
    /* Use Unicode compatible font */
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.bangla-text {
    font-family: 'Noto Sans Bengali', sans-serif;
}

.urdu-text {
    font-family: 'Noto Nastaliq Urdu', sans-serif;
    direction: rtl;
}

.gujarati-text {
    font-family: 'Noto Sans Gujarati', sans-serif;
}

/* Tab Navigation Styles */
.tab-content {
    transition: opacity 0.3s ease-in-out;
}

.tab-content.hidden {
    display: none;
}

.tab-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.tab-btn::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;
}

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

/* Feature Section Animations */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Game Card Animations */
.game-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Achievement Badge Styles */
.achievement-badge {
    position: relative;
    overflow: hidden;
}

.achievement-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.achievement-badge:hover::after {
    animation: shine 0.6s ease-in-out;
    opacity: 1;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Responsive Tab Navigation */
@media (max-width: 768px) {
    .tab-navigation {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tab-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 640px) {
    .tab-btn {
        min-width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Responsive Images and Media */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* User Avatar Responsive Styles */
.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .user-avatar {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Mobile User Avatar */
.mobile-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .mobile-user-avatar {
        width: 3rem;
        height: 3rem;
    }
}

/* SVG Icons Responsive */
svg {
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
}

/* Logo and Brand Images */
.logo-image {
    max-height: 1.5rem;
    width: auto;
}

@media (min-width: 768px) {
    .logo-image {
        max-height: 2rem;
    }
}

/* Payment Gateway Images */
.payment-logo {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
}

@media (max-width: 480px) {
    .payment-logo {
        height: 1.25rem;
    }
}

/* Progress Ring SVG */
.progress-ring {
    width: 4rem;
    height: 4rem;
}

@media (min-width: 768px) {
    .progress-ring {
        width: 5rem;
        height: 5rem;
    }
}

/* Responsive Media Containers */
.media-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.media-container img,
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Icon Containers */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-container svg {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 768px) {
    .icon-container svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Responsive Typography */
/* Base font sizes for mobile */
html {
    font-size: 14px;
}

@media (min-width: 640px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }
}

/* Headings responsive */
h1 {
    font-size: 1.875rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }
}

h2 {
    font-size: 1.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    h2 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
}

h3 {
    font-size: 1.25rem;
    line-height: 1.4;
}

@media (min-width: 768px) {
    h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
}

/* Body text responsive */
body {
    line-height: 1.6;
}

@media (min-width: 768px) {
    body {
        line-height: 1.5;
    }
}

/* Button text responsive */
.btn-text-responsive {
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .btn-text-responsive {
        font-size: 1rem;
    }
}

/* Small text responsive */
.text-small-responsive {
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .text-small-responsive {
        font-size: 0.875rem;
    }
}

/* Large text responsive */
.text-large-responsive {
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .text-large-responsive {
        font-size: 1.25rem;
    }
}

/* Extra large text responsive */
.text-xl-responsive {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .text-xl-responsive {
        font-size: 1.5rem;
    }
}

/* 2XL text responsive */
.text-2xl-responsive {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .text-2xl-responsive {
        font-size: 1.875rem;
    }
}

/* 3XL text responsive */
.text-3xl-responsive {
    font-size: 1.875rem;
}

@media (min-width: 768px) {
    .text-3xl-responsive {
        font-size: 2.25rem;
    }
}

/* 4XL text responsive */
.text-4xl-responsive {
    font-size: 2.25rem;
}

@media (min-width: 768px) {
    .text-4xl-responsive {
        font-size: 3rem;
    }
}

/* Dashboard Specific Styles */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #f0f4ff 50%, #faf5ff 75%, #fef7f0 100%);
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.dashboard-header:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stat-card {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card.blue {
    --gradient-from: #3b82f6;
    --gradient-to: #2563eb;
}

.stat-card.green {
    --gradient-from: #10b981;
    --gradient-to: #059669;
}

.stat-card.purple {
    --gradient-from: #8b5cf6;
    --gradient-to: #7c3aed;
}

.stat-card.orange {
    --gradient-from: #f59e0b;
    --gradient-to: #d97706;
}

.result-item {
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.result-item:hover::before {
    transform: scaleY(1);
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.leaderboard-item {
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.leaderboard-item.current-user {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.leaderboard-item.current-user:hover {
    background: rgba(59, 130, 246, 0.15);
}

.rank-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(251, 191, 36, 0.3);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(156, 163, 175, 0.3);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3);
}

.progress-chart-placeholder {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
    transition: all 0.3s ease;
}

.progress-chart-placeholder:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(59, 130, 246, 0.4);
}

.login-modal {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.5);
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
    animation: slideInRight 0.3s ease-out;
}

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

/* Dashboard Responsive Design */
@media (max-width: 1024px) {
    .dashboard-container {
        padding: 0 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.25rem;
    }
    
    .dashboard-header p {
        font-size: 0.875rem;
    }
    
    .stat-card {
        padding: 1rem;
        text-align: center;
    }
    
    .result-item,
    .leaderboard-item {
        padding: 0.75rem;
    }
    
    .login-form {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .dashboard-container {
        padding: 0 0.5rem;
    }
    
    .dashboard-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .progress-chart-placeholder {
        min-height: 12rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

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

/* Dark mode support for dashboard */
@media (prefers-color-scheme: dark) {
    .dashboard-container {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #312e81 50%, #581c87 75%, #7c2d12 100%);
    }
    
    .dashboard-header {
        background: rgba(15, 23, 42, 0.9);
        border-bottom-color: rgba(71, 85, 105, 0.8);
    }
    
    .dashboard-card {
        background: rgba(15, 23, 42, 0.95);
        border-color: rgba(71, 85, 105, 0.5);
        color: #f1f5f9;
    }
    
    .result-item,
    .leaderboard-item {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(71, 85, 105, 0.5);
        color: #f1f5f9;
    }
    
    .result-item:hover,
    .leaderboard-item:hover {
        background: rgba(30, 41, 59, 0.95);
    }
}

/* Quiz Type Selection Styles */
.selected-quiz-type {
    border: 3px solid #fbbf24 !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5) !important;
    transform: scale(1.05) !important;
}

.quiz-type-option {
    transition: all 0.3s ease;
}

.quiz-type-option:hover {
    transform: translateY(-2px);
}

/* Late Answer Alert Styles */
.late-answer-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fbbf24;
    color: #1f2937;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.5);
    animation: alertFadeIn 0.3s ease-in-out;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Late Correct and Timeout Correct Answer Styles */
.option.late-correct,
.option.timeout-correct {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
    border: 2px solid #f59e0b !important;
    animation: yellowPulse 0.5s ease-in-out;
}

@keyframes yellowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}
