:root {
  --bg-dark: #070c18;
  --bg-card: rgba(22, 33, 56, 0.74);
  --bg-card-hover: rgba(30, 45, 74, 0.82);
  --bg-card-subtle: rgba(11, 18, 33, 0.78);
  --glass-blur: 16px;
  --border-color: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.22);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --pitch-grass: #15803d;
  --pitch-stripe: #166534;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Dynamic League Division Backdrop System - Rock-Solid & Locked on Scroll */
.backdrop-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-color: #070c18;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.backdrop-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/images/backdrops/tier_3.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  filter: brightness(0.68) contrast(1.1) saturate(1.06);
  transform: none;
  transition: opacity 0.4s ease;
}

.backdrop-scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 50% 35%, rgba(7, 12, 24, 0.2) 0%, rgba(7, 12, 24, 0.68) 65%, rgba(4, 7, 15, 0.94) 100%),
    linear-gradient(180deg, rgba(7, 12, 24, 0.65) 0%, rgba(7, 12, 24, 0.15) 30%, rgba(7, 12, 24, 0.8) 100%);
  pointer-events: none;
}

/* Initial Game Loading Screen (Backdrop + Centered Loading Icon) */
.app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.app-loading .app-loading-screen {
  opacity: 1;
  visibility: visible;
}

body.app-loading header,
body.app-loading main,
body.app-loading #openFeedbackBtn,
body.app-unauthenticated header,
body.app-unauthenticated main,
body.app-unauthenticated #openFeedbackBtn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

header,
main,
#openFeedbackBtn {
  transition: opacity 0.25s ease;
}

.app-loading-indicator {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.65));
}

.app-loading-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(56, 189, 248, 0.16);
  border-top-color: var(--accent-cyan);
  border-right-color: rgba(37, 99, 235, 0.75);
  animation: appLoadingSpin 0.95s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.app-loading-icon {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  animation: appLoadingPulse 1.8s ease-in-out infinite;
}

@keyframes appLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes appLoadingPulse {
  0%, 100% {
    transform: scale(0.97);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

/* Header & Navigation (No backdrop-filter so fixed mobile bottom nav is never trapped) */
header {
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand span.accent {
  color: var(--accent-cyan);
}

.app-version-badge {
  font-family: var(--font-mono, "SF Mono", monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.2;
  vertical-align: middle;
  text-transform: lowercase;
  opacity: 0.85;
}

.app-version-badge:hover {
  opacity: 1;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.club-meta-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.team-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: inline-block;
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.nav-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.btn-sm:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
}

/* Main Container & Views */
main {
  flex: 1;
  padding: 24px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.18s ease-in-out;
}

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

/* Common UI Components with Frosted Glass */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.btn-success:hover {
  background: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Dashboard View */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.matchday-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.82));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.matchday-matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 20px 0;
}

.matchday-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.team-shield-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.team-name-lg {
  font-size: 20px;
  font-weight: 800;
}

.vs-badge {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-cyan);
  background: var(--bg-card-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* Scheduled Matchday Kickoff Countdown Box (Production Mode) */
.kickoff-schedule-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 14px 24px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.kickoff-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.kickoff-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

.kickoff-interval-tag {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  color: #bae6fd;
}

.kickoff-countdown {
  display: flex;
  align-items: center;
  gap: 12px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
}

.countdown-val {
  font-family: var(--font-mono, "SF Mono", "Roboto Mono", monospace);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.countdown-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 2px;
}

.countdown-sep {
  font-family: var(--font-mono, monospace);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-cyan);
  opacity: 0.8;
  margin-top: -8px;
}

.kickoff-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.kickoff-simulating {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-amber);
  padding: 8px 16px;
}

.stats-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--bg-card-subtle);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

/* Tactics View */
.tactics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tactics-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: 10px;
}

select.tactical-select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Tactical Pitch Board */
.pitch-board {
  position: relative;
  background: #14532d;
  border: 3px solid #f8fafc;
  border-radius: 12px;
  width: 100%;
  height: 520px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.pitch-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Interactive Player Node on Pitch */
.pitch-player {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pitch-player::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  z-index: 1;
}

.pitch-player:hover {
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 20;
}

.pitch-player.selected {
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 30;
  filter: drop-shadow(0 0 10px var(--accent-amber));
}

.player-badge-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid white;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  position: relative;
}

.slot-tag {
  position: absolute;
  top: -8px;
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  border: 1px solid #475569;
  border-radius: 6px;
  font-size: 8px;
  padding: 0 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
}

