/* Theme variables will be set dynamically by JavaScript */
:root {
    --theme-background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --theme-primary: #8b5cf6;
    --theme-secondary: #7c3aed;
    --theme-accent: #a78bfa;
    --theme-question: linear-gradient(135deg, #e9d5ff 0%, #f3e8ff 100%);
}

/* Base styles */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    background: var(--theme-background);
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Pattern overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Game container */
.box.game-container {
    background: var(--theme-question);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--theme-secondary);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

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

/* Section spacing */
.section {
    padding: 3rem 1.5rem;
}

/* Override Bulma column padding */
.column {
    padding: 0 !important;
}

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

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

.progress-bar {
    width: 100%;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    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-family: 'Karla', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: white;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Question container */
.question-container {
    background: var(--theme-primary);
    padding: 1rem;
    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 {
    font-family: 'Inter', sans-serif;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Clock display */
.clock-display {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    min-height: 250px;
    border: 3px solid var(--theme-secondary);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Clock SVG styles */
.clock-svg {
    width: 200px;
    height: 200px;
    transition: transform 0.3s ease;
}

.clock-svg:hover {
    transform: scale(1.05);
}

/* Choices grid */
.choices-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    padding: 0 0.5rem;
    margin: 2rem 0;
}

/* Choice button */
.choice-btn {
    background: white;
    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;
    gap: 0.5rem;
    min-height: 150px;
    position: relative;
    overflow: hidden;
}

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

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

.choice-btn.correct {
    background: #d1fae5;
    border-color: #10b981;
}

.choice-btn.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
}

/* Digital clock container */
.digital-clock-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digital-clock-svg {
    width: 90%;
    height: auto;
    max-width: 200px;
}

/* Feedback message */
.feedback-message {
    margin: 2rem auto;
    max-width: 600px;
    font-family: 'Inter', sans-serif;
    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 #10b981;
}

.feedback-message.is-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

/* Buttons */
.button {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    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);
}

#play-again-btn {
    width: auto;
    max-width: 200px;
    margin: 0 auto;
}

.button.is-info {
    background: var(--theme-accent);
    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);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#final-score {
    color: var(--theme-primary);
    font-family: 'Karla', sans-serif;
    font-weight: 700;
    margin: 1rem 0;
}

.result-message {
    font-size: 1.5rem;
    color: var(--theme-primary);
    margin: 2rem 0;
    font-family: 'Karla', sans-serif;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.choice-btn {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Responsive design */
@media (max-width: 768px) {
    .title.is-2 {
        font-size: 1.8rem !important;
    }
    
    .choices-grid {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .choice-btn {
        min-height: 100px;
        padding: 1rem;
        width: 100%;
        max-width: 250px;
    }
    
    .digital-clock-svg {
        max-width: 150px;
    }
    
    .clock-display {
        padding: 1.5rem;
        min-height: 250px;
    }
    
    .clock-svg {
        width: 180px;
        height: 180px;
    }
    
    #question-text {
        font-size: 1.2rem;
    }
    
    .game-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title.is-2 {
        font-size: 1.5rem !important;
    }
    
    .clock-display {
        padding: 1rem;
        min-height: 200px;
    }
    
    .clock-svg {
        width: 160px;
        height: 160px;
    }
    
    .choice-btn {
        min-height: 90px;
        max-width: 220px;
        padding: 0.75rem;
    }
    
    .digital-clock-svg {
        max-width: 120px;
    }
    
    .question-container {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    #question-text {
        font-size: 1.1rem;
    }
    
    .game-container {
        padding: 1rem;
    }
}

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