* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #10131a, #181f2e);
    color: #f5f7fb;
}
.page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px minmax(400px, 1fr) 320px;
    gap: 20px;
    padding: 20px;
}
.panel, .center-panel { display: flex; flex-direction: column; gap: 20px; }
.card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
h1, h2, h3, p { margin-top: 0; }
.subtitle { color: #cfd6e6; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
input, select, button {
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
}
input, select {
    background: #f7f9fc;
    color: #10131a;
}
button {
    background: #7ee081;
    color: #0f1b10;
    font-weight: 700;
    cursor: pointer;
}
button.secondary { background: #d8deec; color: #10131a; }
.button-row { display: flex; gap: 10px; }
.hud {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.hud-item {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}
.hud-item span {
    display: block;
    font-size: 13px;
    color: #cfd6e6;
    margin-bottom: 6px;
}
.hud-item strong {
    font-size: 20px;
}
canvas {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 3 / 2;
    background: #0b1018;
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    align-self: center;
    box-shadow: 0 16px 36px rgba(0,0,0,0.3);
}
.highscore-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
#highscoreList {
    padding-left: 22px;
    margin-bottom: 0;
}
#highscoreList li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.control-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.hint { color: #cfd6e6; margin-bottom: 0; }
.notes ul { padding-left: 18px; margin-bottom: 0; }

@media (max-width: 1200px) {
    .page { grid-template-columns: 1fr; }
    .center-panel { order: -1; }
}

@media (max-width: 640px) {
    .field-grid, .hud, .control-columns { grid-template-columns: 1fr; }
    .button-row { flex-direction: column; }
}
