:root {
  --bg: #080c12;
  --panel: #0f1520;
  --panel-2: #161f2c;
  --panel-3: #1c2737;
  --line: #1e2d3d;
  --line-soft: rgba(18,25,34,.5);
  --text: #e2e8f0;
  --muted: #64748b;
  --accent: #22c55e;
  --accent-dim: rgba(34,197,94,.12);
  --accent-2: #3b82f6;
  --accent-2-dim: rgba(59,130,246,.12);
  --warn: #f59e0b;
  --warn-dim: rgba(245,158,11,.12);
  --danger: #ef4444;
  --danger-dim: rgba(239,68,68,.12);
  --pitch: #2e8b4a;
  --pitch-dark: #26784099;
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---- Topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 58px;
  background: rgba(15,21,32,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand span { color: var(--accent); }
.brand em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #fff;
  background: #dc2626;
  padding: 2px 7px;
  border-radius: 5px;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.topbar nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.topbar nav::-webkit-scrollbar { display: none; }

.topbar nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: 20px;
  transition: color .15s, background .15s;
  white-space: nowrap;
  position: relative;
}
.topbar nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.topbar nav a.active {
  color: var(--text);
  background: transparent;
}
.topbar nav a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.mute-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  flex-shrink: 0;
}
.mute-btn:hover { border-color: var(--muted); background: rgba(255,255,255,.04); }

/* ---- Shared utility classes ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s;
}
.btn-primary { background: var(--accent); color: #052e16; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-warn { background: var(--warn-dim); color: var(--warn); border: 1px solid rgba(245,158,11,.3); }
.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239,68,68,.3); }
.btn:hover { filter: brightness(1.1); }
.btn:active { filter: brightness(.95); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.card-header h2 { margin: 0; font-size: 15px; font-weight: 700; }
.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.card-icon.green { background: var(--accent-dim); }
.card-icon.blue { background: var(--accent-2-dim); }
.card-icon.warn { background: var(--warn-dim); }

.page-header {
  padding: 28px 20px 4px;
  max-width: 900px;
  margin: 0 auto;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -.3px;
}
.page-header p { color: var(--muted); font-size: 14px; margin: 0; }

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-dim);
}

/* ---- Layout ---- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 18px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---- Scoreboard ---- */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.scoreboard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(34,197,94,.07) 0%, transparent 70%);
  pointer-events: none;
}

.scoreboard .team {
  display: flex;
  align-items: center;
  gap: 12px;
}
.scoreboard .team.away { justify-content: flex-end; }
.scoreboard .crest { font-size: 30px; line-height: 1; }
.scoreboard .team-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scoreboard .team.away .team-info { align-items: flex-end; }
.scoreboard .name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
}
.scoreboard .formation {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  width: fit-content;
}

.score-center { text-align: center; }
.scoreboard .score {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}
.scoreboard .score .sep {
  opacity: .2;
  margin: 0 8px;
  font-weight: 300;
}
.scoreboard .clock {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.scoreboard .phase {
  background: var(--accent-2-dim);
  color: var(--accent-2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
}

/* ---- Pitch ---- */
.pitch-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.55), 0 0 0 1px var(--line);
}
#pitch {
  width: 100%;
  display: block;
  background: var(--pitch);
}
#heatmapCanvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
#heatmapCanvas.visible { opacity: 1; }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  background: rgba(8,12,18,.87);
  backdrop-filter: blur(4px);
  padding: 24px;
}
.overlay[hidden] { display: none; }
.overlay h2 { margin: 0; font-size: clamp(26px, 5vw, 52px); font-weight: 800; }
.overlay p { margin: 0; color: var(--muted); font-size: clamp(14px, 2vw, 20px); }
.overlay .big { font-size: clamp(48px, 12vw, 88px); font-weight: 900; letter-spacing: -2px; }
.ad-card {
  background: linear-gradient(135deg, var(--accent-2), #6b3fd6);
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  max-width: 88%;
}
.ad-label { font-size: clamp(13px, 2vw, 18px); letter-spacing: 2px; color: var(--accent); text-transform: uppercase; font-weight: 700; }
.ad-sponsor-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.heatmap-btn {
  position: absolute;
  bottom: 42px;
  right: 10px;
  background: rgba(8,12,18,.88);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
  transition: border-color .15s;
}
.heatmap-btn:hover { border-color: var(--muted); }

.fullscreen-btn {
  position: absolute;
  bottom: 42px;
  left: 10px;
  background: rgba(8,12,18,.88);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
  transition: border-color .15s;
}
.fullscreen-btn:hover { border-color: var(--muted); }
.pitch-wrap:fullscreen,
.pitch-wrap:-webkit-full-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  background: #000;
  border-radius: 0;
  overflow: hidden;
}
.pitch-wrap:fullscreen #pitch,
.pitch-wrap:-webkit-full-screen #pitch {
  aspect-ratio: 105 / 68;
  width: 100%;
  height: 100%;
  max-width: calc(100vh * 105 / 68);
  max-height: calc(100vw * 68 / 105);
  object-fit: contain;
  border-radius: 0;
}
/* Heatmap is repositioned by JS to match the pitch canvas — no CSS override needed */
.pitch-wrap:fullscreen .fullscreen-btn,
.pitch-wrap:-webkit-full-screen .fullscreen-btn { font-size: 14px; }
.pitch-wrap:fullscreen .live-ticker,
.pitch-wrap:-webkit-full-screen .live-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  z-index: 50;
}

