: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);
    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;
}

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: 300 !important;
    letter-spacing: 0.02em;
}

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

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

/* 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 - fixed positioning */
.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%;
    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: 300;
    color: white;
    z-index: 10;
}

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

/* Question container */
.question-container {
    background: var(--theme-question);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#question-text {
    font-family: 'Bitcount Grid Single', monospace !important;
    font-size: 3.5rem;
    margin-bottom: 0 !important;
    font-weight: 300 !important;
    color: var(--theme-primary) !important;
    text-shadow: none;
}

/* Answer section */
.answer-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.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-family: 'Karla', sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    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;
    -webkit-appearance: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0 1rem;
    outline: none;
    background: white;
    transition: all 0.3s ease;
}

/* Remove number input spinner arrows */
.answer-input[type="number"]::-webkit-inner-spin-button,
.answer-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.answer-input[type="number"] {
    -moz-appearance: textfield;
}

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

.answer-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.answer-input.correct {
    background: #d1fae5;
    border-color: #10b981;
    animation: correctPulse 0.6s ease;
}

.answer-input.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

#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: none;
    box-sizing: border-box;
    margin: 0;
    letter-spacing: normal;
    min-width: 80px;
}

#submit-btn:hover:not(:disabled) {
    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: 300;
    font-family: 'Karla', sans-serif;
}

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

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

/* Next button */
#next-btn {
    background: #10b981;
    color: white;
    font-weight: 300;
    font-family: 'Karla', sans-serif;
}

#next-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

#final-score {
    color: var(--theme-score);
    font-family: 'Karla', sans-serif;
}

.result-message {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    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);
    color: white;
    font-weight: 300;
    font-family: 'Karla', sans-serif;
}

#play-again-btn:hover {
    background: var(--theme-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .box.game-container {
        padding: 1.5rem;
    }
    
    .game-container .title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem !important;
    }
    
    #question-text {
        font-size: 2.5rem;
    }
    
    .question-container {
        padding: 2rem 1.5rem;
    }
    
    .answer-input {
        font-size: 1.5rem;
        width: 120px;
        height: 45px;
        padding: 0 0.75rem;
    }
    
    #submit-btn {
        padding: 0 0.8rem;
        font-size: 1rem;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .game-container .title {
        font-size: 1.5rem;
    }
    
    #question-text {
        font-size: 2.25rem;
    }
    
    .question-container {
        padding: 1.5rem 1rem;
    }
    
    .answer-controls {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .answer-input {
        font-size: 1.4rem;
        width: 110px;
        height: 42px;
        padding: 0 0.75rem;
    }
    
    #submit-btn {
        font-size: 0.95rem !important;
        padding: 0 0.7rem !important;
        height: 42px !important;
        min-width: unset !important;
        width: auto !important;
    }
}

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

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