/**
 * Fraction Fun - Pizza Party Theme
 *
 * Pizza and bakery-themed fraction game
 * Builds on top of kid-friendly-theme.css
 *
 * Color Palette:
 * - Pizza Red: #FF4500
 * - Cheese Yellow: #FFD700
 * - Basil Green: #228B22
 * - Wood Brown: #8B4513
 */

/* ============================================================================
   THEME BACKGROUND OVERRIDE
   ============================================================================ */

body {
    background: linear-gradient(135deg, #FF4500 0%, #FFD700 50%, #8B4513 100%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================================
   FOOTER POSITIONING
   ============================================================================ */

.game-footer {
    margin-top: auto;
}

/* ============================================================================
   GAME HEADER
   ============================================================================ */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.question-counter {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #FF4500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.score-display {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ============================================================================
   DIFFICULTY SELECTION
   ============================================================================ */

.difficulty-selection {
    margin: 40px 0;
}

.difficulty-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

/* ============================================================================
   PROBLEM DISPLAY
   ============================================================================ */

.problem-display {
    margin: 40px 0;
}

.question-text {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 30px;
}

/* ============================================================================
   FRACTION VISUALS
   ============================================================================ */

.fraction-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
}

.fraction-bar {
    display: flex;
    gap: 4px;
    border: 3px solid #8B4513;
    border-radius: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.fraction-piece {
    width: 60px;
    height: 80px;
    border: 2px solid #8B4513;
    border-radius: 5px;
    background: white;
    transition: all 0.3s ease;
}

.fraction-piece.shaded {
    background: linear-gradient(135deg, #FF4500 0%, #FFD700 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Compare fractions layout */
.compare-fractions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #F0FFF0 0%, #E8F5E8 100%);
    border-radius: 15px;
    border: 3px solid #228B22;
}

.fraction-label {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2C3E50;
    padding: 10px 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #FF4500;
}

/* Operation visual layout */
.operation-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 20px;
}

.operation-symbol {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #FF4500;
}

/* ============================================================================
   ANSWER CHOICES
   ============================================================================ */

.answer-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 500px;
    margin: 30px auto;
}

.fraction-choice {
    font-size: 2rem !important;
    padding: 25px 30px !important;
}

/* ============================================================================
   FEEDBACK AREA
   ============================================================================ */

.feedback-area {
    margin: 30px 0;
    animation: fadeIn 0.3s ease;
}

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

/* ============================================================================
   RESULTS SCREEN
   ============================================================================ */

.results-summary {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

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

.stat-value {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #FF4500;
}

.stat-label {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: #7F8C8D;
    margin-top: 10px;
}

/* ============================================================================
   MISSED PROBLEMS
   ============================================================================ */

.missed-problems {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    border: 3px solid #8B4513;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.missed-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.missed-item {
    background: white;
    border: 2px solid #228B22;
    border-radius: 15px;
    padding: 15px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C3E50;
    text-align: center;
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.15);
}

/* ============================================================================
   GAME ACTIONS
   ============================================================================ */

.game-actions, .results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.practice-mode-option {
    margin: 30px 0;
    text-align: center;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .question-text {
        font-size: 1.3rem;
    }

    .fraction-piece {
        width: 40px;
        height: 60px;
    }

    .fraction-label {
        font-size: 1.5rem;
    }

    .operation-symbol {
        font-size: 2rem;
    }

    .fraction-choice {
        font-size: 1.5rem !important;
        padding: 18px 20px !important;
    }

    .answer-choices {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-header {
        font-size: 1rem;
    }

    .question-counter, .score-display {
        font-size: 1rem;
    }

    .results-summary {
        gap: 20px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .missed-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .difficulty-options {
        flex-direction: column;
        align-items: center;
    }

    .operation-visual {
        flex-direction: column;
        gap: 15px;
    }
}

/* ============================================================================
   BUTTON OVERRIDES
   ============================================================================ */

.btn-small {
    padding: 8px 20px !important;
    font-size: 0.9rem !important;
}
