#math-fall-game-wrapper {
    --uc-green: #27ae60;
    --uc-grey: #f4f7f6;
    --uc-dark-grey: #2c3e50;
    --uc-border: #ced4da;
    --uc-black: #000000;
    
    width: 100%;
    max-width: 450px;
    height: 600px;
    margin: 20px auto;
    font-family: 'Segoe UI', Arial, sans-serif;
    position: relative;
}

#game-container {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 3px solid var(--uc-green);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#top-bar {
    background: var(--uc-green);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    z-index: 10;
}

#play-area {
    flex: 1;
    background: var(--uc-grey);
    position: relative;
    overflow: hidden;
}

.question-box {
    position: absolute;
    background: white;
    color: var(--uc-black);
    padding: 8px 18px;
    border: 2px solid var(--uc-green);
    border-radius: 25px;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
}

#input-area {
    background: #e9ecef;
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 2px solid var(--uc-border);
}

#answer-input {
    flex: 1;
    padding: 12px;
    font-size: 20px;
    border-radius: 8px;
    border: 2px solid var(--uc-border);
    text-align: center;
    font-weight: bold;
    color: var(--uc-black);
}

#submit-btn {
    background: var(--uc-green);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

/* Overlays */
.game-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay-content {
    text-align: center;
    padding: 20px;
}

.overlay-content h1 { color: var(--uc-black); font-size: 36px; margin-bottom: 10px; }
.overlay-content p { color: #555; margin-bottom: 25px; font-weight: 500; }

#final-score {
    font-size: 60px;
    font-weight: 900;
    color: var(--uc-green);
    margin-bottom: 20px;
}

.menu-btn {
    display: block;
    width: 200px;
    padding: 14px;
    margin: 10px auto;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

.btn-green { background: var(--uc-green); color: white; }
.btn-grey { background: #6c757d; color: white; }

#top-close-btn {
    background: rgba(0,0,0,0.2);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}