.pos-tag {
  position: absolute;
  bottom: -7px;
  background: #0f172a;
  color: var(--accent-cyan);
  border: 1px solid #475569;
  border-radius: 8px;
  font-size: 9px;
  padding: 1px 5px;
  font-weight: 800;
  white-space: nowrap;
  z-index: 2;
}

.pos-tag.pos-natural {
  background: #14532d;
  color: #4ade80;
  border-color: #22c55e;
}

.pos-tag.pos-secondary {
  background: #0e7490;
  color: #67e8f9;
  border-color: #06b6d4;
}

.pos-tag.pos-out {
  background: #7f1d1d;
  color: #fca5a5;
  border-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.player-card-name {
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 84px;
  border: 1px solid #334155;
}

.player-card-rating {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 1px 6px;
  margin-top: 3px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cond-pill {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.2px;
}

.player-card-injured {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-red);
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid white;
}

/* Squad & Bench Lists */
.bench-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.bench-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bench-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.bench-card.selected {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
}

.squad-table-container {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

table.data-table th {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border-color);
}

table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1e293b;
}

table.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

table.data-table tr.my-team-row {
  background: rgba(37, 99, 235, 0.15);
  font-weight: 700;
}

.zone-promotion {
  border-left: 4px solid var(--accent-green) !important;
}

.zone-relegation {
  border-left: 4px solid var(--accent-red) !important;
}

.zone-champion {
  border-left: 4px solid var(--accent-amber) !important;
}

.form-pill {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-right: 3px;
}

.form-W { background: var(--accent-green); color: white; }
.form-D { background: var(--border-light); color: white; }
.form-L { background: var(--accent-red); color: white; }

/* Radar & Replay View */
.radar-view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 24px;
  width: 100%;
  max-width: 860px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 24px;
  font-weight: 800;
}

.score-box {
  background: #0f172a;
  padding: 6px 18px;
  border-radius: 8px;
  border: 2px solid #475569;
  font-family: monospace;
  font-size: 28px;
  color: #f8fafc;
  min-width: 90px;
}

.score-box.goal-pulse {
  background: var(--accent-amber);
  color: #000;
  border-color: #fef08a;
  transform: scale(1.12);
}

.clock-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--accent-cyan);
  font-family: monospace;
  font-weight: 700;
  background: #0f172a;
  padding: 3px 12px;
  border-radius: 20px;
}

.live-broadcast-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: live-blink 1.2s infinite ease-in-out;
}

@keyframes live-blink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.3);
  }
}

.spoiler-unmask-btn {
  font-size: 11px;
  color: var(--accent-cyan);
  background: transparent;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spoiler-unmask-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-cyan);
}

.commentary-banner {
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 6px;
  font-size: 14px;
  color: #cbd5e1;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 4px solid var(--accent-cyan);
}

.pitch-container {
  position: relative;
  background: #14532d;
  border: 4px solid #f8fafc;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 860px;
  aspect-ratio: 860 / 540;
  height: auto;
  overflow: hidden;
}

#pitchCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.slowmo-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(220, 38, 38, 0.85);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.slowmo-badge.active {
  display: flex;
}

.slowmo-rec-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.goal-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(15, 23, 42, 0.95);
  border: 3px solid #eab308;
  color: #eab308;
  font-size: 36px;
  font-weight: 900;
  padding: 20px 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.goal-flash.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.timeline-section {
  width: 100%;
  max-width: 860px;
  margin-top: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.slider-wrapper {
  position: relative;
  margin-bottom: 12px;
}

input[type=range] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #334155;
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-cyan);
}

.timeline-markers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.marker-pin {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
  font-size: 16px;
  transition: transform 0.15s ease;
}

