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

body {
    background: #000000;
    font-family: 'Press Start 2P', monospace;
    color: #ffffff;
    overflow: hidden;
}

.game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(ellipse at center, #001122 0%, #000000 100%);
}

.ui-top {
    width: 100%;
    max-width: 920px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #000000;
    border-bottom: 4px solid #33ff33;
    box-shadow: 0 4px 0 #00aa00;
    z-index: 10;
}

.info-box {
    color: #33ff33;
    font-size: 10px;
    text-shadow: 2px 2px 0px #005500;
    padding: 8px;
    border: 2px solid #33ff33;
    background: #002200;
    white-space: nowrap;
}

.title {
    color: #ffff33;
    font-size: 14px;
    text-shadow: 3px 3px 0px #aa5500;
    letter-spacing: 2px;
    text-align: center;
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
    width: 100%;
}

.track-bg {
    background: #001100;
    border: 4px solid #33ff33;
    padding: 6px;
    box-shadow: inset 0 0 20px rgba(51, 255, 51, 0.2), 0 0 40px rgba(51, 255, 51, 0.3);
    position: relative;
}

.cam-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #33ff33;
    border: 2px solid #33ff33;
    padding: 6px 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    z-index: 4;
}

.cam-toggle:hover {
    background: #002200;
}

.mute-toggle {
    position: absolute;
    top: 44px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #33ff33;
    border: 2px solid #33ff33;
    padding: 6px 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    z-index: 4;
}

.mute-toggle:hover {
    background: #002200;
}

#gameCanvas {
    background: #2a9d2a;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.question-panel {
    position: absolute;
    bottom: 14px;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #33ff33;
    padding: 12px 16px;
    min-width: 460px;
    box-shadow: 0 0 20px rgba(51, 255, 51, 0.5);
}

.question-text {
    color: #ffff33;
    font-size: 22px;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #aa5500;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.answer-btn {
    background: #003300;
    color: #33ff33;
    border: 2px solid #33ff33;
    padding: 12px 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
}

.keycap {
    position: absolute;
    top: 3px;
    left: 5px;
    font-size: 7px;
    color: #003300;
    background: #33ff33;
    border-radius: 3px;
    padding: 2px 4px;
    line-height: 1;
    pointer-events: none;
}

.answer-btn:hover:not(:disabled) {
    background: #005500;
    color: #66ff66;
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.5);
}

.answer-btn.correct {
    background: #006600;
    color: #ffff33;
    border-color: #ffff33;
    box-shadow: 0 0 12px rgba(255, 255, 51, 0.7);
}

.answer-btn.wrong {
    background: #660000;
    color: #ff3333;
    border-color: #ff3333;
}

.answer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hint {
    margin-top: 8px;
    text-align: center;
    font-size: 7px;
    color: #66ff66;
    opacity: 0.9;
}

.start-button {
    background: #000000;
    color: #33ff33;
    border: 4px solid #33ff33;
    padding: 16px 28px;
    font-family: 'Press Start 2P', monospace;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.6);
    transition: all 0.2s;
    z-index: 5;
}

.start-button:hover {
    background: #002200;
    transform: scale(1.05);
}

.lobby {
    position: absolute;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.92);
    border: 4px solid #33ff33;
    padding: 24px 28px;
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.6);
    z-index: 5;
}

.lobby-title {
    color: #ffff33;
    font-size: 13px;
    text-shadow: 2px 2px 0px #aa5500;
    margin-bottom: 6px;
    text-align: center;
}

.lobby-input {
    background: #002200;
    color: #66ff66;
    border: 2px solid #33ff33;
    padding: 10px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    width: 280px;
    text-align: center;
    outline: none;
}

.lobby-input::placeholder {
    color: #1a661a;
}

.lobby-input:focus {
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.6);
}

.lobby-btns {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.mp-button {
    background: #002244;
    color: #55ccff;
    border: 4px solid #55ccff;
    padding: 16px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(85, 204, 255, 0.4);
    transition: all 0.2s;
}

.mp-button:hover {
    background: #003366;
    transform: scale(1.05);
}

.lobby-status {
    min-height: 14px;
    font-size: 8px;
    color: #ffff33;
    text-align: center;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content.retro {
    background: #000000;
    border: 4px solid #33ff33;
    padding: 36px 44px;
    text-align: center;
    box-shadow: 0 0 40px rgba(51, 255, 51, 0.7);
}

.modal-content h2 {
    color: #ffff33;
    font-size: 22px;
    margin-bottom: 22px;
    text-shadow: 3px 3px 0px #aa5500;
}

.results p {
    color: #33ff33;
    font-size: 11px;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0px #005500;
}

.results span {
    color: #ffff33;
}

.restart-button {
    background: #003300;
    color: #33ff33;
    border: 3px solid #33ff33;
    padding: 14px 28px;
    font-family: 'Press Start 2P', monospace;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
}

.restart-button:hover {
    background: #005500;
}

.review {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
    max-width: 560px;
}

.review-col {
    flex: 1;
    min-width: 0;
}

.review-col h3 {
    font-size: 9px;
    margin-bottom: 8px;
    color: #ffff33;
    text-shadow: 2px 2px 0px #555500;
}

.review-col ul {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    border: 2px solid #333;
    padding: 8px;
    background: #0a0a0a;
    font-size: 9px;
    line-height: 1.9;
}

.review-col li.right {
    color: #33ff33;
}

.review-col li.missed {
    color: #ff6666;
}

.review-col li.missed .was {
    color: #999999;
}

.review-empty {
    color: #666666;
}
