/* SMP Darts – neon / naplemente téma (a plakát stílusában) */
:root {
  --bg: #120624;
  --bg2: #1b0b33;
  --card: #241044;
  --card2: #2d1552;
  --line: #ff2d8a;
  --pink: #ff2d8a;
  --gold: #ffd27a;
  --lilac: #c9b6e8;
  --muted: #9a86bf;
  --text: #f6f0ff;
  --woman: #22d3ee;
  --ok: #5ee6a0;
  --warn: #ffb35c;
  --danger: #ff5a6e;
  --radius: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; }
a { color: var(--gold); }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; }

/* ---------- fejléc ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 18px 28px 0;
  background:
    radial-gradient(circle at 82% 135%, #ffd27a 0 70px, #ff9a4a 71px 120px, rgba(255, 45, 127, .85) 121px 170px, transparent 171px),
    linear-gradient(180deg, #1a0838 0%, #4a1060 55%, #8a1a68 100%);
  border-bottom: 2px solid var(--pink);
}
.hero::after { /* napcsíkok */
  content: ""; position: absolute; right: 0; bottom: 0; width: 40%; height: 60px;
  background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(26, 8, 56, .9) 9px 12px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero img.logo { height: 44px; filter: drop-shadow(0 0 6px var(--pink)) drop-shadow(0 0 16px var(--pink)); }
