/**
 * Place Value Pro Junior - Styles
 * Number City Construction Theme
 * Colors: Brick red (#E74C3C), Construction yellow (#F1C40F), Concrete gray (#95A5A6), Builder orange (#FF6B35)
 */

/* ============================================================================
   GAME CONTAINER - CONSTRUCTION THEME
   ============================================================================ */

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #FFE5CC 0%, #FFD4A3 50%, #FFC078 100%);
    font-family: 'Nunito', 'Comic Sans MS', sans-serif;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Footer positioning */
.game-footer {
    margin-top: auto;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(241, 196, 15, 0.1) 50px,
            rgba(241, 196, 15, 0.1) 52px
        );
    pointer-events: none;
}

.construction-mascot {
    font-size: 4rem;
    margin: 20px;
    display: inline-block;
    animation: constructionBounce 2s ease-in-out infinite;
}

@keyframes constructionBounce {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

/* ============================================================================
   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: #E74C3C;
}

.score-display {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #27AE60;
}

/* ============================================================================
   DIFFICULTY SELECTION - CONSTRUCTION THEMED CARDS
   ============================================================================ */

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

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

.construction-card {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFEAA7 100%);
    border: 4px solid #F1C40F;
    border-radius: 20px;
    padding: 30px 20px;
    margin: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3);
    min-width: 200px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.construction-card::before {
    content: '🏗️';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0.5;
}

.construction-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
    border-color: #FF6B35;
}

.construction-card.easy {
    border-color: #27AE60;
}

.construction-card.easy::before {
    content: '🪛';
}

.construction-card.medium {
    border-color: #F39C12;
}

.construction-card.medium::before {
    content: '🔨';
}

.construction-card.hard {
    border-color: #E74C3C;
}

.construction-card.hard::before {
    content: '⚙️';
}

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

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

.question-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #E74C3C;
    margin-bottom: 30px;
    text-align: center;
}

.number-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.visual-number {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
    border: 4px solid #95A5A6;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================================================
   EXPANDED FORM DISPLAY
   ============================================================================ */

.expanded-form {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.expanded-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #E74C3C;
    background: linear-gradient(135deg, #FFEAA7 0%, #FFD79A 100%);
    padding: 20px 30px;
    border-radius: 15px;
    border: 3px solid #F1C40F;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

.equals-sign {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #95A5A6;
}

.question-mark {
    font-family: 'Fredoka', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #FF6B35;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================================================
   COMPARE NUMBERS DISPLAY
   ============================================================================ */

.compare-numbers {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.compare-num {
    font-family: 'Fredoka', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #E74C3C;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFEAA7 100%);
    padding: 30px 40px;
    border-radius: 20px;
    border: 4px solid #F1C40F;
    box-shadow: 0 6px 16px rgba(241, 196, 15, 0.3);
}

.compare-symbol {
    font-family: 'Fredoka', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: #FF6B35;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================================================
   ROUNDING DISPLAY
   ============================================================================ */

.number-to-round {
    font-family: 'Fredoka', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: #E74C3C;
    background: linear-gradient(135deg, #FFEAA7 0%, #FFD79A 100%);
    padding: 40px 60px;
    border-radius: 25px;
    border: 5px solid #F1C40F;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.4);
}

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

.answer-choices {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px auto;
    max-width: 800px;
}

.place-value-choice {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    padding: 20px 40px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    color: #2C3E50;
    border: 4px solid #95A5A6;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.place-value-choice:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3);
    border-color: #FF6B35;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFEAA7 100%);
}

.place-value-choice:disabled {
    cursor: not-allowed;
}

.place-value-choice.correct {
    background: linear-gradient(135deg, #D5F5E3 0%, #ABEBC6 100%);
    border-color: #27AE60;
    color: #27AE60;
    animation: correctBounce 0.5s ease;
}

.place-value-choice.incorrect {
    background: linear-gradient(135deg, #FADBD8 0%, #F5B7B1 100%);
    border-color: #E74C3C;
    color: #E74C3C;
    animation: shake 0.4s ease;
}

@keyframes correctBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* ============================================================================
   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: #E74C3C;
}

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

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

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

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

@media (max-width: 768px) {
    .expanded-text {
        font-size: 2rem;
        padding: 15px 25px;
    }

    .equals-sign {
        font-size: 2rem;
    }

    .question-mark {
        font-size: 3rem;
    }

    .compare-num {
        font-size: 3rem;
        padding: 20px 30px;
    }

    .compare-symbol {
        font-size: 4rem;
    }

    .number-to-round {
        font-size: 3.5rem;
        padding: 30px 40px;
    }

    .place-value-choice {
        font-size: 1.5rem;
        padding: 15px 30px;
        min-width: 120px;
    }

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

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

    .results-summary {
        gap: 20px;
    }

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

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

    .visual-number {
        padding: 25px;
        min-height: 150px;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .expanded-form, .compare-numbers {
        gap: 20px;
    }
}

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

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