:root {
    --theme-background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --theme-primary: #2563eb;
    --theme-secondary: #3b82f6;
    --theme-accent: #60a5fa;
    --theme-question: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    --theme-success: #93c5fd;
    --theme-danger: #1d4ed8;
    --theme-info: #bfdbfe;
    --theme-title: #1e3a8a;
    --theme-progress: #93c5fd;
    --theme-score: #60a5fa;
}

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

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

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, var(--theme-accent) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--theme-primary) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--theme-secondary) 0%, transparent 50%);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.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);
    position: relative;
    overflow: hidden;
}


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

/* Override Bulma title styling */
h1.title {
    font-family: 'Comic Neue', cursive !important;
    font-weight: 400 !important;
    text-shadow: none !important;
}

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

.subtitle {
    color: var(--theme-primary);
    opacity: 0.9;
    font-weight: 400;
}

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

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

/* Progress Info */
.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 */
.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 {
    margin: 0;
    font-size: 3.5rem;
    color: var(--theme-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    font-family: 'Bitcount Grid Single', monospace;
    font-weight: 400;
}

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

#answer-input.correct {
    background: #d1fae5;
    border-color: #10b981;
}

#answer-input.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#submit-btn {
    font-size: 1.1rem;
    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.2rem;
    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;
    min-width: 80px;
}

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

#submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: scale(1);
}

/* Feedback Message */
.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: white;
}

.feedback-message.is-danger {
    background: #fecaca;
    color: var(--theme-danger);
    border: 2px solid var(--theme-danger);
}

/* Next Button */
#next-btn-container {
    margin-top: 1.5rem;
}

#next-btn {
    background: #10b981;
    border-color: #10b981;
    color: white;
    font-weight: 400;
    font-size: 1.25rem;
    padding: 1.5rem 3rem;
}

#next-btn:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Result Screen */
.result-stats {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#final-score {
    color: var(--theme-score);
    font-family: 'Concert One', cursive;
    margin: 1rem 0;
}

.result-message {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.result-message.is-success {
    background: #d1fae5;
    color: #10b981;
}

.result-message.is-warning {
    background: #fef3c7;
    color: #f59e0b;
}

.result-message.is-info {
    background: var(--theme-info);
    color: var(--theme-primary);
}

#play-again-btn {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
    font-weight: 400;
    font-size: 1.25rem;
    padding: 1.5rem 3rem;
}

#play-again-btn:hover {
    background: var(--theme-secondary);
    border-color: var(--theme-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .box.game-container {
        padding: 1.5rem;
    }
    
    .game-container .title {
        font-size: 1.5rem;
        margin-bottom: 2rem !important;
    }
    
    #question-text {
        font-size: 2.5rem;
    }
    
    .answer-controls {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    #answer-input {
        width: 120px !important;
        font-size: 1.5rem !important;
        height: 45px !important;
        padding: 0 0.75rem !important;
    }
    
    #submit-btn {
        font-size: 1rem !important;
        padding: 0 0.8rem !important;
        height: 45px !important;
        min-width: unset !important;
        width: auto !important;
    }
    
    #next-btn, #play-again-btn {
        font-size: 1.1rem;
        padding: 1.25rem 2.5rem;
    }
}

@media screen and (max-width: 480px) {
    .box.game-container {
        padding: 1rem;
    }
    
    .game-container .title {
        font-size: 1.25rem;
    }
    
    #question-text {
        font-size: 2.25rem;
    }
    
    .question-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    #answer-input {
        width: 110px !important;
        font-size: 1.4rem !important;
        height: 42px !important;
        padding: 0 0.75rem !important;
    }
    
    #submit-btn {
        font-size: 0.95rem !important;
        padding: 0 0.7rem !important;
        height: 42px !important;
        min-width: unset !important;
        width: auto !important;
    }
    
    .tag {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    

/* Very small screens */
@media screen and (max-width: 360px) {
    .section {
        padding: 1.5rem 0.75rem;
    }
    
    .box.game-container {
        padding: 0.75rem;
    }
    
    .game-container .title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .progress-info {
        margin-bottom: 2rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .question-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    #question-text {
        font-size: 2rem;
    }
    
    #answer-input {
        width: 100px !important;
        font-size: 1.3rem !important;
        height: 40px !important;
        padding: 0 0.5rem !important;
    }
    
    #submit-btn {
        font-size: 0.9rem !important;
        padding: 0 0.6rem !important;
        height: 40px !important;
        min-width: unset !important;
        width: auto !important;
    }
    

/* Utility Classes */
    .progress-bar {
        height: 26px;
    }
    
    .progress-timer {
        font-size: 1rem;
    }
    
    .progress-bar {
        height: 24px;
    }
    
    .progress-timer {
        font-size: 0.9rem;
    }
    
.is-hidden {
    display: none !important;
}
/* 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;
    }
}