.marker-pin:hover {
  transform: translateX(-50%) scale(1.4);
  z-index: 10;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-group {
  display: flex;
  gap: 8px;
}

.chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.event-chip {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.event-chip:hover {
  background: #1e293b;
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.event-chip.goal-chip {
  border-color: var(--accent-amber);
  background: rgba(234, 179, 8, 0.1);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  width: 440px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-cyan);
}

.form-row {
  display: flex;
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
  z-index: 200;
  animation: slideIn 0.25s ease;
}

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

/* Player Detailed Skills Modal */
.player-modal-card {
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.bottom-sheet-handle {
  display: none;
}

.player-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.player-modal-jersey {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.player-quick-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metric-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.metric-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.metric-val {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.skill-category-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
}

.skill-cat-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  gap: 10px;
}

.skill-name {
  color: var(--text-muted);
  width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.skill-bar-track {
  flex: 1;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}

.skill-val {
  font-weight: 700;
  width: 38px;
  text-align: right;
  font-size: 11px;
}

.role-pill {
  padding: 5px 10px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-pill.best-role {
  border-color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  color: #fff;
}

.inspect-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inspect-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
}

.pitch-node-inspect {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-weight: 800;
  transition: transform 0.15s ease;
}

.pitch-node-inspect:hover {
  transform: scale(1.2);
  background: #2563eb;
  color: #fff;
}

/* Nav Item Spans */
.nav-icon {
  font-size: 15px;
  line-height: 1;
}

.nav-label {
  font-size: 14px;
}

/* Touch & Mobile Optimizations */
button, select, input, .nav-btn, .bench-card, .pitch-player {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   RESPONSIVE MOBILE BREAKPOINTS (Maintains 100% desktop fidelity on > 768px)
   ========================================================================== */

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .transfers-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .tactics-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .tactics-layout > *,
  .dashboard-grid > * {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal document spillover */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
  }

  /* Compact Sticky Header */
  header {
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    gap: 8px;
    max-width: 100vw;
    box-sizing: border-box;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    filter: none !important;
  }

  .brand {
    font-size: 15px;
    white-space: nowrap;
    gap: 6px;
  }

  .club-meta-pill {
    padding: 4px 10px;
    font-size: 11.5px;
    gap: 6px;
  }

  .user-profile #managerNameMeta {
    display: none;
  }

  .btn-sm {
    padding: 5px 9px;
    font-size: 11px;
  }

  /* Fixed Mobile Bottom Navigation Bar */
  .nav-tabs {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: #0f172a !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    justify-content: space-around !important;
    gap: 2px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6) !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .nav-btn {
    flex-direction: column;
    gap: 2px;
    padding: 6px 2px;
    font-size: 10px;
    flex: 1;
    min-width: 0;
    text-align: center;
    border-radius: 6px;
  }

  .nav-btn .nav-icon {
    font-size: 18px;
    line-height: 1;
  }

  .nav-btn .nav-label {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Main Container strictly bounded within viewport */
  main {
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden;
    padding: 14px 10px calc(76px + env(safe-area-inset-bottom)) 10px;
    box-sizing: border-box;
  }

  .view-panel {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .card {
    padding: 14px 12px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* KPI Stat Boxes */
  .stats-summary-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-box {
    padding: 12px 8px;
    min-width: 0;
    box-sizing: border-box;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* Hero Matchday Banner */
  .matchday-hero {
    padding: 16px 12px;
    box-sizing: border-box;
  }

  .matchday-matchup {
    gap: 12px;
    margin: 14px 0;
  }

  .team-shield-large {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .team-name-lg {
    font-size: 15px;
  }

  .vs-badge {
    font-size: 13px;
    padding: 4px 10px;
  }

  #dashMatchActions .btn-success,
  #dashMatchActions .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
  }

  .kickoff-schedule-box {
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .kickoff-countdown {
    gap: 8px;
  }

  .countdown-unit {
    min-width: 44px;
    padding: 4px 6px;
  }

  .countdown-val {
    font-size: 20px;
  }

  .countdown-sep {
    font-size: 18px;
    margin-top: -6px;
  }

  /* Tactics Board on Mobile */
  .pitch-board {
    height: 430px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tactics-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }

  .tactics-header-bar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  #saveTacticsBtn {
    width: 100%;
    justify-content: center;
  }

  .pitch-player {
    width: 62px;
  }

  .player-badge-circle {
    width: 33px;
    height: 33px;
    font-size: 11px;
  }

  .player-card-name {
    max-width: 62px;
    font-size: 9px;
  }

  .player-card-rating {
    font-size: 8px;
  }

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

  /* Match Radar Replay on Mobile */
  .header-card {
    padding: 12px 14px;
    box-sizing: border-box;
  }

  .scoreboard {
    gap: 10px;
    font-size: 16px;
  }

  .score-box {
    font-size: 20px;
    padding: 4px 10px;
    min-width: 65px;
  }

  .controls-row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .btn-group {
    width: 100%;
    justify-content: center;
  }

  .btn-group button {
    flex: 1;
    justify-content: center;
  }

  .commentary-banner {
    font-size: 12.5px;
    padding: 6px 10px;
  }

  /* Mobile Data Tables - strictly bound to scroll container */
  .table-responsive,
  .squad-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid var(--border-color);
  }

  .table-responsive table.data-table,
  .squad-table-container table.data-table {
    min-width: 520px; /* Only the inner table scrolls horizontally, container stays 100% */
  }

  table.data-table th,
  table.data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Modals on Mobile & Mobile Bottom Sheet */
  #playerModal.modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  #playerModal .player-modal-card {
    width: 100%;
    max-width: 100vw;
    max-height: 86vh;
    border-radius: 22px 22px 0 0;
    margin: 0;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom)) 16px;
    border-bottom: none;
    border-left: none;
    border-right: none;
    box-shadow: 0 -8px 35px rgba(0, 0, 0, 0.75);
    animation: slideUpSheet 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
  }

  .bottom-sheet-handle {
    display: block;
    width: 44px;
    height: 5px;
    background: #475569;
    border-radius: 3px;
    margin: -6px auto 14px auto;
  }

  .modal-card {
    padding: 16px 14px;
    max-width: 95vw;
    max-height: 88vh;
    box-sizing: border-box;
  }

  .player-quick-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 13.5px;
    letter-spacing: 0;
  }

  .club-meta-pill {
    padding: 3px 8px;
    font-size: 11px;
  }

  .club-meta-divider,
  #clubTierMeta {
    display: none;
  }

  .pitch-board {
    height: 480px;
  }

  .pitch-player {
    width: 68px;
  }

  .player-badge-circle {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .player-card-name {
    max-width: 68px;
    font-size: 9.5px;
    padding: 1px 4px;
  }

  .player-card-rating {
    font-size: 9px;
    padding: 1px 4px;
    gap: 3px;
  }

  .cond-pill {
    font-size: 9.5px;
  }

  /* Eliminate accidental player modal popup on mobile touch */
  .pitch-node-inspect {
    display: none !important;
  }
}

@media (pointer: coarse) {
  /* On touchscreens, hide small corner badges to eliminate misclicks */
  .pitch-node-inspect {
    display: none !important;
  }
}

/* Feedback Floating Trigger & Modal */
.feedback-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 45;
  background: rgba(30, 41, 59, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(56, 189, 248, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.feedback-float-btn:hover {
  background: var(--accent-cyan);
  color: #0b1120;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.4);
}

@media (max-width: 768px) {
  .feedback-float-btn {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  }

  .feedback-float-btn .feedback-btn-label {
    display: none;
  }

  .feedback-float-btn .feedback-btn-icon {
    font-size: 18px;
    line-height: 1;
  }

  .feedback-float-btn:active {
    transform: scale(0.92);
    opacity: 1;
  }
}

.app-footer {
  text-align: center;
  padding: 24px 16px 48px 16px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0.6;
  font-family: var(--font-mono, "SF Mono", monospace);
}

/* ==========================================================================
   THE CONTINENTAL GAZETTE — BROADSHEET READER MODAL
   ========================================================================== */

.gazette-header-btn {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  font-weight: 800;
  cursor: pointer;
}

.gazette-header-btn:hover {
  background: rgba(245, 158, 11, 0.28);
  color: #fff;
}

.gazette-dash-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fef3c7;
  cursor: pointer;
}

.gazette-dash-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.45));
  color: #fff;
}

