/* Undead PvP: the Undead look (near-black violet, neon blood red, bone), shared by every page. */
:root {
  --void: #07060a;
  --panel: #110d14;
  --panel2: #171119;
  --line: #261b23;
  --line2: #3a2a33;
  --ink: #f3ecef;
  --muted: #9d8f96;
  --blood: #ff2d55;
  --blood-deep: #b0182c;
  --bone: #e9e4dc;
  --team-a: #4aa3ff;
  --team-b: #ff5a6e;
  --gold: #ffc94d;
  --display: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--void); color: var(--ink); font: 15px/1.5 var(--body); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(700px 420px at 85% -5%, rgba(255, 45, 85, 0.13), transparent 70%), radial-gradient(600px 380px at 0% 30%, rgba(120, 40, 160, 0.10), transparent 70%); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blood); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1240px, 100% - 32px); margin: 0 auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.label { font: 600 12px var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--blood); }

/* Nav */
nav.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); background: rgba(7, 6, 10, 0.78); border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 58px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px var(--display); letter-spacing: 3px; text-transform: uppercase; }
.mark svg { width: 28px; height: 28px; }
.mark em { font-style: normal; color: var(--blood); }
nav.top .links { display: flex; gap: 4px; }
nav.top .links a { text-decoration: none; color: var(--muted); font: 600 14px var(--display); letter-spacing: 1px; text-transform: uppercase; padding: 7px 12px; border-radius: 8px; }
nav.top .links a:hover, nav.top .links a.on { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
nav.top .search { margin-left: auto; position: relative; }
nav.top .search input { width: 220px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 9px; padding: 8px 12px 8px 34px; font: 14px var(--body); }
nav.top .search input:focus { outline: none; border-color: #5a1a2a; box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.12); }
nav.top .search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--muted); }
@media (max-width: 700px) { nav.top .search input { width: 140px; } nav.top .links a { padding: 6px 8px; } }

/* Headings */
h1 { font: 700 clamp(40px, 6vw, 72px)/0.95 var(--display); text-transform: uppercase; letter-spacing: -0.5px; margin: 10px 0 12px; }
h1 span { color: var(--blood); text-shadow: 0 0 26px rgba(255, 45, 85, 0.5); }
h2 { font: 700 28px/1 var(--display); text-transform: uppercase; letter-spacing: 0.5px; margin: 0; }
.lead { color: var(--muted); font-size: 17px; max-width: 60ch; margin: 0; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }

