:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-2: #090d12;
  --surface: #0f141b;
  --surface-2: #151b24;
  --surface-3: #1a222d;
  --border: #252d38;
  --border-strong: #394453;
  --text: #f7f8fb;
  --muted: #9aa4b5;
  --soft: #6f7889;
  --lime: #b9ff2f;
  --lime-2: #8fdc13;
  --cyan: #34d9ff;
  --gold: #f8bd45;
  --red: #ff5f78;
  --green: #60ee8a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --nav: 88px;
  font-family:
    Vazirmatn, Tahoma, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #05070a 0%, #0a0e13 48%, #05070a 100%);
  color: var(--text);
  direction: rtl;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-panel {
  width: min(720px, 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-left: 1px solid var(--border);
  background: rgba(8, 10, 15, 0.76);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  color: var(--lime);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(185, 255, 47, 0.5);
  border-radius: var(--radius);
  background: rgba(185, 255, 47, 0.09);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-button,
.bottom-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  text-align: right;
}

.nav-button.active,
.bottom-nav button.active {
  color: var(--lime);
  background: rgba(185, 255, 47, 0.11);
  box-shadow: inset -3px 0 0 var(--lime);
}

.sidebar-foot {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
  display: grid;
  gap: 12px;
}

.live-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(52, 217, 255, 0.8);
}

.main {
  min-width: 0;
  padding: 28px clamp(18px, 3vw, 40px) 110px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.pool-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.pool-title span {
  color: var(--lime);
  font-weight: 800;
}

.pool-title h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.05;
}

.admin-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(248, 189, 69, 0.72);
  border-radius: var(--radius);
  color: var(--gold);
  background: rgba(248, 189, 69, 0.08);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(17, 21, 29, 0.88);
  box-shadow: var(--shadow);
}

.panel-inner {
  padding: clamp(16px, 2.2vw, 24px);
}

.alert-stack {
  display: grid;
  gap: 10px;
}

.dashboard-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 214, 102, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 214, 102, 0.14), rgba(255, 255, 255, 0.025)),
    rgba(17, 21, 29, 0.92);
  box-shadow: var(--shadow);
}

.dashboard-alert.danger {
  border-color: rgba(255, 100, 100, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 100, 100, 0.16), rgba(255, 255, 255, 0.025)),
    rgba(17, 21, 29, 0.92);
}

.dashboard-alert strong {
  display: block;
  color: var(--text);
  font-size: 0.96rem;
}

.dashboard-alert p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-alert button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.dashboard-alert button:hover {
  border-color: var(--cyan);
}

.daily-rant-panel {
  border-color: rgba(67, 232, 216, 0.32);
}

.rant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
  align-items: center;
  gap: 16px;
}

.rant-winner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rant-winner p {
  margin: 4px 0 0;
  line-height: 1.7;
}

.rant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.rant-controls {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.rant-action {
  width: 100%;
}

.rant-action.recording {
  border-color: rgba(255, 100, 100, 0.62);
  color: #ffd6d6;
}

.rant-audio {
  width: 100%;
  min-width: 0;
}

.emoji-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 1rem;
}

.emoji-btn span {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.emoji-btn.active {
  border-color: var(--lime);
  background: rgba(185, 255, 47, 0.12);
}

.report-btn {
  color: #ffd6d6;
  border-color: rgba(255, 100, 100, 0.42);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.tiny {
  color: var(--soft);
  font-size: 0.78rem;
}

.match-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 28px);
  margin: 20px 0 10px;
  text-align: center;
}

.team {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 90px;
}

.team-badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
  object-fit: contain;
  padding: 8px;
}

.team-badge.fallback {
  color: #0b1220;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.versus {
  color: var(--soft);
  font-weight: 800;
}

.score-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 5vw, 44px);
  margin: 28px 0 18px;
}

.score-box {
  display: grid;
  grid-template-columns: 96px 44px;
  width: 140px;
  height: 112px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.score-number {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  appearance: textfield;
}

.score-number:focus {
  outline: 2px solid rgba(52, 217, 255, 0.45);
  outline-offset: -2px;
}

.score-number::-webkit-outer-spin-button,
.score-number::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.score-actions {
  display: grid;
  border-left: 1px solid var(--border);
}

.score-actions button {
  color: var(--lime);
  background: transparent;
  font-size: 1.4rem;
  font-weight: 900;
}

.score-actions button:first-child {
  border-bottom: 1px solid var(--border);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border-radius: var(--radius);
  color: #0a0c10;
  background: linear-gradient(180deg, var(--lime), var(--lime-2));
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(185, 255, 47, 0.18);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 98, 98, 0.52);
  border-radius: var(--radius);
  color: #ffe4e4;
  background: linear-gradient(180deg, rgba(255, 98, 98, 0.22), rgba(255, 98, 98, 0.1));
  font-weight: 900;
}

