/* assets/css/style.css */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

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

h1, h2, h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button,
.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

button:hover,
.button:hover {
    background-color: #2980b9;
    color: white;
}

/* Game Interface Styles */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.score {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.question-container {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

option .difficulty {
    font-size: 0.85em;
    opacity: 0.8;
}

.flag-options,
.country-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.flag-options {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
}
.flag-option,
.country-option {
    padding: 1rem;
    text-align: center;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.flag-option:hover,
.country-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.flag-option img {
    max-width: 100%;
    height: auto;
}

.main-flag {
    display: block;
    margin: 0 auto 2rem;
    max-width: 300px;
    height: auto;
}

.countryname {
    font-size: 1.3em;
    font-weight: bolder;
}

.browse-categories {
    text-align: left;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #ddd;
}

.category-description {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.exit-game {
    display: block;
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.exit-game:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Feedback Messages */
.feedback {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

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

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

/* Leaderboard Styles */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.leaderboard-table th {
    background-color: var(--primary-color);
    color: white;
}

.leaderboard-table tr:hover {
    background-color: #f5f5f5;
}

.category-filter {
    margin-bottom: 2rem;
}

.actions {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .game-header {
        flex-direction: column;
        text-align: center;
    }
    
    .score {
        margin-top: 1rem;
    }
    
    .flag-options,
    .country-options {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-table {
        display: block;
        overflow-x: auto;
    }
}