:root {
  --bg: #0a1628;
  --surface: #12243d;
  --surface-hover: #1a3254;
  --border: #2a4a73;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.35);
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --danger: #ef4444;
  --gold: #fbbf24;
  --silver: #cbd5e1;
  --bronze: #d97706;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.hub-back-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.85);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.hub-back-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(10, 22, 40, 0.95);
}

/* Hero */
.hero {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-bottom: 3px solid var(--primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(249, 115, 22, 0.4) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(59, 130, 246, 0.18) 0%, transparent 55%),
    linear-gradient(165deg, #0a1628 0%, #12243d 50%, #0f1f38 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 22, 40, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.logo {
  cursor: default;
  user-select: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  letter-spacing: 0.04em;
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow), 2px 2px 0 #7c2d12;
}

.logo-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.12em;
  color: white;
  margin-top: 0.2rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  margin-top: 0.25rem;
}

.user-label { font-weight: 600; font-size: 0.9rem; }

/* Tabs */
.tabs {
  display: flex;
  gap: 0.45rem;
  padding: 0.45rem;
  margin: 1rem auto 0;
  max-width: calc(1100px - 3rem);
  background: linear-gradient(180deg, rgba(18, 36, 61, 0.96) 0%, rgba(10, 22, 40, 0.98) 100%);
  border: 1px solid rgba(42, 74, 115, 0.9);
  border-radius: 1rem;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  justify-content: stretch;
}