.hero h1 { margin: 0; line-height: 1; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.hero .script { font-family: "Yellowtail", cursive; font-weight: 400; font-size: 54px; color: #ffe1f0; text-shadow: 0 0 10px var(--pink), 0 0 26px var(--pink); transform: rotate(-5deg); display: inline-block; }
.hero .big { font-family: var(--display); font-weight: 400; font-size: 40px; letter-spacing: 1px; text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #2a0848; }
.hero .sub { color: var(--lilac); margin-top: 4px; font-size: 13px; }
.live { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--lilac); font-size: 12px; }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.live.stale .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

.tabs { position: relative; z-index: 1; display: flex; gap: 4px; margin-top: 14px; }
.tabs button {
  background: transparent; border: 0; color: var(--lilac); padding: 10px 16px; cursor: pointer;
  font-weight: 700; letter-spacing: .5px; border-radius: 8px 8px 0 0; min-height: 44px;
}
.tabs button[aria-selected="true"] { background: var(--bg); color: #fff; box-shadow: inset 0 3px 0 var(--pink); }
.tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

main { padding: 20px 28px 40px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend .l-seed::before { background: #fff; }
.legend .l-woman::before { background: var(--woman); }
.legend .l-num::before { background: var(--gold); }
.legend .l-out::before { background: #6a5a89; }

/* ---------- ágrajz + oldalsáv ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1350px) { .layout { grid-template-columns: 1fr; } }
.bracket-scroll { overflow: hidden; border-radius: var(--radius); background: var(--bg2); padding: 12px; }
.bracket-scroll.can-scroll { overflow-x: auto; }
.bracket-size { position: relative; }
.bracket { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.bracket svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.round-title { position: absolute; top: 0; color: var(--gold); font-weight: 800; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.mcard {
  position: absolute; background: var(--card); border: 1px solid rgba(255, 45, 138, .35); border-radius: 6px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.mcard.ready { border-color: var(--warn); box-shadow: 0 0 0 1px rgba(255, 179, 92, .35), 0 0 12px rgba(255, 179, 92, .18); }
.mcard .row { display: flex; align-items: center; height: 26px; padding: 0 8px; gap: 6px; }
.mcard .row + .row { border-top: 1px solid rgba(255, 255, 255, .06); }
.mcard .seed { color: var(--gold); font-weight: 800; font-size: 11px; min-width: 18px; text-align: right; }
.mcard .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .score { color: var(--gold); font-weight: 800; min-width: 14px; text-align: right; }
.mcard .mnum { position: absolute; right: 4px; top: -1px; font-size: 9px; color: var(--muted); display: none; }
.is-seeded { font-weight: 800; }
.is-woman { color: var(--woman); }
.is-loser { opacity: .45; }
.is-winner .name { color: #fff; }
.is-winner.is-woman .name { color: var(--woman); }
.is-placeholder { color: var(--muted); font-style: italic; }
.champion {
  position: absolute; background: var(--gold); color: #1b0b33; border-radius: 8px; padding: 10px 14px; text-align: center;
  font-family: var(--display); font-size: 20px; box-shadow: 0 0 24px rgba(255, 210, 122, .45);
}
.champion small { display: block; font-family: var(--font); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }

aside .panel { background: var(--bg2); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
aside h2, .panel h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pink); border-bottom: 1px solid rgba(255, 45, 138, .4); padding-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.kpis b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--gold); line-height: 1.1; }
.kpis span { color: var(--lilac); font-size: 11px; }
.progress { height: 6px; background: rgba(255, 255, 255, .08); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.plist li:last-child { border: 0; }
.plist .k { color: var(--gold); font-weight: 800; min-width: 34px; }
.plist .v { flex: 1; min-width: 0; }
.plist .x { color: var(--muted); font-size: 11px; white-space: nowrap; }
.vs { color: var(--muted); font-size: 11px; margin: 0 4px; }
.place-1 .v { color: var(--gold); font-weight: 800; }
.place-2 .v { color: #e6e6f0; font-weight: 800; }
.place-3 .v { color: #f0a86a; font-weight: 800; }
.record b { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--gold); margin-right: 10px; }
.empty { color: var(--muted); font-style: italic; }

/* ---------- táblázatok ---------- */
.table-wrap { overflow-x: auto; background: var(--bg2); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .06); white-space: nowrap; }
th { color: var(--gold); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; position: sticky; top: 0; background: var(--bg2); }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--gold); }
td.num, th.num { text-align: right; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.b-played { background: rgba(94, 230, 160, .15); color: var(--ok); }
.b-ready { background: rgba(255, 179, 92, .18); color: var(--warn); }
.b-waiting { background: rgba(255, 255, 255, .06); color: var(--muted); }
.b-champ { background: var(--gold); color: #1b0b33; }
.b-out { color: var(--muted); }
.b-in { color: var(--ok); }
.filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { background: var(--card); color: var(--lilac); border: 1px solid transparent; border-radius: 16px; padding: 6px 14px; cursor: pointer; min-height: 36px; }
.chip[aria-pressed="true"] { border-color: var(--pink); color: #fff; }

/* ---------- admin ---------- */
.btn { background: var(--pink); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; font-weight: 700; cursor: pointer; min-height: 40px; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border: 1px solid var(--lilac); color: var(--lilac); }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { color: var(--lilac); font-size: 12px; font-weight: 600; }
input[type="text"], input[type="number"], textarea, select {
  background: #0d041c; color: #fff; border: 1px solid #4b3570; border-radius: 6px; padding: 8px 10px; min-height: 38px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
input.leg { width: 54px; text-align: center; font-weight: 800; font-size: 16px; }
input.stat { width: 70px; }
.match-row { display: grid; grid-template-columns: 54px 200px 1fr auto 1fr auto; gap: 10px; align-items: center; background: var(--bg2); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.match-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row .who.right { text-align: right; }
.match-row .legs { display: flex; align-items: center; gap: 6px; }
.match-row details { grid-column: 1 / -1; color: var(--lilac); }
.match-row details summary { cursor: pointer; font-size: 12px; }
.match-row .extra { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; align-items: end; }
.match-row .err { grid-column: 1 / -1; color: var(--danger); font-size: 12px; }
@media (max-width: 760px) { .match-row { grid-template-columns: 1fr 1fr; } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--pink); padding: 10px 18px; border-radius: 8px; z-index: 50; }
.toast.error { border-color: var(--danger); color: #ffd6dc; }
.notice { background: rgba(255, 179, 92, .12); border: 1px solid rgba(255, 179, 92, .4); color: #ffe2bd; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.sticky-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 6px; display: flex; gap: 10px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
input.is-woman { color: var(--woman); font-weight: 700; }

/* élő meccsek */
.mcard.is-live { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(94, 230, 160, .4), 0 0 16px rgba(94, 230, 160, .25); }
.live-legs { color: var(--ok); }
.live-rem { font-size: 11px; color: var(--muted); min-width: 26px; text-align: right; }
.live-rem.on { color: var(--gold); font-weight: 800; }
.live-panel { border: 1px solid rgba(94, 230, 160, .45); }
.live-panel h2 { color: var(--ok); border-color: rgba(94, 230, 160, .4); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.lv-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.lv-row .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-row .lv-legs { color: var(--ok); min-width: 14px; text-align: right; }
.lv-row .lv-rem { font-family: var(--display); font-size: 20px; min-width: 44px; text-align: right; color: var(--lilac); }
.lv-row.on .lv-rem { color: var(--gold); }
.b-live { background: rgba(94, 230, 160, .18); color: var(--ok); }
.tabs { flex-wrap: wrap; align-items: flex-end; }
.tab-link {
  margin-left: auto; align-self: center; white-space: nowrap; flex: none;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  background: linear-gradient(135deg, #ff2d8a, #ff6a3d); color: #fff; text-decoration: none;
  font-weight: 800; letter-spacing: .5px; border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 210, 122, .55), 0 0 18px rgba(255, 45, 138, .6);
  animation: ctaGlow 2.4s ease-in-out infinite;
}
.tab-link:hover, .tab-link:focus-visible { color: #fff; filter: brightness(1.1); outline: 2px solid var(--gold); outline-offset: 2px; }
.tab-link .ico { font-size: 18px; line-height: 1; }
@keyframes ctaGlow { 50% { box-shadow: 0 0 0 2px rgba(255, 210, 122, .9), 0 0 28px rgba(255, 45, 138, .85); } }
@media (prefers-reduced-motion: reduce) { .tab-link { animation: none; } }
/* telefonon: teljes szélességű gomb a fülek fölött */
@media (max-width: 700px) {
  .tab-link { order: -1; width: 100%; justify-content: center; margin: 0 0 10px; font-size: 16px; min-height: 48px; }
  .tabs button { flex: 1; padding: 10px 6px; }
}
.code-chip { display: inline-block; background: #0d041c; border: 1px dashed var(--gold); color: var(--gold); border-radius: 6px; padding: 2px 8px; font-weight: 800; letter-spacing: 2px; font-size: 12px; }
/* telefon: kompaktabb fejléc, a nap-csíkok ne takarják a füleket */
@media (max-width: 700px) {
  .hero { padding: 12px 14px 0; background: linear-gradient(180deg, #1a0838 0%, #4a1060 60%, #8a1a68 100%); }
  .hero::after { display: none; }
  .hero-inner { gap: 10px; }
  .hero img.logo { height: 30px; }
  .hero .script { font-size: 34px; }
  .hero .big { font-size: 26px; }
  .live { margin-left: 0; }
  main { padding: 14px 12px 30px; }
}

/* ---------- élő sorsolás (kivetíthető) ---------- */
.draw-btn { background: linear-gradient(135deg, #ff2d8a, #ff6a3d); box-shadow: 0 0 14px rgba(255, 45, 138, .5); }
.draw-ov {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; color: #fff;
  background:
    radial-gradient(circle at 50% 118%, #ffd27a 0 90px, #ff9a4a 91px 160px, rgba(255, 45, 127, .85) 161px 240px, transparent 241px),
    linear-gradient(180deg, #120624 0%, #3a0f55 60%, #6a1462 100%);
}
.draw-head { display: flex; align-items: center; gap: 18px; padding: 16px 28px; border-bottom: 2px solid var(--pink); }
.draw-logo { height: 40px; filter: drop-shadow(0 0 6px var(--pink)); }
.draw-title { flex: 1; font-family: var(--display); font-size: 34px; letter-spacing: 2px; text-shadow: 3px 3px 0 var(--pink); }
.draw-title .script { font-family: "Yellowtail", cursive; font-size: 40px; color: #ffe1f0; text-shadow: 0 0 10px var(--pink); letter-spacing: 0; margin-right: 6px; }
.draw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 24px 28px; }
.draw-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; min-width: 0; }
.draw-seat { font-family: var(--display); font-size: clamp(28px, 4vw, 48px); color: var(--gold); letter-spacing: 2px; }
.draw-name { font-family: var(--display); font-size: clamp(44px, 8vw, 110px); line-height: 1.05; max-width: 100%; overflow-wrap: anywhere; min-height: 1.1em; }
.draw-name.idle { color: rgba(255, 255, 255, .25); }
.draw-name.spin { color: var(--lilac); filter: blur(.4px); }
.draw-name.hit { color: #fff; text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 #2a0848, 0 0 40px rgba(255, 45, 138, .6); animation: drawPop .45s ease-out; }
.draw-name.hit.is-woman { color: var(--woman); }
@keyframes drawPop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .draw-name.hit { animation: none; } }
.draw-role { font-size: 20px; min-height: 56px; color: var(--lilac); }
.draw-role .pi { color: var(--warn); font-weight: 800; font-size: 24px; }
.draw-role .main { color: var(--ok); font-weight: 800; font-size: 24px; }
.draw-ctrl, .draw-done { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.draw-ctrl .btn.big, .draw-done .btn.big { min-height: 60px; font-size: 20px; padding: 0 34px; border-radius: 12px; }
.draw-auto { color: var(--lilac); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.draw-auto input { width: 20px; height: 20px; }
.draw-left { color: var(--muted); }
.draw-list { background: rgba(13, 4, 28, .78); border-radius: 12px; padding: 14px 16px; overflow: auto; }
.draw-list h3 { margin: 0 0 8px; color: var(--pink); letter-spacing: 1.5px; text-transform: uppercase; font-size: 13px; }
.draw-list ol { list-style: none; margin: 0; padding: 0; }
.draw-list li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.draw-list li b { color: var(--gold); min-width: 30px; text-align: right; }
.draw-list li span { flex: 1; min-width: 0; }
.draw-list li small { color: var(--muted); font-size: 11px; }
.draw-list li.seed span { font-weight: 800; }
.draw-list li.pi small { color: var(--warn); }
.draw-list li.last { background: rgba(255, 45, 138, .15); border-radius: 6px; }
.draw-list .is-woman { color: var(--woman); }
@media (max-width: 900px) { .draw-body { grid-template-columns: 1fr; } .draw-list { max-height: 30vh; } }

/* női jelölés kikapcsolva */
.is-woman, .is-winner.is-woman .name, input.is-woman, .pl .nm.is-woman, .draw-list .is-woman, .draw-name.hit.is-woman { color: inherit; font-weight: inherit; }

/* ágrajz teljes szélességben; a panelek alatta, egymás mellett; élő panel fölötte */
.layout { grid-template-columns: 1fr !important; }
aside#side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; margin-top: 4px; }
aside#side .panel { margin-bottom: 0; }
.live-top .live-panel { margin-bottom: 14px; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 24px; }
.live-item { padding: 4px 0; }
.live-top .panel { background: var(--bg2); border-radius: var(--radius); padding: 14px 16px; }
.live-top h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; padding-bottom: 6px; }
.live-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 420px)); }