/* Hero numbers */
.hero { padding: 42px 0 26px; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
@media (max-width: 760px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.figure { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.figure b { display: block; font: 700 34px/1 var(--display); }
.figure span { color: var(--muted); font: 500 12px var(--mono); letter-spacing: 1px; text-transform: uppercase; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
section.block { padding: 18px 0 30px; }

/* Tabs */
.tabs { display: inline-flex; background: var(--void); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 13px var(--display); letter-spacing: 1px; text-transform: uppercase; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.tabs button.on { background: var(--blood); color: #fff; box-shadow: 0 6px 18px -8px rgba(255, 45, 85, 0.9); }

/* Leaderboard */
table.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.board th { text-align: right; color: var(--muted); font: 600 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.board td { text-align: right; padding: 9px 10px; border-bottom: 1px solid #1b1419; }
table.board th:nth-child(-n+2), table.board td:nth-child(-n+2) { text-align: left; }
table.board tbody tr { cursor: pointer; transition: background 0.12s; }
table.board tbody tr:hover { background: rgba(255, 45, 85, 0.06); }
table.board .rank { width: 38px; font: 700 18px var(--display); color: var(--muted); }
table.board tr:nth-child(1) .rank { color: var(--gold); text-shadow: 0 0 14px rgba(255, 201, 77, 0.5); }
table.board tr:nth-child(2) .rank { color: #d6d9e0; }
table.board tr:nth-child(3) .rank { color: #e0a070; }
table.board .who b { font-weight: 600; }
table.board .who small { display: block; color: var(--muted); font-size: 12px; }
table.board .hot { color: var(--ink); font-weight: 700; }

/* Match cards */
.matches { display: grid; gap: 10px; }
.match { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; transition: transform 0.15s, border-color 0.15s; }
.match:hover { transform: translateY(-2px); border-color: #5a1a2a; }
.match .room { font: 700 17px var(--display); letter-spacing: 0.5px; }
.match .when { color: var(--muted); font: 500 12px var(--mono); }
.score { display: flex; align-items: center; gap: 8px; font: 700 22px var(--display); font-variant-numeric: tabular-nums; }
.score .a { color: var(--team-a); } .score .b { color: var(--team-b); }
.score .vs { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; font: 600 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); }
.badge.win-a { color: var(--team-a); border-color: rgba(74, 163, 255, 0.4); background: rgba(74, 163, 255, 0.08); }
.badge.win-b { color: var(--team-b); border-color: rgba(255, 90, 110, 0.4); background: rgba(255, 90, 110, 0.08); }
.badge.live { color: var(--gold); border-color: rgba(255, 201, 77, 0.35); }
.roster { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 12px var(--body); padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.chip.t0 { color: #a9d2ff; } .chip.t1 { color: #ffb0ba; }
.chip b { color: var(--ink); font-weight: 700; margin-left: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font: 700 14px var(--display); letter-spacing: 0.5px; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; cursor: pointer; background: var(--blood); color: #fff; box-shadow: 0 10px 26px -12px rgba(255, 45, 85, 0.9); transition: transform 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--line); color: var(--ink); box-shadow: none; }

/* Empty / loading */
.empty { color: var(--muted); text-align: center; padding: 36px 12px; border: 1px dashed var(--line2); border-radius: 14px; }
.skeleton { height: 64px; border-radius: 14px; background: linear-gradient(90deg, var(--panel) 0%, #1b141e 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0 40px; color: var(--muted); font-size: 13px; }

/* Phones */
body { overflow-x: hidden; }
.panel:has(table.board) { overflow-x: auto; }
@media (max-width: 760px) {
  nav.top .links { display: none; }
  nav.top .search input { width: 150px; }
  h1 { font-size: clamp(34px, 11vw, 52px); }
  table.board th:nth-child(3), table.board td:nth-child(3),
  table.board th:nth-child(6), table.board td:nth-child(6),
  table.board th:nth-child(8), table.board td:nth-child(8) { display: none; }
  table.board th, table.board td { padding: 8px 6px; }
  .head .tabs button { padding: 6px 9px; }
  .match { grid-template-columns: 1fr; }
  .match > div:nth-child(2) { text-align: left !important; }
}
.cols > *, .figures > *, .steps > * { min-width: 0; }

/* ---- Modern look (2026-11-08): glass panels, soft grid, the Undead logo -------------------- */
body::before {
  background:
    radial-gradient(900px 520px at 80% -10%, rgba(255, 45, 85, 0.16), transparent 70%),
    radial-gradient(700px 460px at -5% 25%, rgba(120, 40, 160, 0.13), transparent 70%),
    radial-gradient(600px 400px at 50% 110%, rgba(255, 45, 85, 0.07), transparent 70%);
}
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); }
.mark img { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(255, 45, 85, 0.45)); }
nav.top { background: rgba(7, 6, 10, 0.66); border-bottom-color: rgba(255, 255, 255, 0.06); }
.panel, .figure, .match, .m {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 60px -36px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}
.panel { border-radius: 20px; }
.figure { border-radius: 16px; }
.match { border-radius: 16px; }
.match:hover { border-color: rgba(255, 45, 85, 0.35); box-shadow: 0 24px 60px -30px rgba(255, 45, 85, 0.35); }
.btn { border-radius: 12px; background: linear-gradient(135deg, #ff4d6d, #d81b45); box-shadow: 0 12px 30px -12px rgba(255, 45, 85, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.btn[disabled] { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.tabs { border-color: rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.35); border-radius: 12px; }
.tabs button.on { background: linear-gradient(135deg, #ff4d6d, #d81b45); }
input[type=text], input[type=password], input[type=number], select { font-family: var(--body); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #4a3d44; flex: none; }
.dot.on { background: #35e08a; box-shadow: 0 0 0 4px rgba(53, 224, 138, 0.15), 0 0 18px rgba(53, 224, 138, 0.6); animation: dotpulse 2s infinite; }
.dot.busy { background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 201, 77, 0.15), 0 0 16px rgba(255, 201, 77, 0.5); }
.dot.off { background: var(--blood); box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.15); }
@keyframes dotpulse { 50% { box-shadow: 0 0 0 7px rgba(53, 224, 138, 0.05), 0 0 22px rgba(53, 224, 138, 0.8); } }

/* The bot widget (botwidget.js) */
.botw { position: relative; border-radius: 22px; padding: 22px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 45, 85, 0.10), rgba(255, 255, 255, 0.02) 45%, rgba(120, 40, 160, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 30px 80px -40px rgba(255, 45, 85, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(10px); }
.botw.is-free { border-color: rgba(53, 224, 138, 0.25); }
.botw.is-busy { border-color: rgba(255, 201, 77, 0.3); }
.botw-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.botw-state { display: flex; align-items: center; gap: 12px; }
.botw-state b { display: block; font: 700 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.5px; }
.botw-state small { color: var(--muted); font-size: 13px; }
.botw-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.botw-meta span { font: 500 12px var(--mono); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 999px; padding: 4px 10px; background: rgba(0, 0, 0, 0.25); }
.botw-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 860px) { .botw-form { grid-template-columns: 1fr 1fr; } .botw-form .btn { grid-column: 1 / -1; justify-content: center; } }
@media (max-width: 520px) { .botw-form { grid-template-columns: 1fr; } }
.botw-form label > span { display: block; font: 600 11px var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.botw-form input, .botw-form select { width: 100%; height: 44px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--ink); border-radius: 12px; padding: 0 12px; font: 15px var(--body); }
.botw-form input:focus, .botw-form select:focus { outline: none; border-color: rgba(255, 45, 85, 0.55); box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.15); }
.botw-form .btn { height: 44px; padding: 0 20px; white-space: nowrap; }
.botw .roomrow { display: grid; grid-template-columns: auto 1fr; align-items: center; height: 44px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; overflow: hidden; }
.botw .roomrow em { font-style: normal; color: var(--muted); padding: 0 2px 0 12px; font-size: 15px; }
.botw .roomrow input { border: 0; background: transparent; height: 42px; padding-left: 0; }
.botw .roomrow:focus-within { border-color: rgba(255, 45, 85, 0.55); box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.15); }
.botw-msg { margin: 12px 0 0; font-size: 14px; min-height: 0; }
.botw-msg:empty { display: none; }
.botw-msg.ok { color: #7ff0b4; }
.botw-msg.err { color: #ff8da1; }
.botw-help { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

/* ---- Motion and touch (2026-11-08): reveal on scroll, hover and press, phones ------------- */
.mark { font: 800 22px var(--display); letter-spacing: 6px; background: linear-gradient(90deg, #fff 0%, #ffd0da 40%, var(--blood) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255, 45, 85, 0.35)); transition: letter-spacing 0.3s, filter 0.3s; }
.mark:hover { letter-spacing: 8px; filter: drop-shadow(0 0 20px rgba(255, 45, 85, 0.6)); }
.reveal { opacity: 0; }
.reveal.in { animation: rise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
nav.top { animation: drop 0.5s ease-out both; }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } }
nav.top .links a { position: relative; transition: color 0.2s, background 0.2s; }
nav.top .links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--blood); transform: scaleX(0); transition: transform 0.25s; }
nav.top .links a:hover::after, nav.top .links a.on::after { transform: scaleX(1); }
.btn { transition: transform 0.15s, box-shadow 0.2s, filter 0.2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(0.97); }
.tabs button { transition: background 0.2s, color 0.2s, transform 0.15s; }
.tabs button:active { transform: scale(0.95); }
.figure { transition: transform 0.2s, border-color 0.2s; }
.figure:hover { transform: translateY(-3px); border-color: rgba(255, 45, 85, 0.3); }
.figure b { background: linear-gradient(180deg, #fff, #ffb3c1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel { transition: border-color 0.25s, box-shadow 0.25s; }
.panel:hover { border-color: rgba(255, 255, 255, 0.11); }
table.board tbody tr { transition: background 0.15s, transform 0.15s; }
table.board tbody tr:hover { transform: translateX(3px); }
.botw { transition: border-color 0.4s, box-shadow 0.4s; }
.botw.is-free { animation: freeglow 3s ease-in-out infinite; }
.botw.is-free.reveal.in { animation: rise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both, freeglow 3s ease-in-out 0.6s infinite; }
@keyframes freeglow { 50% { box-shadow: 0 30px 80px -40px rgba(53, 224, 138, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); } }
input, select { transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
/* Phones: the menu stays, as a row you can swipe; bigger touch targets. */
@media (max-width: 760px) {
  nav.top .wrap { flex-wrap: wrap; height: auto; padding: 10px 0 0; gap: 10px; }
  nav.top .links { display: flex; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  nav.top .links::-webkit-scrollbar { display: none; }
  nav.top .links a { flex: none; padding: 8px 12px; }
  nav.top .search { margin-left: auto; }
  .mark { font-size: 19px; letter-spacing: 5px; }
  .btn, .tabs button { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .reveal.in, nav.top, .botw.is-free, .mark { animation: none; }
}
