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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    overflow: hidden;
    background: #87CEEB;
}

#gameCanvas {
    display: block;
}

.ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 10;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.stat {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-bar {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #ffd700;
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.question-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.95);
    backdrop-filter: blur(10px);
    border: 4px solid #fbbf24;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    pointer-events: all;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
    z-index: 1000;
}

.question {
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.answers {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.answer-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: 3px solid #fbbf24;
    color: white;
    font-size: 2em;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.answer-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.7);
}

.answer-btn:active {
    transform: scale(0.95);
}

.speed-indicator {
    position: fixed;
    top: 130px;
    right: 20px;
    color: white;
    font-size: 2.5em;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 15px;
    border: 3px solid #22c55e;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.results-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    border: 5px solid #22c55e;
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    display: none;
    pointer-events: all;
    max-width: 600px;
    z-index: 1000;
}

.results-screen.show {
    display: block;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.results-screen h2 {
    color: #22c55e;
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.result-item {
    color: #333;
    font-size: 1.5em;
    margin: 15px 0;
}

.play-again-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 3px solid #fbbf24;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    padding: 20px 40px;
    border-radius: 15px;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s;
}

.play-again-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.7);
}