.tab {
  position: relative;
  flex: 1;
  min-width: 0;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(42, 74, 115, 0.55);
  color: var(--text-muted);
  padding: 0.72rem 0.85rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tab:hover {
  color: var(--text);
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(26, 50, 84, 0.75);
  transform: translateY(-1px);
}

.tab:hover::before {
  opacity: 1;
}

.tab.active {
  color: #fff;
  background: linear-gradient(145deg, #fb923c 0%, var(--primary) 45%, var(--primary-dark) 100%);
  border-color: rgba(251, 146, 60, 0.75);
  box-shadow:
    0 6px 22px rgba(249, 115, 22, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tab.active::before {
  opacity: 0;
}

.tab[data-tab="admin"].active {
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  border-color: rgba(251, 191, 36, 0.8);
  box-shadow:
    0 6px 22px rgba(245, 158, 11, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.section-header { margin-bottom: 1.5rem; }

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-copy-btn,
.match-copy-btn {
  flex-shrink: 0;
}

.match-copy-btn {
  display: block;
  margin: 0.75rem auto 0;
}

.section-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.section-desc { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.wall-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wall-feed {
  height: clamp(280px, 48vh, 440px);
  max-height: clamp(280px, 48vh, 440px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.55rem 0.75rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.wall-feed::-webkit-scrollbar {
  display: none;
}

.wall-list {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.84rem;
  line-height: 1.3;
  min-height: 0;
}

.wall-line-new {
  animation: wallLineIn 0.35s ease-out;
}

@keyframes wallLineIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wall-line {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.12rem 0;
}

.wall-line-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  word-break: break-word;
}

.wall-line-time {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wall-line-user {
  font-weight: 700;
  color: var(--primary);
  margin-left: 0.15rem;
  margin-right: 0.35rem;
  white-space: nowrap;
}

.wall-line-msg {
  color: var(--text);
}

.wall-role-badge {
  display: inline-block;
  margin-left: 0.3rem;
  margin-right: 0.15rem;
  font-size: 0.72rem;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(-0.5px);
}

.wall-role-admin {
  font-size: 0.95rem;
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.45);
  transform: translateY(-1px);
}

.wall-role-user {
  font-size: 0.65rem;
}

.wall-delete-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #fca5a5;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
  opacity: 0.55;
}

.wall-delete-btn:hover {
  opacity: 1;
}

.wall-login-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wall-input-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
}

.wall-compose-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.wall-emoji-wrap {
  position: relative;
}

.wall-emoji-btn {
  min-width: 2rem;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
}

.wall-emoji-picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(6, 1.85rem);
  gap: 0.15rem;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  box-shadow: var(--shadow);
}

.wall-emoji-picker.hidden {
  display: none;
}

.wall-emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.wall-emoji-item:hover {
  background: var(--surface-hover);
}

.wall-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(10, 22, 40, 0.65);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

.wall-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.wall-empty {
  text-align: center;
  padding: 1.5rem 0;
}



/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 24, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  backdrop-filter: blur(6px);
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
}

.modal h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.modal-desc { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.25rem; }

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  color: white;
  border-color: var(--primary);
  background: rgba(249, 115, 22, 0.15);
}

input, select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.form-hint {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
}
.btn-accent:hover { filter: brightness(1.1); }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--surface-hover); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* Match cards */
.matches-grid { display: grid; gap: 1rem; }

.match-card {
  background: linear-gradient(145deg, var(--surface), #0f1f35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.match-card.finished { border-color: rgba(59, 130, 246, 0.45); }
.match-card.closed { opacity: 0.8; }

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.match-header .badge {
  flex-shrink: 0;
}

.match-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
}

.match-teams {
  font-size: 1.15rem;
  font-weight: 700;
}

.match-deadline {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.match-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.match-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.match-panel-top-status {
  justify-content: flex-end;
}

.match-panel-top .badge {
  flex-shrink: 0;
}

.match-countdown {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.02em;
}

.match-countdown.countdown-ended {
  color: var(--silver);
}

.match-header-status {
  justify-content: flex-end;
}

.match-result-score.score-box {
  display: block;
  justify-self: center;
  color: var(--text);
}

.match-result-unknown {
  color: var(--silver);
}

.match-bet-panel .public-predictions {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
}

.match-bet-panel {
  background: rgba(15, 31, 53, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.15rem;
}

.match-bet-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem minmax(0, 1fr);
  column-gap: 1.15rem;
  row-gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.15rem;
}

.match-bet-teams,
.match-bet-scores {
  display: contents;
}

.match-bet-vs-spacer {
  grid-column: 2;
}

.match-bet-team {
  justify-self: center;
  text-align: center;
  width: 76px;
  max-width: 100%;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.match-bet-team-home { grid-column: 1; }
.match-bet-team-away { grid-column: 3; }

.match-points-earned {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}

.match-points-zero {
  color: var(--text-muted);
}

.match-bet-vs {
  grid-column: 2;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-align: center;
  justify-self: center;
  line-height: 1;
}

.match-bet-scores .score-field,
.match-bet-scores .score-box {
  width: 76px;
  max-width: 100%;
  justify-self: center;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.55rem;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--bg);
}

.match-bet-login {
  display: block;
  margin: 0.9rem auto 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.match-footer-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.match-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.closed-body .closed-score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--silver);
  letter-spacing: 0.2em;
}

.public-predictions {
  width: 100%;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.public-predictions-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.public-predictions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prediction-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 31, 53, 0.9);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.prediction-chip strong {
  color: #e2e8f0;
  margin-left: 0.15rem;
}

.public-predictions-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.public-predictions.reveal-predictions {
  animation: revealPredictions 0.7s ease-out;
}

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

.public-predictions.reveal-predictions .prediction-chip {
  animation: chipPop 0.45s ease-out backwards;
}

.public-predictions.reveal-predictions .prediction-chip:nth-child(1) { animation-delay: 0.08s; }
.public-predictions.reveal-predictions .prediction-chip:nth-child(2) { animation-delay: 0.16s; }
.public-predictions.reveal-predictions .prediction-chip:nth-child(3) { animation-delay: 0.24s; }
.public-predictions.reveal-predictions .prediction-chip:nth-child(4) { animation-delay: 0.32s; }
.public-predictions.reveal-predictions .prediction-chip:nth-child(n+5) { animation-delay: 0.4s; }

.match-card.closed .public-predictions.reveal-predictions .prediction-chip {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

@keyframes chipPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.match-group { margin-bottom: 2rem; }

.match-group-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(249, 115, 22, 0.25);
}

.matches-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.lb-row.lb-row-me {
  background: rgba(34, 211, 238, 0.1);
  border-left: 3px solid #22d3ee;
}

.lb-row.lb-row-me .lb-name {
  color: #a5f3fc;
}

.lb-cards { display: none; }

.lb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.65rem;
}

.lb-card.lb-card-me {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.08);
}

.lb-card.lb-card-me .lb-card-name {
  color: #a5f3fc;
}

.lb-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.lb-card-name { font-weight: 700; font-size: 1rem; }
.lb-card-points { font-weight: 800; color: var(--gold); font-size: 1.1rem; }

.lb-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lb-card-stats strong { display: block; color: var(--text); font-size: 0.95rem; }

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { color: var(--text); background: rgba(148, 163, 184, 0.25); }

.modal-auth { position: relative; }

.auth-skip-btn { margin-top: 0.75rem; }

.missing-bets-list { display: flex; flex-direction: column; gap: 0.75rem; }

.missing-bet-row {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 31, 53, 0.5);
}