.primary-btn:disabled,
.ghost-btn:disabled,
.danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.compact-link {
  width: auto;
  min-height: 36px;
  margin-top: 10px;
  padding: 0 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  padding: 14px;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: 0;
}

.stat b {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1;
}

.accent {
  color: var(--lime);
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.chosen-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.country-selected-card {
  display: grid;
  gap: 12px;
}

.country-choice-trigger {
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: inherit;
  border: 0;
  background: transparent;
}

.country-choice-trigger .chosen-summary {
  width: 100%;
}

.country-selected-card .chosen-summary h3 {
  margin: 5px 0 4px;
  font-size: 1.5rem;
}

.crest {
  display: grid;
  place-items: center;
  width: 64px;
  height: 72px;
  border: 2px solid rgba(248, 189, 69, 0.68);
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(160deg, #103868, #0d203c);
  font-size: 1.9rem;
}

.crest .team-badge {
  width: 56px;
  height: 44px;
  border-radius: 6px;
  padding: 4px;
}

.reveal {
  overflow: hidden;
  background:
    linear-gradient(rgba(8, 10, 15, 0.35), rgba(8, 10, 15, 0.94)),
    repeating-linear-gradient(120deg, rgba(52, 217, 255, 0.18) 0 4px, transparent 4px 30px),
    radial-gradient(circle at center, rgba(185, 255, 47, 0.08), transparent 32rem),
    #0f141c;
}

.reveal-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  margin: 20px auto;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(8, 10, 15, 0.68);
  text-align: center;
}

.big-score {
  color: var(--lime);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 1000;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress span {
  display: block;
  height: 100%;
  width: 28%;
  border-radius: inherit;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(52, 217, 255, 0.7);
}

.trend-list {
  display: grid;
  gap: 14px;
}

.trend-row {
  display: grid;
  gap: 8px;
}

.trend-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trend-meta span {
  color: var(--lime);
  font-weight: 900;
}

.trend-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.trend-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.trend-row.draw .trend-track span {
  background: var(--cyan);
}

.trend-row.away .trend-track span {
  background: var(--gold);
}

.prediction-summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.prediction-summary-card > div {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.prediction-summary-card strong {
  font-size: 1.05rem;
}

.exact-predictions {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.exact-prediction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.exact-prediction-row .player strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-chip {
  min-width: 72px;
  text-align: center;
  font-size: 0.95rem;
}

.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.reaction {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.table {
  display: grid;
  gap: 6px;
}

.row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 70px 64px 54px;
  align-items: center;
  min-height: 50px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--text);
}

.player-row {
  width: 100%;
  border: 0;
  text-align: inherit;
  cursor: pointer;
}

.player-row:hover,
.player-row.selected {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.065);
}

.row.header {
  min-height: 34px;
  color: var(--soft);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.row:not(.header) {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
}

.row.you {
  border-color: rgba(185, 255, 47, 0.75);
  background: rgba(185, 255, 47, 0.08);
  color: var(--lime);
}

.player-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.reports-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.reports-stack > *,
.player-overview-grid,
.player-detail-panel,
.player-detail-grid,
.prediction-timeline,
.score-comparison-panel {
  min-width: 0;
  max-width: 100%;
}

.player-overview-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: inherit;
  cursor: pointer;
}

.player-overview-card:hover,
.player-overview-card.selected {
  border-color: rgba(185, 255, 47, 0.58);
  background: rgba(185, 255, 47, 0.07);
}

.player-overview-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.player-overview-head small,
.player-overview-meta,
.player-overview-latest span,
.player-overview-stats small {
  color: var(--muted);
  font-size: 0.74rem;
}

.player-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.player-overview-stats span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.player-overview-meta,
.player-overview-latest {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.player-overview-latest strong.lime {
  color: var(--lime);
}

.player-overview-latest strong.live {
  color: var(--cyan);
}

.player-overview-latest strong.negative {
  color: var(--negative);
}

.player-detail-panel {
  margin-top: 14px;
}

.player-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.player-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.player-chart {
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.chart-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--lime);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-bars {
  display: grid;
  gap: 10px;
}

.prediction-timeline {
  display: block;
  max-height: 360px;
  overflow: auto;
}

.prediction-timeline-row + .prediction-timeline-row {
  margin-top: 8px;
}

.prediction-timeline-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 78px 78px minmax(118px, auto);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 0.84rem;
}

.prediction-timeline-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.score-comparison-panel {
  margin-top: 14px;
  min-width: 0;
  overflow: hidden;
}

.score-comparison-table {
  display: block;
  width: 100%;
  min-width: 0;
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.score-comparison-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(112px, 0.55fr) repeat(var(--player-count), minmax(132px, 0.7fr));
  gap: 10px;
  align-items: stretch;
  min-width: calc(342px + (var(--player-count) * 142px));
  min-height: 68px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
}

.score-comparison-row:first-child {
  border-top: 0;
}

.score-comparison-row.header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 38px;
  color: var(--soft);
  background: rgba(11, 18, 24, 0.96);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-comparison-row.totals {
  position: sticky;
  bottom: 0;
  z-index: 1;
  min-height: 54px;
  border-top-color: var(--border-strong);
  background: rgba(17, 21, 29, 0.98);
}

.score-comparison-row small,
.comparison-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.comparison-cell {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.comparison-cell.empty {
  color: var(--soft);
  border-style: dashed;
}

.live-results-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 12px;
  color: var(--soft);
  font-size: 0.78rem;
}

.live-results-table {
  display: grid;
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.live-results-table.comprehensive {
  max-height: 620px;
}

.live-results-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) minmax(118px, 0.8fr) minmax(94px, 0.55fr) 70px minmax(118px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.84rem;
}

.live-results-table.comprehensive .live-results-row {
  grid-template-columns: minmax(112px, 0.8fr) minmax(260px, 1.55fr) minmax(128px, 0.8fr) minmax(92px, 0.55fr);
  min-width: 620px;
}

.live-results-row:first-child {
  border-top: 0;
}

.live-results-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 38px;
  color: var(--soft);
  background: rgba(11, 18, 24, 0.96);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-results-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.result-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-name-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.player-name-stack strong {
  font-size: 0.88rem;
  line-height: 1.25;
}

.player-name-stack strong,
.player-name-stack small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name-stack small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  aspect-ratio: 1;
  flex: 0 0 32px;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--surface-3), var(--border-strong));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.image-avatar {
  display: block;
  object-fit: cover;
  overflow: hidden;
}