.replay-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34,197,94,.92);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 20px;
  z-index: 3;
  display: none;
}
.replay-banner.visible { display: block; }

/* ---- Info tabs (below pitch) ---- */
.info-tabs {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 0;
  gap: 2px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px 9px;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  letter-spacing: .2px;
  position: relative;
  transition: color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--text);
  background: var(--panel-2);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.tab-pane {
  display: none;
  padding: 10px 14px;
}
.tab-pane.active { display: block; }

/* Events tab */
#ticker {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}
#ticker li {
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 2px;
}
#ticker li:last-child { border-bottom: none; }
#ticker .min {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  min-width: 32px;
}

/* Commentary tab */
#commentary {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}
#commentary li {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
#commentary li:last-child { border-bottom: none; }
#commentary li.big-moment { color: var(--text); font-weight: 600; }
#commentary .min {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 12px;
  margin-right: 6px;
}

/* Player stats tab */
.stats-panel-body { }
.stats-panel-body.open { display: block; }
.stats-team-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 10px 0 5px;
}
table.player-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.player-stats-table th {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 4px 4px;
  border-bottom: 1px solid var(--line);
}
table.player-stats-table th.n { text-align: left; }
table.player-stats-table td {
  text-align: center;
  padding: 4px 4px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
table.player-stats-table td.n { text-align: left; }
table.player-stats-table .rating { font-weight: 700; color: var(--accent); }

/* ---- Sidebar ---- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: fit-content;
}

.sidebar-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px;
}

.sidebar-section h2 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.table-scroll { overflow-x: auto; }

table.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.standings th,
table.standings td {
  padding: 6px 4px;
  text-align: center;
}
table.standings th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
table.standings td.t,
table.standings th.t { text-align: left; }
table.standings tbody tr {
  border-bottom: 1px solid var(--line-soft);
  transition: background .1s;
}
table.standings tbody tr:last-child { border-bottom: none; }
table.standings tbody tr:hover { background: rgba(255,255,255,.03); }
table.standings .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

table.scorers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.scorers-table th,
table.scorers-table td {
  padding: 6px 4px;
  text-align: center;
}
table.scorers-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
table.scorers-table td.t { text-align: left; }
table.scorers-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
}
table.scorers-table tbody tr:last-child { border-bottom: none; }
table.scorers-table tbody tr:hover { background: rgba(255,255,255,.03); }

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
  }
  .scoreboard .name { font-size: 13px; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-section { flex: 1; min-width: 260px; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 14px; }
  .topbar nav a { padding: 6px 10px; font-size: 12.5px; }
}

@media (max-width: 480px) {
  .scoreboard .name { display: none; }
  .scoreboard { padding: 12px 12px; }
  .page-header { padding: 20px 14px 0; }
  .page-header h1 { font-size: 20px; }
}

/* ---- Landscape fullscreen ---- */
@media (orientation: landscape) and (max-height: 500px) {
  .topbar { display: none; }
  .layout {
    display: block;
    padding: 0;
    max-width: 100%;
    gap: 0;
  }
  .stage {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .scoreboard {
    width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(42,53,67,.5);
    margin-bottom: 0;
    padding: 6px 16px;
    background: rgba(15,21,32,.85);
    backdrop-filter: blur(8px);
  }
  .scoreboard::before { display: none; }
  .pitch-wrap {
    height: calc(100dvh - 52px);
    width: calc((100dvh - 52px) * 105 / 68);
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
  }
  #pitch { border-radius: 0; }
  #heatmapCanvas { border-radius: 0; }
  .sidebar { display: none; }
  .info-tabs {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ============================================================
   Review dialog & FAB
   ============================================================ */
.rv-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent-2);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .15s, filter .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-fab:hover { transform: scale(1.08); filter: brightness(1.12); }
.rv-fab:active { transform: scale(.95); }

.rv-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.rv-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.rv-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  overflow: hidden;
  transform: translateY(12px);
  transition: transform .18s;
}
.rv-overlay.open .rv-dialog { transform: translateY(0); }

.rv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.rv-title { font-size: 15px; font-weight: 700; }
.rv-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: background .12s, color .12s;
}
.rv-close:hover { background: var(--panel-2); color: var(--text); }

.rv-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.rv-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 4px;
  cursor: pointer;
  transition: color .12s, border-color .12s;
}
.rv-tab:hover { color: var(--text); }
.rv-tab.active { color: var(--accent-2); border-bottom-color: var(--accent-2); }

