/* 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 */
.column {
    padding: 0 !important;
}

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

/* 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;
}

/* 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;
    }
}

.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 */
.game-container h1.title {
    font-family: 'Comic Neue', cursive !important;
    font-weight: 400 !important;
    margin-bottom: 2rem !important;
}

.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;



}

.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: 100px;
    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: 3rem;
    color: var(--theme-primary);
    font-family: 'Concert One', cursive;
}

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

.answer-section {
    margin: 0;
    display: flex;
    justify-content: center;
}

.answer-controls {
    display: inline-flex;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#answer-input {
    font-size: 1.8rem;
    font-family: 'Concert One', cursive;
    text-align: center;
    width: 150px;
    border: 3px solid var(--theme-primary);
    border-right: none;
    border-radius: 10px 0 0 10px;
    height: 50px;
    -moz-appearance: textfield; /* Firefox */
    -webkit-appearance: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0 1rem;
    outline: none;
    background: white;
    transition: all 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.02em;
}

#answer-input::-webkit-outer-spin-button,
#answer-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#answer-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px rgba(var(--theme-accent), 0.2);
    z-index: 1;
}

#submit-btn {
    font-size: 1.2rem;
    font-family: 'Karla', sans-serif;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(45deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
    border: none;
    height: 50px;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    margin: 0;
    letter-spacing: normal;
}

#submit-btn:hover {
    background: linear-gradient(45deg, var(--theme-secondary) 0%, var(--theme-accent) 100%);
    transform: scale(1.05);
}

.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;
    }
    
    .progress-bar {
        height: 28px;
    }
    
    .progress-timer {
        font-size: 1.1rem;
    }
    
    .numbers-grid {
        gap: 1rem;
        margin: 0 0 2rem 0;
    }
    
    .number-item {
        width: 90px;
        height: 75px;
    }
    
    .number-image {
        width: 55px;
        height: 55px;
    }
    
    .answer-controls {
        transform: scale(0.85);
    }
    
    #answer-input {
        width: 100px;
        height: 40px;
    }
    
    #submit-btn {
        height: 40px;
        padding: 0 1rem;
    }
    
    .game-container .title {
        margin-bottom: 2rem !important;
    }
    
    #question-text {
        font-size: 1.2rem;
    }
    
    .question-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .tag {
        padding: 0.5rem 1rem;
    }
    
    .progress-info {
        margin-bottom: 2rem;
    }
    
    .feedback-message {
        padding: 0.75rem;
    }
    
    #next-btn {
        padding: 0.5rem 1.5rem;
    }
    
    #play-again-btn {
        padding: 0.75rem 2rem;
        width: auto;
        min-width: 150px;
    }
}

/* Extra small screens */
/* Keep game container padding consistent with other games */
@media screen and (max-width: 480px) {
    .box.game-container {
        padding: 1rem;
    }
    
    .progress-bar {
        height: 26px;
    }
    
    .progress-timer {
        font-size: 1rem;
    }
}

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

@media (max-width: 480px) {
    .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;
        margin: 0 0 2rem 0;
    }
    
    .number-item {
        width: 80px;
        height: 65px;
    }
    
    .number-image {
        width: 45px;
        height: 45px;
    }
    
    .number-item.missing .question-mark {
    }
}

/* 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;
}

/* 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;
    }
}

/* Very small screens */
@media screen and (max-width: 360px) {
    .box.game-container {
        padding: 0.75rem;
    }
    
    .progress-info {
        margin-bottom: 1.5rem;
    }
    
    .progress-bar {
        height: 24px;
    }
    
    .progress-timer {
        font-size: 0.9rem;
    }
}

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