* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.content-card h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

/* Theory Section */
.theory-block {
    margin-bottom: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.theory-block h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.theory-block p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.example-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.example-box h4 {
    color: #667eea;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.example-grid {
    display: grid;
    gap: 15px;
}

.example-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.math {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
}

.explanation {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.pattern-visualization {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.pattern-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    min-width: 80px;
    text-align: center;
}

.arrow {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

/* Practice Section */
.practice-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.problem-container {
    text-align: center;
    margin-bottom: 30px;
}

.problem-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.problem-text {
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.answer-input {
    margin-bottom: 20px;
}

.answer-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.answer-input input {
    width: 200px;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.answer-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.result-message {
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
    margin-bottom: 20px;
}

.result-message.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stats {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

/* Quiz Section */
.quiz-intro {
    text-align: center;
    padding: 40px 20px;
}

.quiz-intro p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.quiz-progress {
    margin-bottom: 30px;
}

#questionCounter {
    display: block;
    text-align: center;
    font-weight: 500;
    color: #666;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.question-container {
    margin-bottom: 30px;
}

#questionText {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.options-container {
    display: grid;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.option-btn {
    padding: 15px 20px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-btn.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option-btn.correct {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.option-btn.incorrect {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
}

.quiz-controls {
    text-align: center;
}

.quiz-results {
    text-align: center;
    padding: 40px 20px;
}

.quiz-results h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
}

.results-summary {
    display: grid;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.result-label {
    font-weight: 500;
    color: #666;
}

.result-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .content-card {
        padding: 25px;
    }
    
    .practice-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .problem-text {
        font-size: 1.5rem;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
    
    .pattern-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
} 