.screen-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.screen-title h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.5rem);
}

.segmented-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.segmented-tabs button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.segmented-tabs button.active {
  color: #091007;
  background: var(--lime);
}

.match-list {
  display: grid;
  gap: 12px;
}

.admin-grid .match-list {
  max-height: 520px;
  overflow: auto;
  padding-left: 4px;
}

.match-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.tag.live {
  color: #031117;
  border-color: transparent;
  background: var(--cyan);
}

.tag.lime {
  color: #091007;
  border-color: transparent;
  background: var(--lime);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.team-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  max-height: 360px;
  overflow: auto;
  padding-left: 4px;
}

.country-search {
  margin-bottom: 14px;
}

.team-pick {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: right;
}

.team-pick .team-badge {
  width: 58px;
  height: 44px;
  border-radius: 6px;
  padding: 4px;
}

.team-pick.selected {
  border-color: rgba(185, 255, 47, 0.78);
  background: rgba(185, 255, 47, 0.08);
}

.bracket {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.round {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 180px;
}

.bracket-match {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.bracket-team {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.bracket-team.winner {
  color: var(--lime);
  background: rgba(185, 255, 47, 0.1);
}

.admin-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.sync-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(52, 217, 255, 0.045);
}

.sync-card p {
  margin: 6px 0 0;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: #0b0f16;
}

.field select:disabled {
  cursor: not-allowed;
  color: var(--soft);
  opacity: 0.62;
}

.locked-note {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  aspect-ratio: 1;
  flex: 0 0 88px;
  border-radius: 999px;
  color: #091007;
  background: var(--lime);
  font-size: 2rem;
  font-weight: 1000;
}

.profile-avatar.small {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  font-size: 1.25rem;
}

.profile-avatar.image-avatar {
  display: block;
}

.profile-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.account-danger {
  border-color: rgba(255, 98, 98, 0.36);
}

.confirm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.confirm-row .danger-btn,
.confirm-row .ghost-btn {
  width: auto;
}

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.modal.open {
  display: grid;
}

.modal-panel {
  width: min(560px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  height: 76px;
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 15, 0.9);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  justify-content: center;
  gap: 5px;
  min-height: 76px;
  padding: 0 4px;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.68rem;
  text-align: center;
  flex-direction: column;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 60;
  display: none;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid rgba(185, 255, 47, 0.55);
  border-radius: var(--radius);
  background: #10161f;
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
  animation: toast-in 220ms ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .app {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .main {
    padding-top: 18px;
  }

  .dashboard-grid,
  .two-col,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .live-results-table {
    overflow-x: auto;
  }

  .live-results-row {
    grid-template-columns: 220px 120px 92px 64px 120px;
    min-width: 616px;
  }

  .live-results-table.comprehensive .live-results-row {
    grid-template-columns: 112px 260px 128px 92px;
    min-width: 620px;
  }

  .results-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-controls {
    grid-template-columns: 1fr;
  }

  .player-detail-grid {
    grid-template-columns: 1fr;
  }

  .prediction-timeline {
    overflow-x: auto;
  }

  .prediction-timeline-row {
    grid-template-columns: 220px 78px 78px 118px;
    min-width: 540px;
  }

  .score-comparison-table {
    max-height: 480px;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
  }

  .admin-switch {
    padding: 0 12px;
  }

  .match-head {
    justify-content: space-between;
  }

  .team {
    min-width: 76px;
  }

  .score-box {
    grid-template-columns: minmax(72px, 1fr) 38px;
    width: min(42vw, 126px);
    height: 102px;
  }

  .score-number {
    font-size: 1.9rem;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .row {
    grid-template-columns: 32px minmax(0, 1fr) 54px 48px 42px;
    padding: 0 7px;
  }

  .row.header {
    font-size: 0.68rem;
  }

  .match-item {
    grid-template-columns: 1fr;
  }

  .dashboard-alert {
    grid-template-columns: 1fr;
  }

  .dashboard-alert button {
    width: 100%;
  }

  .confirm-row {
    grid-template-columns: 1fr;
  }

  .confirm-row .danger-btn,
  .confirm-row .ghost-btn {
    width: 100%;
  }

  .rant-layout {
    grid-template-columns: 1fr;
  }
}

/* Mobile-first redesign */
.app {
  display: block;
  min-height: 100vh;
}

.sidebar {
  display: none;
}

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 12px 14px 106px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: block;
  margin: -12px -14px 14px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 7, 10, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.pool-title {
  align-items: center;
  gap: 10px;
}

.pool-title span:not(.brand-mark) {
  display: block;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.pool-title h1 {
  max-width: 48vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1.2;
}

.brand-mark.compact {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 8px;
}

.top-nav {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.8rem;
  font-weight: 900;
}

.user-chip .avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.logout-btn {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.admin-switch.icon-only {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.admin-switch.icon-only span {
  display: none;
}

.screen.active {
  display: block;
}

.home-stack {
  display: grid;
  gap: 14px;
}

.home-spotlight,
.home-grid {
  display: grid;
  gap: 14px;
}

.home-status-strip {
  display: flex;
  gap: 8px;
  margin: 0 -2px;
  padding: 0 2px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-status-strip::-webkit-scrollbar {
  display: none;
}

.metric-pill {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 72px;
  flex: 0 0 112px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.01)),
    rgba(15, 20, 27, 0.9);
}

.metric-pill.wide {
  flex-basis: 146px;
}

.metric-pill span {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.metric-pill strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(15, 20, 27, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

.panel-inner {
  padding: 16px;
}

.section-title {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.section-title > span:first-child {
  font-size: 1rem;
}

.section-title > span:last-child,
.section-title > button {
  color: var(--muted);
  font-size: 0.75rem;
}

.prediction-panel {
  border-color: rgba(185, 255, 47, 0.32);
}

.home-prediction-panel {
  background:
    linear-gradient(180deg, rgba(185, 255, 47, 0.075), rgba(255, 255, 255, 0.012)),
    rgba(15, 20, 27, 0.96);
}

.home-match-meta {
  display: grid;
  gap: 5px;
  max-width: 520px;
  margin: -2px auto 8px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 255, 47, 0.22);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.58);
}

.home-match-meta span {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.home-match-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-prediction-panel .primary-btn {
  max-width: 420px;
  margin: 0 auto;
}

.home-prediction-panel .match-head {
  margin: 12px 0 8px;
}

.home-prediction-panel .score-row {
  margin: 14px 0 12px;
}

.home-prediction-panel .team {
  gap: 6px;
  min-width: 72px;
}

.home-prediction-panel .team strong {
  font-size: 0.92rem;
}

.home-prediction-panel .team-badge {
  width: 58px;
  height: 58px;
  padding: 6px;
}

.home-prediction-panel .score-box {
  width: min(36vw, 118px);
  height: 88px;
  grid-template-columns: minmax(70px, 1fr) 36px;
}

.home-prediction-panel .score-number {
  font-size: 1.75rem;
}

.home-prediction-panel .primary-btn {
  min-height: 48px;
}

.team-badge {
  border-radius: 8px;
}

.score-box {
  border-radius: 8px;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.dashboard-alert button {
  border-radius: 8px;
}

.primary-btn {
  min-height: 52px;
  color: #081006;
  background: linear-gradient(180deg, #b9ff2f, #91e011);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
}

.compact-link {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
}

.daily-rant-panel {
  border-color: rgba(52, 217, 255, 0.26);
}

.rant-layout {
  grid-template-columns: 1fr;
}

.emoji-btn,
.tag,
.reaction {
  border-radius: 8px;
}

.tag {
  min-height: 26px;
  padding: 0 9px;
  white-space: nowrap;
}

.leaderboard-panel.mini {
  min-height: 100%;
}

.standings-list {
  display: grid;
  gap: 8px;
}

.standing-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: inherit;
}

.standing-row:hover,
.standing-row.selected {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
}

.standing-row.you {
  border-color: rgba(185, 255, 47, 0.72);
  background: rgba(185, 255, 47, 0.08);
}

.standing-rank {
  color: var(--lime);
  font-size: 1.12rem;
  font-weight: 1000;
  text-align: center;
}

.standing-points,
.standing-extra,
.standing-move {
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
}

.standing-points strong,
.standing-extra strong {
  color: var(--text);
  font-size: 1rem;
}

.standing-points small,
.standing-extra small {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.leaderboard-panel.full .standing-row {
  grid-template-columns: 36px minmax(0, 1fr) 64px 52px 42px;
}

.results-preview-panel {
  border-color: rgba(52, 217, 255, 0.2);
}

.compact-results-list {
  display: grid;
  gap: 8px;
}

.result-preview-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(62px, auto);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: inherit;
}

.result-teams {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.result-teams strong,
.result-teams small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-teams small {
  color: var(--muted);
  font-size: 0.74rem;
}

.result-score {
  color: var(--cyan);
  text-align: left;
  white-space: nowrap;
}

.country-selected-card,
.team-pick,
.match-item,
.prediction-summary-card > div,
.player-overview-card,
.profile-preview,
.sync-card,
.bracket-match {
  border-radius: 8px;
}

.crest {
  border-radius: 8px;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 78px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(5, 7, 10, 0.92);
}

.bottom-nav .nav-button {
  min-height: 78px;
  color: var(--muted);
}

.nav-button {
  border-radius: 8px;
}

.nav-button.active,
.bottom-nav button.active {
  color: var(--lime);
  background: rgba(185, 255, 47, 0.09);
  box-shadow: inset 0 3px 0 var(--lime);
}

.bottom-nav .nav-button.active {
  box-shadow: inset 0 3px 0 var(--lime), 0 -16px 32px rgba(185, 255, 47, 0.08);
}

.screen-title {
  align-items: flex-start;
  margin-bottom: 14px;
}

.screen-title h2 {
  font-size: clamp(1.45rem, 8vw, 2.2rem);
}

.compact-screen-title p {
  margin: 6px 0 0;
}

@media (max-width: 430px) {
  .main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .topbar {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .pool-title h1 {
    max-width: 42vw;
  }

  .user-chip span {
    display: none;
  }

  .logout-btn {
    display: none;
  }

  .leaderboard-panel.full .standing-row {
    grid-template-columns: 32px minmax(0, 1fr) 58px 42px;
  }

  .leaderboard-panel.full .standing-extra {
    display: none;
  }

  .player-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .main {
    padding: 18px 22px 34px;
  }

  .topbar {
    margin: -18px -22px 18px;
    padding: 14px 22px 12px;
  }

  .topbar-main {
    grid-template-columns: minmax(180px, 0.9fr) auto minmax(180px, 0.9fr);
  }

  .top-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
  }

  .top-nav .nav-button {
    min-height: 38px;
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .top-nav .nav-button.active {
    color: #091007;
    background: var(--lime);
    box-shadow: none;
  }

  .top-nav .icon {
    width: 18px;
    height: 18px;
  }

  .bottom-nav {
    display: none;
  }

  .home-status-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }

  .metric-pill,
  .metric-pill.wide {
    min-width: 0;
    flex-basis: auto;
  }

  .home-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
    align-items: stretch;
  }

  .rant-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-inner {
    padding: 18px;
  }
}

@media (min-width: 1040px) {
  .home-stack {
    gap: 16px;
  }

  .home-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(360px, 0.55fr);
  }

  .home-prediction-panel .panel-inner {
    padding: 22px;
  }
}
