/* Flag Quiz Game Styles */
:root {
    --primary-color: #006400;
    --primary-hover: #005200;
    --secondary-color: #f0f8f0;
    --accent-color: #ff6b35;
    --correct-color: #28a745;
    --incorrect-color: #dc3545;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #fff 100%);
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.game-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* Start Screen */
.game-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 800;
}

.game-description {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn.secondary {
    background: #6c757d;
    color: white;
}

.btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    width: 10%;
}

.question-counter {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.flag-container {
    margin: 2rem auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flag-image {
    width: 300px;
    height: auto;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

.flag-image:hover {
    transform: scale(1.05);
}

.question-text h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 2rem 0;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto;
}

.option-btn {
    font-family: inherit;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    -webkit-tap-highlight-color: transparent; /* Remove iOS tap highlight */
    touch-action: manipulation; /* Improve touch responsiveness */
}

/* Only show hover effects on devices that can actually hover (not touchscreens) */
@media (hover: hover) and (pointer: fine) {
    .option-btn:hover {
        border-color: var(--primary-color);
        background: var(--secondary-color);
        transform: translateX(5px);
    }
}

.option-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-btn.correct {
    background: var(--correct-color);
    color: white;
    border-color: var(--correct-color);
}

.option-btn.incorrect {
    background: var(--incorrect-color);
    color: white;
    border-color: var(--incorrect-color);
}

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

.feedback {
    margin: 2rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.correct {
    color: var(--correct-color);
}

.feedback.incorrect {
    color: var(--incorrect-color);
}

/* Results Screen */
.results-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.score-display {
    margin: 3rem 0;
}

.score-circle {
    display: inline-block;
    width: 200px;
    height: 200px;
    border: 8px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 auto;
}

.score-total {
    font-size: 2rem;
    color: var(--text-color);
}

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

.results-actions {
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .game-title {
        font-size: 2.2rem;
    }
    
    .flag-image {
        max-width: 250px;
        max-height: 160px;
    }
    
    .question-text h2 {
        font-size: 1.5rem;
    }
    
    .options-container {
        max-width: 100%;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }
    
    .results-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
    }
    
    .flag-image {
        max-width: 200px;
        max-height: 130px;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .option-btn {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}
