/* Theme Variables */
:root {
    --theme-primary: #3b82f6;
    --theme-secondary: #60a5fa;
    --theme-accent: #2563eb;
    --theme-background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --theme-success: #10b981;
    --theme-danger: #ef4444;
    --theme-warning: #f59e0b;
    --theme-info: #3b82f6;
    --theme-light: #f3f4f6;
    --theme-dark: #1f2937;
    --theme-svg-fill: #3b82f6;
}

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

/* Game Container */
.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--theme-primary) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Title */
.title.is-2 {
    color: var(--theme-primary);
    margin-bottom: 2rem;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
}

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

.progress-bar-container {
    background: #f3f4f6;
    border-radius: 20px;
    height: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-timer {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-weight: 400;
    color: #6b7280;
}

/* Question Container */
.question-container {
    margin-bottom: 2rem;
}

.question-container .subtitle {
    color: #374151;
    font-family: 'Comic Neue', cursive;
    font-size: 1.5rem;
}

/* Frame Display Container */
.frame-display {
    background: #f9fafb;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* SVG Frame Styling */
.frame-svg {
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 350px;
}

/* Answer Section */
.answer-section {
    margin-bottom: 2rem;
}

/* Answer Options Grid */
.answer-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Answer Option Button */
.answer-option {
    background: white;
    border: 3px solid var(--theme-primary);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    font-size: 2rem;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    color: var(--theme-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-option:hover:not(:disabled) {
    background: var(--theme-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.answer-option.selected {
    background: var(--theme-primary);
    color: white;
}

.answer-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-option.correct {
    background: var(--theme-success);
    border-color: var(--theme-success);
    color: white;
    animation: pulse 0.5s ease;
}

.answer-option.incorrect {
    background: var(--theme-danger);
    border-color: var(--theme-danger);
    color: white;
    animation: shake 0.5s ease;
}

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

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

/* Feedback Message */
.feedback-message {
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 400;
    font-size: 1.1rem;
    text-align: center;
}

.feedback-message.is-success {
    background: #d1fae5;
    color: #065f46;
}

.feedback-message.is-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Next Button */
#next-btn {
    background: var(--theme-accent);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

#next-btn:hover {
    background: var(--theme-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--theme-accent);
}

/* Result Screen */
.result-card {
    background: #f9fafb;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-card .title {
    color: var(--theme-primary);
    margin-bottom: 1.5rem;
}

.result-message {
    margin: 2rem 0;
    font-size: 1.25rem;
    font-weight: 400;
    color: #374151;
}

#play-again-btn {
    background: var(--theme-primary);
    color: white;
    padding: 1rem 3rem;
    border-radius: 10px;
    font-weight: 400;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}

#play-again-btn:hover {
    background: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Hidden class */
.is-hidden {
    display: none !important;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.frame-display img {
    animation: slideIn 0.5s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-container {
        padding: 1.5rem;
    }
    
    .result-card {
        padding: 2rem 1.5rem;
    }
    
    #play-again-btn {
        width: 80%;
        max-width: 250px;
    }
    
    .title.is-2 {
        font-size: 1.5rem;
    }
    
    .frame-display {
        padding: 1rem;
    }
    
    .frame-svg {
        width: 95%;
        max-width: none;
        max-height: 300px;
    }
    
    .answer-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        max-width: 400px;
    }
    
    .answer-option {
        font-size: 1.5rem;
        padding: 1rem 0.75rem;
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .frame-display {
        padding: 1rem;
    }
    
    .result-card {
        padding: 1.5rem 1rem;
    }
    
    #play-again-btn {
        width: 90%;
        max-width: 220px;
        padding: 0.8rem 2rem;
    }
    
    .frame-svg {
        width: 98%;
        max-width: none;
        max-height: 280px;
    }
    
    .answer-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0;
    }
    
    .answer-option {
        font-size: 1.3rem;
        padding: 0.8rem 0.5rem;
        min-height: 50px;
    }
}

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