: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 */
.progress-bar-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 32px;
    background: var(--theme-progress);
    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: 300;
    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: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
}

/* Vertical Addition Styles */
.vertical-addition {
    display: inline-block;
    position: relative;
    min-width: 150px;
}

.number-line {
    font-size: 3.5rem;
    color: var(--theme-primary);
    font-family: 'Bitcount Grid Single', monospace;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    margin-bottom: 0.2rem;
    text-align: right;
    padding-right: 0.8rem;
    display: block;
}

.operator-line {
    display: block;
    position: relative;
    border-bottom: 3px solid var(--theme-primary);
    padding-bottom: 0.3rem;
    margin-bottom: 0.3rem;
    text-align: right;
    padding-right: 0.8rem;
}

.operator {
    font-size: 3rem;
    font-family: 'Bitcount Grid Single', monospace;
    position: absolute;
    left: 0;
    top: 0;
}

#second-number {
    font-size: 3.5rem;
    color: var(--theme-primary);
    font-family: 'Bitcount Grid Single', monospace;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.equals-line {
    height: 20px;
}

/* Multiple choice specific styles */
.choices-section {
    text-align: center;
    margin-bottom: 1rem;
}

.choices-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.choice-button {
    min-width: 120px;
    height: 80px;
    font-size: 2rem;
    font-weight: 300;
    background: linear-gradient(45deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Karla', sans-serif;
    letter-spacing: 0.02em;
}

.choice-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.choice-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.choice-button:hover::before {
    width: 200px;
    height: 200px;
}

.choice-button:active {
    transform: translateY(-2px) scale(1.02);
}

.choice-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.choice-button.correct {
    background: linear-gradient(45deg, #22c55e 0%, #16a34a 100%);
    animation: correctPulse 0.6s ease-out;
}

.choice-button.incorrect {
    background: linear-gradient(45deg, #ef4444 0%, #dc2626 100%);
    animation: shake 0.5s ease-out;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    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); }
}

/* 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;
    letter-spacing: 0.01em;
}

.feedback-message.is-success {
    background: var(--theme-success);
    color: white;
    border: 2px solid var(--theme-primary);
}

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

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

#next-btn {
    background: var(--theme-secondary);
    border-color: var(--theme-secondary);
    color: white;
    font-weight: 300;
    font-size: 1.25rem;
    padding: 1.5rem 3rem;
}

#next-btn:hover {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
    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: 'Karla', sans-serif;
    margin: 1rem 0;
}

.result-message {
    font-size: 1.5rem;
    font-weight: 300;
    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: linear-gradient(45deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-color: transparent;
    color: white;
    font-weight: 300;
    font-size: 1.25rem;
    padding: 1.5rem 3rem;
}

#play-again-btn:hover {
    background: linear-gradient(45deg, var(--theme-secondary) 0%, var(--theme-accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

/* Responsive Design */
@media screen and (max-width: 768px) {
    .game-container .title {
        font-size: 1.5rem;
    }
    
    .number-line,
    #second-number {
        font-size: 3rem;
    }
    
    .operator {
        font-size: 2.5rem;
    }
    
    .vertical-addition {
        min-width: 120px;
    }
    
    .choice-button {
        min-width: 100px;
        height: 70px;
        font-size: 1.75rem;
    }
}

@media screen and (max-width: 480px) {
    .game-container .title {
        font-size: 1.25rem;
    }
    
    .number-line,
    #second-number {
        font-size: 2.5rem;
    }
    
    .operator {
        font-size: 2rem;
    }
    
    .vertical-addition {
        min-width: 100px;
    }
    
    .choice-button {
        min-width: 80px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .choices-grid {
        gap: 1rem;
    }
    
    .progress-bar {
        height: 28px;
    }
    
    .progress-timer {
        font-size: 1rem;
    }
}

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