/* Climate Ladder Game - Styles */

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

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --light: #ecf0f1;
    --text: #333;
    --text-light: #7f8c8d;
    --bg: #f5f7fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

/* Game Steps */
.game-step {
    animation: fadeIn 0.3s ease;
}

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

/* Intro */
.intro {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.intro p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.intro em {
    color: var(--accent);
    font-style: italic;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.controls label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.controls select {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    min-width: 300px;
    width: 100%;
    max-width: 500px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.controls select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Threshold Selector */
.threshold-selector {
    width: 100%;
    max-width: 500px;
}

.threshold-selector label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.threshold-selector select {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.threshold-selector select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-yes {
    background: var(--success);
    color: white;
    min-width: 250px;
}

.btn-yes:hover {
    background: #219653;
}

.btn-no {
    background: var(--warning);
    color: white;
    min-width: 250px;
}

.btn-no:hover {
    background: #e67e22;
}

.btn-restart {
    background: var(--secondary);
    color: white;
    margin-top: 1.5rem;
}

.btn-restart:hover {
    background: #2980b9;
}

/* Question Card */
.question-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#country-info {
    margin-bottom: 2rem;
}

#country-name {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.emissions-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.emissions-display span {
    font-size: 1.5rem;
    color: var(--secondary);
    font-weight: 600;
}

#country-pct {
    color: var(--accent);
}

.global-context {
    color: var(--text-light);
    font-size: 0.95rem;
}

.question {
    margin: 2rem 0;
}

.question p {
    font-size: 1.4rem;
    font-weight: 500;
}

.question p span {
    color: var(--primary);
    font-weight: 700;
}

.choices {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Game Over */
.game-over {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    animation: popIn 0.4s ease;
}

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

.game-over h2 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

#reveal-text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--primary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.reveal-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.reveal-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.reveal-stats .stat span:first-child {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.reveal-stats .stat span.label {
    font-size: 0.9rem;
    color: var(--text-light);
    max-width: 120px;
}

.reveal-stats .stat.highlight span:first-child {
    font-size: 3rem;
    color: var(--accent);
}

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
}

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

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Histogram */
.histogram-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.histogram-container h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.histogram-svg {
    width: 100%;
    height: 250px;
    overflow: visible;
}



/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .intro p {
        font-size: 1.1rem;
    }
    
    #country-name {
        font-size: 1.5rem;
    }
    
    .emissions-display {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .question p {
        font-size: 1.2rem;
    }
    
    .choices {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .game-over h2 {
        font-size: 2.5rem;
    }
    
    .reveal-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .reveal-stats .stat span:first-child {
        font-size: 2rem;
    }
    
    .reveal-stats .stat.highlight span:first-child {
        font-size: 2.5rem;
    }
}