.missing-bet-title { font-weight: 700; margin-bottom: 0.35rem; }
.missing-bet-names { font-size: 0.85rem; color: #fecaca; }
.missing-bet-ok { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-seal {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--border);
}

.footer-share {
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-share:hover { text-decoration: underline; }

.autosave-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-height: 1rem;
}

.autosave-hint.saving { color: var(--gold); }
.autosave-hint.saved { color: #86efac; }
.autosave-hint.error {
  color: #fca5a5;
  cursor: pointer;
  text-decoration: underline;
}

.incomplete-bet-warning {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #fbbf24;
  text-align: center;
}

.admin-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.audit-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.audit-entry {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  padding: 0.75rem 0.85rem;
}

.audit-entry-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
}

.audit-entry-time {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}

.audit-entry-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.15);
  color: #fdba74;
}

.audit-entry-admin {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.audit-entry-summary {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.audit-entry-details {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.account-stats { margin-bottom: 0; }

.account-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.account-page-body .footer {
  margin-top: auto;
}

.hero-compact {
  min-height: auto;
}

.hero-compact .hero-content {
  padding: 1.25rem 1rem 1rem;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.account-page {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  max-width: 960px;
}

.account-page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.account-page-user {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.account-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.account-panel-stats {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
}

.account-panels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .account-panels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 600px) {
  .account-page .account-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.account-meta {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.account-meta strong {
  color: var(--text);
  font-weight: 600;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.account-stat {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.account-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.account-stat strong {
  font-size: 1.1rem;
  color: var(--primary);
}

.account-stats-title {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.account-stats-recent {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.account-stats-recent li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.35);
  font-size: 0.82rem;
}

.account-stats-recent li span:last-child {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.account-stats-empty { color: var(--text-muted); font-size: 0.85rem; }

.points-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 120px;
  padding: 0.5rem 0.25rem 0;
  margin-bottom: 0.35rem;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.35);
  overflow-x: auto;
}

.points-chart-bar {
  flex: 1 0 18px;
  min-width: 18px;
  max-width: 36px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(249, 115, 22, 0.55) 100%);
  border-radius: 0.35rem 0.35rem 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.points-chart-value {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  padding-top: 0.15rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.points-chart-labels {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.points-chart-label {
  flex: 1 0 18px;
  min-width: 18px;
  max-width: 36px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-section-title {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.account-form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-open { background: rgba(249, 115, 22, 0.2); color: var(--primary); }
.badge-closed { background: rgba(148, 163, 184, 0.2); color: var(--silver); }
.badge-finished { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }

.match-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.team-name {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 80px;
}

.score-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#resultForm .score-inputs {
  justify-content: center;
  margin: 0.5rem 0 1.25rem;
}

.score-inputs input,
.score-field {
  width: 60px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.55rem;
  border-color: var(--primary);
  -moz-appearance: textfield;
  appearance: textfield;
}

.score-sep {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.final-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.match-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.my-prediction { font-size: 0.8rem; color: var(--text-muted); }
.my-prediction strong { color: var(--text); }
.points-earned { font-weight: 700; color: var(--gold); }

/* Leaderboard */
.leaderboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.lb-row {
  display: grid;
  grid-template-columns: 44px minmax(120px, 1fr) 68px 68px 68px 72px;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.lb-row:last-child { border-bottom: none; }
.lb-row.header {
  background: rgba(249, 115, 22, 0.08);
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lb-col-rank { text-align: center; }
.lb-col-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-col-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lb-rank { font-weight: 800; font-size: 1.1rem; }
.lb-rank.gold { color: var(--gold); }
.lb-rank.silver { color: var(--silver); }
.lb-rank.bronze { color: var(--bronze); }
.lb-name { font-weight: 600; }
.lb-points {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

/* Admin */
.admin-login { max-width: 400px; margin: 0 auto 1.5rem; }

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius);
}

.admin-status { font-size: 0.875rem; color: var(--text-muted); }
.admin-status strong { color: var(--primary); }

.storage-usage-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.45;
}

.storage-usage-banner.ok {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.storage-usage-banner.warning {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.45);
  color: #fde68a;
}

.storage-usage-banner.critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.storage-usage-banner strong { color: inherit; }

.storage-usage-meter {
  height: 10px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0 0.5rem;
}

.storage-usage-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  transition: width 0.35s ease;
}

.storage-usage-fill.warning {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.storage-usage-fill.critical {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.storage-usage-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-subtabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.admin-subtab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-subtab.active {
  color: var(--primary);
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.admin-settings-card { max-width: 480px; margin-bottom: 1rem; }

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-user-info { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-user-name { font-weight: 600; font-size: 0.9rem; }
.admin-user-meta { font-size: 0.75rem; color: var(--text-muted); }

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.btn-danger:hover { background: var(--danger); color: white; }

.admin-user-actions { display: flex; gap: 0.35rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.modal-confirm { max-width: 400px; }

.btn-warning {
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.4);
}
.btn-warning:hover { background: var(--primary); color: white; }

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.checkbox-row input { width: auto; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.finished-match-block {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.finished-match-block:last-child { border-bottom: none; }

.finished-match-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prediction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.prediction-row .pts { font-weight: 700; min-width: 48px; text-align: right; }
.prediction-row .pts.exact { color: var(--gold); }
.prediction-row .pts.correct { color: var(--primary); }
.prediction-row .pts.zero { color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-icon { font-size: 3rem; display: block; margin-bottom: 0.75rem; }

.legend {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.legend h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.legend-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.legend-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.legend-list strong { color: var(--text); }

.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.hidden { display: none !important; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 200;
  font-size: 0.9rem;
}

.toast.success { border-color: var(--primary); }
.toast.error { border-color: var(--danger); color: #fca5a5; }

@media (max-width: 640px) {
  .hero { min-height: 180px; }
  .logo-subtitle { letter-spacing: 0.08em; }
  .tabs {
    margin: 0.75rem 1rem 0;
    max-width: none;
    padding: 0.4rem;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar { display: none; }

  .tab {
    flex: 0 0 auto;
    padding: 0.58rem 0.95rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .match-bet-matchup {
    column-gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) 2.75rem minmax(0, 1fr);
  }

  .match-bet-scores .score-field,
  .match-bet-scores .score-box {
    width: 64px;
    font-size: 1.5rem;
    padding: 0.65rem 0.35rem;
  }

  .match-bet-team {
    width: 64px;
    font-size: 0.78rem;
  }

  .match-bet-vs {
    font-size: 1.35rem;
  }

  .score-inputs .score-field {
    width: 56px;
    font-size: 1.6rem;
    padding: 0.7rem 0.35rem;
  }

  .leaderboard .lb-row { display: none; }
  .lb-cards { display: block; }

  .matches-grid-inner {
    grid-template-columns: 1fr;
  }
}