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

/* Remove stroke attempt since these are embedded images */

/* Apply theme color to SVG elements */
/* Removed fill overrides to allow CSS filters to work on embedded images */

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

.answer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#answer-input {
    font-size: 1.5rem;
    font-family: 'Karla', sans-serif;
    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; /* Firefox */
    -webkit-appearance: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0 1rem;
    outline: none;
    background: white;
    color: var(--theme-primary);
    font-weight: 400;
}

/* Remove number input arrows */
#answer-input::-webkit-outer-spin-button,
#answer-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#answer-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    z-index: 1;
}

#answer-input::placeholder {
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 400;
}

#submit-btn {
    font-size: 1.2rem;
    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.5rem;
    box-sizing: border-box;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 400;
    transition: all 0.3s ease;
}

#submit-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, var(--theme-accent) 0%, var(--theme-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

#submit-btn:disabled {
    background: linear-gradient(45deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
}

/* 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;
    }
    
    .title.is-2 {
        font-size: 1.5rem;
    }
    
    .result-card {
        padding: 2rem 1.5rem;
    }
    
    #play-again-btn {
        width: 80%;
        max-width: 250px;
    }
    
    .frame-display {
        padding: 1rem;
    }
    
    .frame-svg {
        width: 95%;
        max-width: none;
        max-height: 300px;
    }
    
    #answer-input {
        font-size: 1.3rem;
        width: 120px;
        height: 45px;
    }
    
    #submit-btn {
        font-size: 1rem;
        padding: 0 1.2rem;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .frame-display {
        padding: 1rem;
    }
    
    .frame-svg {
        width: 98%;
        max-width: none;
        max-height: 280px;
    }
    
    .result-card {
        padding: 1.5rem 1rem;
    }
    
    #play-again-btn {
        width: 90%;
        max-width: 220px;
        padding: 0.8rem 2rem;
    }
    
    #answer-input {
        font-size: 1.2rem;
        width: 100px;
        height: 40px;
    }
    
    #submit-btn {
        font-size: 0.9rem;
        padding: 0 1rem;
        height: 40px;
    }
}

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