/* Theme Variables */
:root {
    --theme-background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    --theme-background-secondary: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    --theme-background-tertiary: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    --theme-primary: #ff6b6b;
    --theme-secondary: #4ecdc4;
    --theme-accent: #45b7d1;
    --theme-text: #2c3e50;
    --theme-success: #26de81;
    --theme-error: #ee5a6f;
    --theme-warning: #f7b731;
    --theme-info: #4834d4;
    --theme-light: #f5f7fa;
    --theme-dark: #2c3e50;
    --theme-progress: #5f27cd;
    --theme-timer-bg: rgba(255, 255, 255, 0.3);
    --theme-timer-text: #ffffff;
}

body {
    background: var(--theme-background);
    min-height: 100vh;
    font-family: 'Fredoka', cursive;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Game container */
.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Title styling */
.title.is-2 {
    color: var(--theme-text);
    font-weight: 700;
    margin-bottom: 2rem !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

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

.progress-bar-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 32px;
    background: var(--theme-timer-bg);
    border-radius: 20px;
    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: 0%;
    transition: width 0.3s ease;
}

.progress-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--theme-timer-text);
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Question container */
.question-container {
    background: var(--theme-accent);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 2px solid var(--theme-secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#question-text {
    color: white;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sequence display */
.sequence-display {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clock item */
.clock-item {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

.clock-item.question-mark {
    background: var(--theme-warning);
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.clock-svg {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* Apply theme color filter to SVGs */
.clock-svg svg {
    filter: var(--svg-filter);
}

/* Choices grid */
.choices-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem auto;
    padding: 0 1rem;
    max-width: 800px;
}

/* Choice button */
.choice-button {
    background: #f0f0f0;
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    width: 160px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.choice-button:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--theme-accent);
}

.choice-button.correct {
    background: #d1fae5;
    border-color: var(--theme-success);
    animation: correctPulse 0.6s ease;
}

.choice-button.incorrect {
    background: #fee2e2;
    border-color: var(--theme-error);
    animation: shake 0.5s ease;
}

.choice-button.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.choice-clock-svg {
    width: 112px;
    height: 112px;
    object-fit: contain;
}

.choice-clock-svg svg {
    filter: var(--svg-filter);
}

/* Feedback message */
.feedback-message {
    margin: 2rem auto;
    max-width: 600px;
    font-weight: 500;
    text-align: center;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.feedback-message.is-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--theme-success);
}

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

/* Buttons */
.button {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

.button.is-primary:hover {
    background: var(--theme-secondary);
}

.button.is-info {
    background: var(--theme-info);
    color: white;
}

/* Result screen */
.result-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    border: 3px solid var(--theme-accent);
}

#final-score {
    color: var(--theme-primary);
    font-weight: 700;
    margin: 1rem 0;
}

.result-message {
    font-size: 1.5rem;
    color: var(--theme-text);
    margin: 2rem 0;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

/* Responsive design */
@media (max-width: 768px) {
    .title.is-2 {
        font-size: 1.8rem !important;
    }
    
    .sequence-display {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .clock-item {
        width: 100px;
        height: 100px;
    }
    
    .choices-grid {
        gap: 1rem;
    }
    
    .choice-button {
        min-height: 120px;
        width: 140px;
        padding: 1rem;
    }
    
    .choice-clock-svg {
        width: 80px;
        height: 80px;
    }
    
    .game-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title.is-2 {
        font-size: 1.5rem !important;
    }
    
    .sequence-display {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .clock-item {
        width: 80px;
        height: 80px;
    }
    
    .clock-item.question-mark {
        font-size: 2rem;
    }
    
    .choices-grid {
        gap: 1rem;
        padding: 0 1rem;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .choice-button {
        min-height: 120px;
        width: 80%;
        max-width: 280px;
        padding: 1rem;
    }
    
    .choice-clock-svg {
        width: 64px;
        height: 64px;
    }
    
    .question-container {
        padding: 1rem;
    }
    
    #question-text {
        font-size: 1.2rem !important;
    }
    
    .game-container {
        padding: 1rem;
    }
}

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