/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
}

/* Navigation Styles */
.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.9);
    color: #4a5568;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* Main Content Styles */
.main-content {
    flex: 1;
}

.section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Theory Section Styles */
.theory-content h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

.concept-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.concept-card h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.rule-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.math-formula {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.example-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.example-card:hover {
    transform: translateY(-5px);
}

.example-card h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.math-examples {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example {
    font-size: 1.1rem;
    color: #4a5568;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.visual-explanation {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.visual-explanation h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.visual-grid {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.visual-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.visual-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dots {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #667eea;
}

.label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.multiply-symbol, .equals {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}

.visual-text {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 500;
}

/* Practice Section Styles */
.practice-content h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.practice-intro {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.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;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.problem-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.problem-display {
    text-align: center;
    margin-bottom: 25px;
}

.problem-text {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    padding: 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 10px;
    display: inline-block;
}

.answer-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.answer-section label {
    font-weight: 500;
    color: #4a5568;
}

.answer-section input {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    width: 200px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.answer-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    min-height: 20px;
}

.feedback.correct {
    background: rgba(72, 187, 120, 0.1);
    color: #38a169;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.feedback.incorrect {
    background: rgba(245, 101, 101, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(245, 101, 101, 0.3);
}

.solution {
    margin-top: 20px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.solution h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

.progress-tracker {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
    color: #4a5568;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

/* Quiz Section Styles */
.quiz-content h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.quiz-intro {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.quiz-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.quiz-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.quiz-progress {
    text-align: center;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.question-container {
    margin-bottom: 25px;
}

.question {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.option.correct {
    border-color: #38a169;
    background: rgba(72, 187, 120, 0.1);
}

.option.incorrect {
    border-color: #e53e3e;
    background: rgba(245, 101, 101, 0.1);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-btn-small:hover {
    background: white;
    transform: translateY(-1px);
}

.quiz-results {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.quiz-results h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.results-summary {
    margin-bottom: 25px;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.score-message {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 500;
}

.results-breakdown {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.result-item.correct {
    border-left: 4px solid #38a169;
}

.result-item.incorrect {
    border-left: 4px solid #e53e3e;
}

.result-status {
    font-weight: 600;
}

.result-status.correct {
    color: #38a169;
}

.result-status.incorrect {
    color: #e53e3e;
}

/* Footer Styles */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section {
        padding: 25px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .practice-controls, .quiz-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .problem-text {
        font-size: 1.5rem;
    }
    
    .visual-item {
        flex-direction: column;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .nav-btn-small {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .problem-text {
        font-size: 1.3rem;
        padding: 15px;
    }
    
    .score-display {
        font-size: 2.5rem;
    }
} 