:root { color-scheme: dark; --blue: #3d7bff; --red: #ff3d57; --bg: #0b0e1a; --panel: #151a2b; --line: #ffffff1f; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: #e8ecf6; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: 0.02em; }
h1 span { font-weight: 600; opacity: 0.6; }
h2 { margin: 0 0 8px; font-size: 16px; }
h3 { margin: 16px 0 6px; font-size: 13px; opacity: 0.7; }
.pill { padding: 3px 10px; border-radius: 999px; background: #ffffff14; font-size: 12px; }
.pill.on { background: #1f7a3d; }
.card { max-width: 440px; margin: 48px auto; padding: 24px; background: var(--panel); border-radius: 14px; }
form { display: flex; gap: 8px; }
input, select { background: #0b0e1a; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input { flex: 1; }
button { background: #2a3352; color: inherit; border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.2); }
button:disabled { opacity: 0.4; cursor: default; }
button.stop { background: #c4202e; font-size: 15px; padding: 10px 18px; }
button.danger { background: #5a1c25; }
.error { color: #ff8a8a; min-height: 1.2em; margin: 6px 0; }
.muted { opacity: 0.6; }
main { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 54px); }
aside { border-right: 1px solid var(--line); padding: 16px; }
#games { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#games li { padding: 10px; border-radius: 10px; background: var(--panel); cursor: pointer; }
#games li.selected { outline: 2px solid var(--blue); }
#games .code { font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: 0.1em; }
#game { padding: 16px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; }
.scores { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 900; }
.scores #clock { font: 700 18px ui-monospace, monospace; opacity: 0.85; }
.blue { color: var(--blue); }
.red { color: var(--red); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.split { display: grid; grid-template-columns: minmax(320px, 640px) 1fr; gap: 16px; align-items: start; }
canvas { width: 100%; aspect-ratio: 1; background: #070a13; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
td button { padding: 3px 7px; font-size: 12px; }
#feed { margin: 0; padding-left: 18px; font-size: 13px; }
.paused-banner { color: #fff; background: #c4202e; padding: 2px 8px; border-radius: 6px; font-weight: 800; }