.gazette-modal-card {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  background: #0c121e;
  border: 1px solid #334155;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  padding: 20px 26px 22px 26px;
  color: #e2e8f0;
}

.gazette-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.25);
}

.gazette-tier-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gazette-switch-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.gazette-mode-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gazette-mode-btn:hover {
  color: #f8fafc;
  border-color: #64748b;
}

.gazette-mode-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fde68a;
}

.gazette-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 8px;
}

.gazette-masthead {
  text-align: center;
  border-top: 3px double #475569;
  border-bottom: 3px double #475569;
  padding: 12px 10px 14px 10px;
  margin-bottom: 18px;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.06), transparent 75%);
}

.gazette-masthead-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #f59e0b;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gazette-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #f8fafc;
  text-transform: uppercase;
}

.gazette-subtitle {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.gazette-columns {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: start;
}

.gazette-main-col {
  padding-right: 22px;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
}

.gazette-sidebar-col {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 10px;
  padding: 16px 18px;
}

.gazette-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gazette-headline-lg {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.gazette-subheading {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 14.5px;
  font-style: italic;
  color: #cbd5e1;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.gazette-byline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  margin-bottom: 12px;
  font-weight: 700;
}

.gazette-body-p {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 14.5px;
  line-height: 1.68;
  color: #e2e8f0;
  margin: 0 0 12px 0;
}

.gazette-headline-sm {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: #fef3c7;
  margin: 0 0 8px 0;
}

.gazette-bulletin-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 10px;
}

.gazette-bulletin-list li {
  font-size: 12.5px;
  line-height: 1.5;
  color: #cbd5e1;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.14);
}

.gazette-bulletin-list li:last-child {
  border-bottom: none;
}

.gazette-scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.gazette-score-chip {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gazette-score-chip.marquee {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
}

.gazette-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 2px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}

@media (max-width: 820px) {
  .gazette-columns {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .gazette-main-col {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    padding-bottom: 16px;
  }
  .gazette-title {
    font-size: 22px;
  }
  .gazette-scoreboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Clickable League Table Rows & Human Manager Pill */
.clickable-team-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.clickable-team-row:hover {
  background-color: rgba(56, 189, 248, 0.08) !important;
}

.human-mgr-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
  white-space: nowrap;
}

/* =========================================================================
   LIVE WORLD PULSE / PYRAMID WIRE CARD
   ========================================================================= */

.world-pulse-card {
  margin-bottom: 24px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, rgba(22, 33, 56, 0.78) 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.world-pulse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.world-pulse-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.world-pulse-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: wpPulseDot 2s infinite ease-in-out;
}

@keyframes wpPulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

.world-pulse-mgr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.world-pulse-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(7, 12, 24, 0.65);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.world-pulse-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.world-pulse-filter-btn:hover {
  color: var(--text-main);
}

.world-pulse-filter-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent-cyan);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.world-pulse-ticker-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(7, 12, 24, 0.92) 0%, rgba(15, 23, 42, 0.88) 100%);
  border: 1px solid rgba(56, 189, 248, 0.32);
  margin-bottom: 0;
  min-height: 46px;
}

