/* Theme Variables - will be set dynamically by JavaScript */
:root {
    --theme-background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --theme-primary: #7c3aed;
    --theme-secondary: #8b5cf6;
    --theme-accent: #a78bfa;
    --theme-question: linear-gradient(135deg, #ddd6fe 0%, #ede9fe 100%);
    --theme-success: #c4b5fd;
    --theme-danger: #6d28d9;
    --theme-info: #ddd6fe;
    --theme-title: #5b21b6;
    --theme-progress: #c4b5fd;
    --theme-score: #a78bfa;
}

/* No global font override - apply Concert One selectively */


/* Override Bulma column padding - keep horizontal padding for margin */
.column {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body {
    background: var(--theme-background);
    min-height: 100vh;
    font-family: 'Karla', sans-serif;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Section styling for proper spacing with header/footer */
.section {
    padding: 3rem 1.5rem;
}

/* Match top spacing with Add One game on mobile */
@media screen and (max-width: 480px) {
    .section {
        padding-top: 1.5rem;
    }
}

/* Add theme indicator line at top */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--theme-secondary);
    z-index: 9999;
}

.box.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.title {
    color: var(--theme-primary);
    font-family: 'Comic Neue', cursive !important;
    font-weight: 400 !important;
    letter-spacing: 0.02em;
}

/* Ensure consistent spacing for game title */

.progress-info {
    margin-bottom: 2rem;
}

/* Progress bar styles */
.progress-bar-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 32px;
    background: var(--theme-info);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-radius: 20px;
    width: 10%; /* Will be updated dynamically */
    transition: width 0.3s ease;
}

.progress-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Karla', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: white;
    z-index: 10;



}



/* Timer styling */
#timer {
    font-family: 'Karla', sans-serif;
}



.question-container {
    background: var(--theme-question);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#question-text {
    color: var(--theme-primary);
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.numbers-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 0 0 2rem 0;
}

.number-item {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.number-item.missing {
    background: var(--theme-question);
    border: 3px dashed var(--theme-primary);
}

.number-item.missing .question-mark {
    font-size: 4rem;
    color: var(--theme-primary);
    font-family: 'Concert One', cursive;
}

.number-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Multiple choice section */
.choices-section {
    margin-top: 0;
    text-align: center;
}

.choices-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    padding: 0 0.5rem;
}

.choice-button {
    min-width: 120px;
    height: 80px;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 0 2rem;
    font-family: 'Karla', sans-serif;
    position: relative;
    overflow: hidden;
}

.choice-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.choice-button:hover:not(:disabled)::before {
    left: 100%;
}

.choice-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.choice-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.choice-button.correct {
    background: linear-gradient(45deg, #10b981 0%, #059669 100%);
}

.choice-button.incorrect {
    background: linear-gradient(45deg, #ef4444 0%, #dc2626 100%);
}

.choice-button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.feedback-message {
    margin: 2rem auto;
    max-width: 600px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 400;
    font-family: 'Concert One', cursive;
    letter-spacing: 0.01em;
}

.feedback-message.is-success {
    background: var(--theme-success);
    color: var(--theme-primary);
}

.feedback-message.is-danger {
    background: #fecaca;
    color: #991b1b;
}

#next-btn {
    background: var(--theme-primary);
    color: white;
    font-family: 'Karla', sans-serif;
    font-size: 1.1rem;
    letter-spacing: normal;
}

#next-btn:hover {
    background: var(--theme-danger);
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.result-card .subtitle {
    font-family: 'Concert One', cursive;
    font-weight: 400;
}

#final-score {
    color: var(--theme-primary);
    font-size: 4rem;
    margin: 1rem 0;
}

.result-message {
    font-size: 1.6rem;
    color: var(--theme-primary);
    margin: 2rem 0;
    font-weight: 400;
    font-family: 'Concert One', cursive;
    letter-spacing: 0.02em;
}

#play-again-btn {
    background: var(--theme-primary);
    color: white;
    padding: 1rem 3rem;
    font-family: 'Karla', sans-serif;
    font-size: 1.2rem;
    letter-spacing: normal;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#play-again-btn:hover {
    background: var(--theme-danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    #question-text {
        font-size: 1.2rem;
    }

    .box.game-container {
        padding: 1.5rem;
    }
    

/* Extra small screens */
@media (max-width: 480px) {
    .box.game-container {
        padding: 1rem;
    }
    
    .game-container .title {
        font-size: 1rem;
    }
    
    #question-text {
    }
    
    .tag {
        padding: 0.4rem 0.8rem;
    }
    
    #final-score {
    }
    
    #play-again-btn {
        padding: 0.6rem 1.5rem;
        min-width: 120px;
    }
    
    .numbers-grid {
        gap: 0.5rem;
    }
    
    .number-item {
        width: 80px;
        height: 80px;
    }
    
    .number-image {
        width: 50px;
        height: 50px;
    }
    
    .number-item.missing .question-mark {
    }
    
    .choices-grid {
        gap: 0.5rem;
    }
    
    .choice-button {
        min-width: 60px;
        height: 50px;
        padding: 0 0.75rem;
    }
}

/* iPhone 4 and very small screens */
@media (max-width: 320px) {
    .choice-button {
        min-width: 50px;
        height: 40px;
        font-size: 1.1rem;
        padding: 0 0.5rem;
    }
    
    .choices-grid {
        gap: 0.4rem;
        padding: 0 0.25rem;
    }
    
    .choices-section {
        padding: 0 0.5rem;
    }
}

/* Very small screens */
@media screen and (max-width: 360px) {
    .box.game-container {
        padding: 0.75rem;
    }
}

/* Title font styling - Comic Neue */
.title {
    color: var(--theme-primary);
    font-family: 'Comic Neue', cursive !important;
    font-weight: 400 !important;
    letter-spacing: 0.02em;
}

.game-container h1.title {
    font-family: 'Comic Neue', cursive !important;
    font-weight: 400 !important;
    margin-bottom: 2rem !important;
}

#game-area {
}

/* Title responsive font sizes */
@media (max-width: 768px) {
    .game-container .title,
    .game-container h1.title {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    .game-container .title,
    .game-container h1.title {
        font-size: 1rem !important;
    }
}

/* Sticky footer styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
