* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1E88E5;
    --primary-dark: #1565C0;
    --success: #43A047;
    --success-light: #E8F5E9;
    --error: #E53935;
    --error-light: #FFEBEE;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Nunito', 'Arial', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.score-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.score-item {
    background: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}

.score-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

/* Game Container */
.game-container {
    display: flex;
    justify-content: center;
}

/* Quiz Card */
.quiz-card {
    background: var(--white);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

/* Flag Container */
.flag-container {
    margin-bottom: 25px;
}

.flag-image {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
    border: 4px solid #E0E0E0;
}

/* Question Section */
.question-section {
    margin-bottom: 30px;
}

.question-section h2 {
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.5;
    text-transform: uppercase;
}

#paisNombre {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.option-btn {
    background: #F5F5F5;
    border: 3px solid #E0E0E0;
    padding: 20px 15px;
    border-radius: 15px;
    font-size: 1rem;
    font-family: 'Nunito', 'Arial', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-btn:hover:not(:disabled) {
    background: #E3F2FD;
    border-color: var(--primary);
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.25);
}

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

.option-btn.correct {
    background: var(--success-light);
    border-color: var(--success);
    color: #2E7D32;
    font-weight: 700;
    animation: correctPulse 0.5s ease;
}

.option-btn.incorrect {
    background: var(--error-light);
    border-color: var(--error);
    color: #C62828;
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Feedback */
.feedback {
    margin-top: 25px;
    padding: 18px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.15rem;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.35s ease;
}

.feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.feedback.correct {
    background: var(--success-light);
    color: #2E7D32;
    border: 2px solid var(--success);
}

.feedback.incorrect {
    background: var(--error-light);
    color: #C62828;
    border: 2px solid var(--error);
}

.feedback .correct-answer {
    display: block;
    font-size: 0.95rem;
    margin-top: 8px;
    font-weight: 600;
}

/* Instructions */
.instructions {
    background: var(--white);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.instructions-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.instructions h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.instructions ol {
    text-align: left;
    margin: 0 20px 25px 40px;
    color: var(--text-light);
    line-height: 2;
    font-size: 1.05rem;
}

.instructions strong {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.15rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.btn-start {
    background: var(--success);
    color: var(--white);
    font-size: 1.3rem;
}

.btn-start:hover {
    background: #388E3C;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}

/* Results Panel */
.results-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.results-card {
    background: var(--white);
    border-radius: 30px;
    padding: 45px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}

.results-card h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 10px;
}

.final-score {
    margin: 20px 0;
}

.big-score {
    display: block;
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.score-text {
    font-size: 1.2rem;
    color: var(--text-light);
}

.score-breakdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    border-radius: 15px;
}

.breakdown-item.correct {
    background: var(--success-light);
}

.breakdown-item.incorrect {
    background: var(--error-light);
}

.breakdown-icon {
    font-size: 1.5rem;
}

.breakdown-count {
    font-size: 1.8rem;
    font-weight: 800;
}

.breakdown-item.correct .breakdown-count {
    color: var(--success);
}

.breakdown-item.incorrect .breakdown-count {
    color: var(--error);
}

.breakdown-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

.results-summary {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.incorrect-list {
    background: var(--error-light);
    border-radius: 15px;
    padding: 18px;
    margin: 15px 0;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
}

.incorrect-list h4 {
    color: var(--error);
    margin-bottom: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 800;
}

.incorrect-list ul {
    list-style: none;
}

.incorrect-list li {
    padding: 5px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
    text-transform: uppercase;
}

.incorrect-list .country-name {
    font-weight: 800;
    color: var(--error);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

footer .credit {
    margin-top: 10px;
    font-size: 0.85rem;
}

footer .credit a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 700;
}

footer .credit a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .score-bar {
        gap: 15px;
    }

    .score-item {
        padding: 10px 18px;
    }

    .score-value {
        font-size: 1.3rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .quiz-card {
        padding: 25px;
    }

    .flag-image {
        width: 160px;
        height: 110px;
    }

    .options-grid {
        gap: 10px;
    }

    .option-btn {
        padding: 15px 12px;
        font-size: 0.9rem;
    }

    .instructions {
        padding: 25px;
    }

    .big-score {
        font-size: 3.5rem;
    }
}
