/* 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-light: #ede9fe;
    --theme-success: #22c55e;
    --theme-danger: #dc2626;
    --theme-info: #ddd6fe;
    --theme-title: #5b21b6;
    --theme-progress: #c4b5fd;
    --theme-score: #a78bfa;
    --theme-primary-rgb: 124, 58, 237;
}

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

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

/* Game container styling */
.game-container {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 600px;
}

/* Title styling */
.game-container .title {
    color: var(--theme-primary);
    margin-bottom: 2rem !important;
    font-family: 'Concert One', cursive !important;
    font-weight: normal !important;
}

/* Progress info styling */
.progress-info {
    margin-bottom: 2rem;
}

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

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

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

.tag {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
}

.tag.is-info {
    background: var(--theme-accent);
    color: white;
    border: 2px solid var(--theme-secondary);
}

.tag.is-success {
    background: var(--theme-score);
    color: white;
    border: 2px solid var(--theme-secondary);
}

/* Question container */
.question-container {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: #f7f7f7;
    border-radius: 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.question-container .subtitle {
    font-family: 'Concert One', cursive !important;
    color: var(--theme-primary);
    margin: 0 !important;
}

/* Numbers display */
.numbers-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.number-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid transparent;
    border-radius: 20px;
    padding: 1rem;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.number-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.number-option.selected {
    border-color: var(--theme-primary);
    background: var(--theme-light);
    box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.3);
    transform: scale(1.05);
}

.number-option.correct {
    border-color: #4CAF50;
    background: #E8F5E9;
    animation: correctPulse 0.6s ease;
}

.number-option.incorrect {
    border-color: #f44336;
    background: #FFEBEE;
    animation: shake 0.5s ease;
}

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

/* Submit section */
.submit-section {
    text-align: center;
    margin-bottom: 2rem;
}

.submit-section .button {
    font-family: 'Karla', sans-serif !important;
    font-weight: 700;
    padding: 1rem 3rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.submit-section .button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.submit-section .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-section .button.is-primary {
    background-color: var(--theme-primary);
    color: white;
}

/* Feedback message */
.feedback-message {
    text-align: center;
    padding: 1.5rem;
    border-radius: 15px;
    font-family: 'Concert One', cursive !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feedback-message.correct {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 2px solid #4CAF50;
}

.feedback-message.incorrect {
    background-color: #FFEBEE;
    color: #C62828;
    border: 2px solid #f44336;
}

/* Next button container */
#next-btn-container .button {
    font-family: 'Karla', sans-serif !important;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background-color: var(--theme-info);
    color: white;
    transition: all 0.3s ease;
}

#next-btn-container .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Result screen */
#result-screen {
    padding: 2rem;
}

.result-card {
    background: #f7f7f7;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.result-card .title {
    color: var(--theme-primary);
    font-family: 'Concert One', cursive !important;
    margin-bottom: 0.5rem !important;
}

.result-card .subtitle {
    font-family: 'Concert One', cursive !important;
    color: #666;
}

#final-score {
    color: var(--theme-success);
}

.result-message {
    font-family: 'Concert One', cursive !important;
    font-size: 1.5rem;
    color: var(--theme-primary);
    margin: 1.5rem 0;
}

#play-again-btn {
    font-family: 'Karla', sans-serif !important;
    font-weight: 700;
    padding: 1rem 3rem;
    border-radius: 50px;
    background-color: var(--theme-primary);
    color: white;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

#play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Animations */
@keyframes correctPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .question-label::after {
        content: 'Q:';
    }
    
    .question-label {
        font-size: 0;
    }
    
    .question-label::after {
        font-size: 0.9rem;
    }
    
    .numbers-display {
        gap: 1.5rem;
    }
    
    .number-image {
        width: 80px;
        height: 80px;
    }
    
    .question-container .subtitle {
        font-size: 1.5rem !important;
    }
    
    .submit-section .button {
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
    }
    
    .game-container .title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .tag {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .progress-info {
        margin-bottom: 1.5rem;
    }
}

/* Hide elements */
.is-hidden {
    display: none !important;
}