﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

.section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin: 5px;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.player-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.question-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.question-card h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
}

.feedback {
    min-height: 40px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
}

.feedback.correct {
    background: #4caf50;
    color: white;
}

.feedback.incorrect {
    background: #f44336;
    color: white;
}

.navigation {
    display: flex;
    justify-content: space-between;
}

.navigation button {
    flex: 1;
}

#resultsDisplay,
#leaderboardDisplay {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-item {
    padding: 10px;
    margin: 10px 0;
    border-left: 4px solid #667eea;
    background: white;
    border-radius: 4px;
}

.result-score {
    font-size: 2em;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.score-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.points-display {
    font-weight: bold;
    color: #667eea;
    font-size: 16px;
}

.leaderboard-item.first {
    background: gold;
}

.leaderboard-item.second {
    background: silver;
}

.leaderboard-item.third {
    background: #cd7f32;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .player-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* Questions Grid */
#questionsGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 20px 0; }
.question-slot { background: white; border: 2px solid #ddd; border-radius: 10px; padding: 20px; transition: all 0.3s ease; }
.question-slot.released { border-color: #667eea; box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1); }
.question-slot.locked { background: #f5f5f5; border-color: #ccc; }
.question-number { font-weight: bold; color: #667eea; margin-bottom: 10px; font-size: 16px; }
.question-text { font-size: 14px; color: #333; margin-bottom: 15px; min-height: 40px; }
.question-locked { text-align: center; color: #999; padding: 30px 0; font-size: 14px; }
.answer-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; }
.answer-input:focus { outline: none; border-color: #667eea; }
.answer-input:disabled { background: #f5f5f5; cursor: not-allowed; }