.world-pulse-ticker-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.world-pulse-ticker-slide {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  animation: wpSlideFade 0.28s ease-out;
}

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

.world-pulse-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.world-pulse-headline-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
}

.world-pulse-inspect-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-left: auto;
  white-space: nowrap;
  opacity: 0.88;
}

.world-pulse-ticker-slide:hover .world-pulse-inspect-hint {
  opacity: 1;
  text-decoration: underline;
}

.world-pulse-ticker-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.world-pulse-ticker-counter {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 3px;
  font-variant-numeric: tabular-nums;
}

.world-pulse-nav-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(30, 41, 59, 0.75);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.world-pulse-nav-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.world-pulse-feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.world-pulse-feed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(11, 18, 33, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.world-pulse-feed-row.clickable {
  cursor: pointer;
}

.world-pulse-feed-row.clickable:hover {
  background: rgba(30, 45, 74, 0.72);
  border-color: rgba(56, 189, 248, 0.35);
}

.world-pulse-feed-row.wp-row-alert {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.42);
}

.world-pulse-feed-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.world-pulse-feed-icon {
  font-size: 16px;
  line-height: 1.3;
  flex-shrink: 0;
  margin-top: 1px;
}

.world-pulse-feed-body {
  min-width: 0;
  flex: 1;
}

