*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.progress-bar {
    background: rgba(255,255,255,0.3);
    height: 8px;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    background: #4ade80;
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 5px;
}

.content {
    padding: 40px;
}

.lesson-screen, .quiz-screen, .result-screen {
    display: none;
}

.lesson-screen.active, .quiz-screen.active, .result-screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.lesson-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: left;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.lesson-card.completed {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.lesson-card.locked {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.lesson-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
}

.lesson-desc {
    font-size: 0.9em;
    opacity: 0.9;
}

.question-card {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.5em;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
}

.question-prompt {
    font-size: 1.1em;
    color: #64748b;
    margin-bottom: 25px;
}

.options {
    display: grid;
    gap: 15px;
}

.option-btn {
    background: white;
    border: 3px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f1f5f9;
    transform: translateX(5px);
}

.option-btn.selected {
    border-color: #667eea;
    background: #ede9fe;
}

.option-btn.correct {
    border-color: #22c55e;
    background: #dcfce7;
}

.option-btn.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.check-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 1.1em;
    display: none;
}

.feedback.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback.correct {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #22c55e;
}

.feedback.incorrect {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.result-card {
    text-align: center;
    padding: 40px;
}

.result-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2em;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 15px;
}

.result-score {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
}

.result-message {
    font-size: 1.2em;
    color: #64748b;
    margin-bottom: 30px;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.secondary-btn {
    background: white;
    color: #667eea;
    border: 3px solid #667eea;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
}

.audio-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin-left: 15px;
    transition: all 0.2s ease;
}

.audio-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.streak-flame {
    display: inline-block;
    animation: flicker 1.5s infinite;
}

@keyframes flicker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}