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

body {
    background: var(--theme-background);
    min-height: 100vh;
    font-family: 'Karla', sans-serif;
}

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

.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-title);
    font-family: 'Concert One', cursive;
    font-weight: 400;
    letter-spacing: 0.02em;
}

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

.progress-info .tag {
    font-family: 'Karla', sans-serif;
    font-size: 1.1rem;
    white-space: nowrap;
}

.progress-info #current-question,
.progress-info #score {
    margin-left: 0.25rem;
}

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

.progress-info .tag.is-info {
    background: var(--theme-info);
    color: var(--theme-title);
}

.progress-info .tag.is-success {
    background: var(--theme-progress);
    color: var(--theme-title);
}

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

#question-text {
    color: var(--theme-title);
    margin: 0;
    font-family: 'Concert One', cursive;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

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

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

.answer-section {
    margin: 2rem 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-title);
}

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

/* Extra small screens */
@media (max-width: 480px) {
    .game-container .title {
        font-size: 1rem;
    }
    
    #question-text {
        font-size: 1.1rem;
    }
    
    .tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    #final-score {
        font-size: 2.5rem;
    }
    
    #play-again-btn {
        font-size: 1rem;
        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 {
        font-size: 3rem;
    }
}