.world-pulse-feed-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.world-pulse-feed-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.world-pulse-feed-detail {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.world-pulse-row-arrow {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  padding-left: 4px;
}

.world-pulse-feed-row.clickable:hover .world-pulse-row-arrow {
  color: var(--accent-cyan);
}

/* World Pulse Tag Pills */
.wp-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.wp-tag-human {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.wp-tag-alert {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.55);
}

.wp-tag-self {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.wp-tag-pyramid {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* --- World Pulse: fixed footprint so rotating headlines never resize the card --- */
.world-pulse-ticker-strip {
  height: 64px;
  min-height: 64px;
  box-sizing: border-box;
}

.world-pulse-ticker-main {
  height: 100%;
  display: flex;
  align-items: center;
}

.world-pulse-ticker-slide {
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

.world-pulse-ticker-slide .wp-tag {
  flex-shrink: 0;
}

.world-pulse-headline-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.world-pulse-inspect-hint {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .world-pulse-ticker-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    height: 104px;
    min-height: 104px;
    padding: 8px 12px;
  }
  .world-pulse-ticker-main {
    flex: 0 0 auto;
    height: 62px;
  }
  .world-pulse-headline-text {
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .world-pulse-inspect-hint {
    display: none; /* whole slide is tappable; hint wastes width on phones */
  }
  .world-pulse-ticker-nav {
    justify-content: flex-end;
  }
}

/* --- Condensed League Table --- */
table.league-table th,
table.league-table td {
  padding: 7px 8px;
  white-space: nowrap;
}

table.league-table .lt-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

table.league-table .lt-rank {
  width: 1%;
}

.lt-club-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.lt-club-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.lt-star,
.lt-human {
  flex-shrink: 0;
  font-size: 11px;
}

table.league-table .form-pill {
  width: 16px;
  height: 16px;
  line-height: 16px;
  margin-right: 2px;
}

@media (max-width: 768px) {
  .table-responsive table.league-table {
    min-width: 0;
  }
  table.league-table th,
  table.league-table td {
    padding: 6px 4px;
    font-size: 11.5px;
  }
  table.league-table th {
    font-size: 10px;
    letter-spacing: 0;
  }
  .lt-club-name {
    max-width: 28vw;
  }
}

@media (max-width: 480px) {
  /* Form becomes compact colour bars on phones */
  table.league-table .form-pill {
    width: 7px;
    height: 14px;
    border-radius: 2px;
    margin-right: 1.5px;
    font-size: 0;
    line-height: 0;
    vertical-align: middle;
  }
}

/* --- Condensed Squad Roster Table --- */
table.squad-roster-table th,
table.squad-roster-table td {
  padding: 6px 8px;
  white-space: nowrap;
}

table.squad-roster-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease, outline 0.15s ease;
}

table.squad-roster-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

table.squad-roster-table tr.injured-squad-row {
  background: rgba(239, 68, 68, 0.08);
  box-shadow: inset 3px 0 0 var(--accent-red);
}

table.squad-roster-table tr.selected-squad-row {
  background: rgba(245, 158, 11, 0.18) !important;
  outline: 1px solid var(--accent-amber);
  box-shadow: inset 3px 0 0 var(--accent-amber);
}

table.squad-roster-table tr.selected-squad-row .player-name-text {
  color: var(--accent-amber) !important;
}

table.squad-roster-table .st-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

table.squad-roster-table .st-center {
  text-align: center;
}

table.squad-roster-table .st-jersey {
  width: 1%;
  font-weight: 800;
  color: var(--accent-cyan);
}

.st-player-name {
  max-width: 240px;
  white-space: nowrap;
}

.st-player-name-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.st-player-name:hover .player-name-text {
  text-decoration: underline;
  color: var(--accent-cyan);
}

.player-name-text {
  color: #fff;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-stats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--accent-cyan);
  font-size: 10px;
  cursor: pointer;
  margin-left: 2px;
  vertical-align: middle;
  padding: 0;
  transition: all 0.15s ease;
}

.squad-stats-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  transform: scale(1.15);
}

.squad-pos-badge {
  position: static !important;
  font-size: 10px;
  padding: 1px 6px;
  line-height: 1.4;
  vertical-align: middle;
}

.squad-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 11px;
  vertical-align: middle;
}

.squad-badge-inj {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  font-weight: 800;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

.st-ovr {
  font-weight: 700;
  color: var(--accent-cyan);
}

.st-delta-up {
  color: var(--accent-green);
  font-size: 10px;
  font-weight: 700;
  margin-left: 3px;
}

.st-delta-down {
  color: var(--accent-amber);
  font-size: 10px;
  font-weight: 700;
  margin-left: 3px;
}

.st-cond {
  font-weight: 600;
}

.roster-status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.status-starter {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-bench {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-res {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-inj {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.6);
  font-weight: 800;
}

.squad-training-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.squad-training-pill:hover {
  background: rgba(255, 255, 255, 0.07);
}

.squad-workload-tag {
  font-size: 10px;
  margin-left: 2px;
}

.squad-retrain-tag {
  color: var(--accent-amber);
  font-size: 10px;
  font-weight: 700;
  margin-left: 3px;
}

/* --- Condensed Golden Boot Table --- */
.gb-name-text,
.gb-club-text {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.gb-club-text {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  table.squad-roster-table th,
  table.squad-roster-table td {
    padding: 5px 4px;
    font-size: 11.5px;
  }
  table.squad-roster-table th {
    font-size: 10px;
    letter-spacing: 0;
  }
  .st-player-name {
    max-width: 155px;
  }
  .squad-training-pill {
    font-size: 10px;
    padding: 1px 4px;
  }
  .gb-name-text {
    max-width: 34vw;
  }
  .gb-club-text {
    max-width: 28vw;
  }
}