.rv-body { padding: 16px 18px 18px; }

.rv-row { margin-bottom: 10px; }

.rv-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.rv-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-dim);
}
.rv-textarea { resize: vertical; min-height: 80px; }

.rv-stars {
  display: flex;
  gap: 4px;
  margin: 8px 0 10px;
}
.rv-star {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--line);
  cursor: pointer;
  padding: 0 2px;
  transition: color .1s, transform .1s;
  line-height: 1;
}
.rv-star.active,
.rv-star.hover { color: #f59e0b; }
.rv-star:hover { transform: scale(1.15); }

.rv-error {
  font-size: 12.5px;
  color: var(--danger);
  min-height: 18px;
  margin-bottom: 8px;
}

.rv-submit {
  width: 100%;
  padding: 11px;
  background: var(--accent-2);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}
.rv-submit:hover:not(:disabled) { filter: brightness(1.1); }
.rv-submit:disabled { opacity: .45; cursor: not-allowed; }

.rv-success {
  padding: 36px 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.rv-success-icon { font-size: 36px; margin-bottom: 10px; }
.hidden { display: none !important; }

/* Admin — Reviews & Telegram section */
.review-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.review-badge.question { background: var(--accent-2-dim); color: var(--accent-2); }
.review-badge.bug { background: var(--danger-dim); color: var(--danger); }
.review-badge.feature { background: var(--accent-dim); color: var(--accent); }

.reviews-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.reviews-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.reviews-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  max-width: 220px;
  word-break: break-word;
}
.reviews-table tr:last-child td { border-bottom: none; }

.tg-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.tg-status.active { background: var(--accent-dim); color: var(--accent); }
.tg-status.inactive { background: var(--panel-2); color: var(--muted); }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13.5px;
  cursor: pointer;
}
.toggle-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ---- Drama alert ---- */
.drama-alert {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(0,0,0,0.82);
  border: 2px solid rgba(255,220,0,0.7);
  border-radius: 12px;
  padding: 14px 24px;
  text-align: center;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  min-width: 220px;
}
.drama-alert.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.drama-headline {
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 900;
  color: #ffe533;
  letter-spacing: 0.5px;
}
.drama-detail {
  font-size: clamp(11px, 2vw, 14px);
  color: rgba(255,255,255,0.82);
  margin-top: 4px;
}


/* ---- Floating emoji reactions ---- */
.reactions-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}
.floating-emoji {
  position: absolute;
  font-size: clamp(20px, 3.5vw, 30px);
  animation: floatUp 2.8s ease-out forwards;
  pointer-events: none;
  user-select: none;
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  70%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-120px) scale(0.6); }
}

/* ---- Reaction bar ---- */
.reaction-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.reaction-label {
  font-size: 11px;
  color: var(--muted);
  margin-right: 2px;
}
.react-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}
.react-btn:hover { background: var(--panel-3); }
.react-btn:active { transform: scale(0.88); }
.react-btn.cooldown { opacity: 0.4; pointer-events: none; }

/* ---- Prediction widget ---- */
.prediction-widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 8px;
}
.prediction-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.prediction-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pred-team {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 40px;
}
.pred-input {
  width: 44px;
  text-align: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  padding: 4px 2px;
}
.pred-sep {
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
}
.pred-submit {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  transition: opacity 0.15s;
}
.pred-submit:disabled { opacity: 0.45; cursor: default; }
.prediction-result {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: center;
}
.prediction-result.correct {
  background: var(--accent-dim);
  color: var(--accent);
}
.prediction-result.close {
  background: var(--warn-dim);
  color: var(--warn);
}
.prediction-result.wrong {
  background: var(--danger-dim);
  color: var(--danger);
}

/* ---- Live ticker ---- */
.live-ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8,12,18,.82);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 0 12px;
  z-index: 10;
  overflow: hidden;
}
.ticker-live-badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  background: #dc2626;
  padding: 2px 7px;
  border-radius: 4px;
  animation: pulse 1.4s infinite;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-msg {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
}
