:root {
  color-scheme: dark;
  --bg: #0a120b;
  --bg-soft: #0e1712;
  --panel: #111b13;
  --panel-2: #141f16;
  --panel-hover: #18261b;
  --line: rgba(243, 240, 231, 0.10);
  --line-strong: rgba(243, 240, 231, 0.20);
  --cream: #f3f0e7;
  --cream-dim: rgba(243, 240, 231, 0.62);
  --cream-faint: rgba(243, 240, 231, 0.36);
  --muted: #8a9488;
  --accent: #c2603a;
  --accent-bright: #e2793f;
  --accent-dim: rgba(194, 96, 58, 0.18);
  --pressure: #e2793f;
  --control: #f3f0e7;
  --state: #4edea3;
  --mono: "JetBrains Mono", monospace;
  --disp: "Space Grotesk", sans-serif;
  --body: "Inter", sans-serif;
}

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

html,
body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Background Texture & Glows */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vein {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 12% -6%, rgba(194, 96, 58, 0.12), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(194, 96, 58, 0.08), transparent 60%);
}

.chev {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
}

.chev.tr {
  top: 0;
  right: 0;
  width: 320px;
  height: 320px;
}

.chev.bl {
  bottom: 0;
  left: 0;
  width: 280px;
  height: 280px;
  transform: rotate(180deg);
}

/* App Nav Header */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px max(24px, calc((100vw - 1280px) / 2));
  background: rgba(10, 18, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.brand-lockup:hover {
  opacity: 0.85;
}

.brand-mark {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--cream);
}

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

.brand-tagline {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 14px;
}

/* Screen Tabs */
.screen-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.screen-tab {
  background: none;
  border: 1px solid var(--line);
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.screen-tab:hover {
  border-color: var(--line-strong);
  color: var(--cream);
  background: rgba(243, 240, 231, 0.04);
}

.screen-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* App Shell Layout */
.app-shell {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px 24px;
}

/* Topbar & Match Filter */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.topbar-header h1 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-top: 6px;
}

.topbar-header h1 em {
  font-style: normal;
  color: var(--accent-bright);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow .rule {
  height: 1px;
  width: 36px;
  background: var(--accent);
  display: inline-block;
}

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

.match-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  border-radius: 4px;
}

.match-picker label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

select {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

select:focus {
  border-color: var(--accent);
}

/* Demo Screens Switcher */
.demo-screen {
  display: none;
}

.demo-screen.active {
  display: block;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Score Strip */
.score-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.score-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
}

.score-card span {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}

.score-card strong {
  font-family: var(--disp);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  margin-top: 8px;
  display: block;
  line-height: 1.2;
}

.score-card strong.accent {
  color: var(--accent-bright);
}

/* Dashboard Grid & Panels */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  position: relative;
}

.panel.wide {
  grid-column: span 2;
}

.panel.full {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.panel-header h2 {
  font-family: var(--disp);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream);
  margin-top: 4px;
}

.legend {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.legend i {
  display: inline-block;
  width: 12px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.legend .pressure {
  background: var(--accent-bright);
}

.legend .control {
  background: var(--cream);
}

/* SVG Match State Chart Visualizer */
.visual-chart-wrap {
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: hidden;
}

.chart-svg .gridline {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-svg .axis {
  fill: var(--muted);
  font: 500 10px var(--mono);
  letter-spacing: 1px;
}

.chart-svg .event-line {
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-svg .event-label {
  fill: var(--cream-dim);
  font: 500 10px var(--mono);
  letter-spacing: 0.5px;
}

.chart-svg .event-dot {
  fill: var(--accent-bright);
  stroke: var(--panel);
  stroke-width: 3;
}

/* Tooltip for Scrubber */
.chart-tooltip {
  position: absolute;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cream);
  pointer-events: none;
  z-index: 50;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-width: 280px;
}

.chart-tooltip strong {
  color: var(--accent-bright);
  font-family: var(--disp);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 4px;
}

.timeline-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: stretch;
  min-width: 0;
}

.timeline-detail-card {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 16px;
  font-size: 0.82rem;
  color: var(--cream-dim);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline-detail-card strong {
  font-family: var(--disp);
  font-size: 1.05rem;
  color: var(--cream);
}

/* Wagon Wheel / Shot Map */
.shotmap-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: center;
}

.shotmap-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 440px;
  margin: 0 auto;
}

.shotmap-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.shotmap-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shotmap-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-dim);
}

.shot-detail-card {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 14px;
  font-size: 0.82rem;
  color: var(--cream-dim);
  line-height: 1.5;
}

.shot-detail-card strong {
  font-family: var(--disp);
  font-size: 1rem;
  color: var(--cream);
  display: block;
  margin-bottom: 4px;
}

/* Radar Profile Cards */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.radar-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.radar-card span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.radar-card canvas {
  width: 100% !important;
  height: 280px !important;
}

/* Player Impact Table */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

th {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
}

td.num,
th.num {
  text-align: right;
  font-family: var(--mono);
}

.player-name-cell {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cream);
}

.impact-score {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-bright);
}

.rating-bar-wrap {
  width: 100px;
  height: 4px;
  background: var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.rating-bar-fill {
  height: 100%;
  background: var(--accent);
}

/* Weights Adjuster Grid */
.weights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.weight-control {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.weight-control label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cream);
  margin-bottom: 10px;
}

.weight-control label span {
  color: var(--accent-bright);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.ghost-button:hover {
  border-color: var(--cream);
  color: var(--cream);
}

/* Clean Audit Grid & Logic Flow */
.audit-grid,
.logic-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.audit-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}

.audit-card .sk {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.audit-card strong {
  font-family: var(--disp);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-bright);
  display: block;
  margin: 6px 0;
}

.audit-card p {
  font-size: 0.82rem;
  color: var(--cream-dim);
  line-height: 1.45;
}

/* Step Buttons */
.steps {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.step-btn {
  flex: 1;
  text-align: left;
  background: var(--panel-2);
  border: none;
  border-right: 1px solid var(--line);
  color: var(--cream-dim);
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.step-btn:last-child {
  border-right: none;
}

.step-btn .sk {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.step-btn h4 {
  font-family: var(--disp);
  font-size: 1.05rem;
  color: var(--cream);
  margin-top: 6px;
}

.step-btn.active {
  background: var(--accent-dim);
}

.step-btn.active .sk {
  color: var(--accent-bright);
}

.step-panel {
  margin-top: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 20px;
  color: var(--cream-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Pitch Deck Story - Vision Pillars & Gaps */
.pillars,
.problem-grid,
.bm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar {
  border-top: 2px solid var(--accent);
  padding-top: 16px;
}

.pillar h4 {
  font-family: var(--disp);
  font-size: 1.15rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.pillar p {
  color: var(--cream-dim);
  font-size: 0.88rem;
  line-height: 1.55;
}

.problem-card .k,
.bm-card .n {
  font-family: var(--mono);
  color: var(--accent-bright);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.problem-card h4,
.bm-card h4 {
  font-family: var(--disp);
  font-size: 1.15rem;
  margin: 8px 0 6px;
  color: var(--cream);
}

.problem-card p,
.bm-card p {
  font-size: 0.86rem;
  color: var(--cream-dim);
  line-height: 1.5;
}

/* TAM / SAM / SOM Market Visualizer */
.opp-wrap {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.opp-svg {
  width: 320px;
  height: 320px;
  flex-shrink: 0;
}

.market-ring {
  fill: none;
  stroke-width: 1.8;
  cursor: pointer;
  transition: all 0.3s ease;
}

.market-ring:hover,
.market-ring.active {
  stroke-width: 4;
}

.market-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.market-tabs button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--cream-dim);
  border-radius: 3px;
  padding: 8px 12px;
  cursor: pointer;
  font: 500 0.68rem var(--mono);
  letter-spacing: 0.08em;
  transition: 0.2s;
}

.market-tabs button.active,
.market-tabs button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.market-detail {
  color: var(--cream-dim);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

.market-detail strong {
  color: var(--cream);
  font-family: var(--disp);
  font-size: 1.1rem;
}

/* Investment Ask Calculator */
.ask-card {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel-2);
}

.ask-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.ask-row span {
  font-family: var(--disp);
  font-size: 1.6rem;
  color: var(--cream-dim);
}

#askAmt {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--accent-bright);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--accent);
  width: 2.4ch;
  outline: none;
}

.funds {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fund-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fund-row label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cream-dim);
  width: 150px;
  flex-shrink: 0;
}

.fund-row .pct {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent-bright);
  width: 42px;
  text-align: right;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {

  .dashboard-grid,
  .score-strip,
  .pillars,
  .problem-grid,
  .bm-grid,
  .weights-grid,
  .audit-grid,
  .logic-flow {
    grid-template-columns: 1fr;
  }

  .panel.wide,
  .panel.full {
    grid-column: span 1;
  }

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

  .timeline-container,
  .shotmap-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .screen-tabs {
    overflow-x: auto;
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .steps {
    flex-direction: column;
  }

  .step-btn {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .opp-wrap {
    flex-direction: column;
  }
}

/* Team Badges & Ratings Filter Tabs */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aus-badge {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.afg-badge {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.scorecard-wrap {
  padding: 16px;
  background: var(--panel-2);
  border-radius: 8px;
  border: 1px solid var(--line);
}


#ratingsTeamTabs .filter-btn {
  font-size: 0.72rem;
  padding: 6px 14px;
}

/* Player Avatars & Fallbacks */
.player-avatar-container {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.player-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.player-avatar-fallback.aus-avatar {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.player-avatar-fallback.afg-avatar {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.player-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Venue & Pitch Intelligence Panel */
.pitch-panel {
  background: linear-gradient(135deg, rgba(17, 27, 19, 0.95), rgba(20, 31, 22, 0.95));
  border: 1px solid var(--line-strong);
}

.pitch-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pitch-badge.red-soil {
  background: rgba(194, 96, 58, 0.2);
  color: var(--accent-bright);
  border: 1px solid rgba(226, 121, 63, 0.4);
}

.pitch-contest-tag {
  text-align: right;
  font-family: var(--mono);
}

.pitch-contest-tag span {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
}

.pitch-contest-tag strong {
  font-size: 1.1rem;
  color: #f59e0b;
}

.pitch-intelligence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}

@media (max-width: 840px) {
  .pitch-intelligence-grid {
    grid-template-columns: 1fr;
  }
}

.pitch-ratings-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.pitch-metric-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pitch-metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--cream);
}

.pitch-metric-label span {
  font-weight: 500;
}

.pitch-metric-label strong {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cream-dim);
}

.pitch-bar-track {
  width: 100%;
  height: 7px;
  background: rgba(243, 240, 231, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.pitch-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.pitch-bar-fill.pace {
  background: linear-gradient(90deg, #c2603a, #e2793f);
}

.pitch-bar-fill.batting {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.pitch-bar-fill.spin {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.pitch-bar-fill.contest {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.pitch-dynamics-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pitch-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pitch-pill {
  font-size: 0.75rem;
  background: rgba(243, 240, 231, 0.06);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--cream-dim);
}

.pitch-pill.highlight {
  border-color: rgba(226, 121, 63, 0.4);
  background: rgba(194, 96, 58, 0.12);
  color: var(--cream);
}

.pitch-pill strong {
  color: var(--cream);
  margin-right: 2px;
}

.pitch-readout-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

/* IPL Team Badges & Colors */
.team-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.team-badge.RR { background: rgba(255, 64, 129, 0.18); border: 1px solid #ff4081; color: #ff80ab; }
.team-badge.RCB { background: rgba(229, 57, 53, 0.18); border: 1px solid #e53935; color: #ff8a80; }
.team-badge.GT { background: rgba(0, 188, 212, 0.18); border: 1px solid #00bcd4; color: #80deea; }
.team-badge.DC { background: rgba(30, 136, 229, 0.18); border: 1px solid #1e88e5; color: #90caf9; }
.team-badge.SRH, .team-badge.SH { background: rgba(255, 109, 0, 0.18); border: 1px solid #ff6d00; color: #ffb74d; }
.team-badge.PBKS, .team-badge.PK { background: rgba(213, 0, 0, 0.18); border: 1px solid #d50000; color: #ff8a80; }
.team-badge.CSK { background: rgba(251, 192, 45, 0.18); border: 1px solid #fbc02d; color: #fff59d; }
.team-badge.MI { background: rgba(25, 118, 210, 0.18); border: 1px solid #1976d2; color: #64b5f6; }
.team-badge.KKR { background: rgba(171, 71, 188, 0.18); border: 1px solid #ab47bc; color: #e1bee7; }
.team-badge.LSG { background: rgba(0, 172, 193, 0.18); border: 1px solid #00acc1; color: #80deea; }

/* Hero Banner & Season Stats */
.hero-banner {
  background: linear-gradient(135deg, rgba(20, 31, 22, 0.95), rgba(10, 18, 11, 0.98));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 36px 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(226, 121, 63, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-desc {
  color: var(--cream-dim);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 720px;
  margin-top: 12px;
}

.season-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  background: rgba(243, 240, 231, 0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.25s ease;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: rgba(243, 240, 231, 0.05);
}

.stat-card label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.stat-card strong {
  font-family: var(--disp);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  display: block;
}

.stat-card span {
  font-size: 0.78rem;
  color: var(--accent-bright);
  margin-top: 4px;
  display: block;
}

/* Top Performers Wall */
.top-performers-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .top-performers-wall {
    grid-template-columns: 1fr;
  }
}

.performer-card {
  background: linear-gradient(180deg, rgba(24, 38, 27, 0.8), rgba(17, 27, 19, 0.95));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.performer-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(226, 121, 63, 0.15);
}

.performer-card.rank-1 {
  border-color: rgba(255, 215, 0, 0.6);
  background: linear-gradient(180deg, rgba(45, 38, 12, 0.85), rgba(17, 27, 19, 0.95));
}
.performer-card.rank-2 {
  border-color: rgba(192, 192, 192, 0.6);
}
.performer-card.rank-3 {
  border-color: rgba(205, 127, 50, 0.6);
}

.rank-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.1rem;
}

.performer-card.rank-1 .rank-badge {
  background: rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
  color: #ffd700;
}

.performer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.performer-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
}

.performer-avatar-fallback {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--disp);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cream);
}

.performer-title h3 {
  font-family: var(--disp);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
}

.performer-badge-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(226, 121, 63, 0.15);
  color: var(--accent-bright);
  margin-top: 6px;
  text-transform: uppercase;
}

.performer-rating-box {
  margin: 16px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.performer-rating-box .rating-num {
  font-family: var(--disp);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.performer-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.performer-stats-row .stat-col label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
}

.performer-stats-row .stat-col val {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
}

/* Match Quick Access Grid */
.match-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.match-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.match-card:hover {
  border-color: var(--accent);
  background: var(--panel-hover);
  transform: translateY(-2px);
}

.match-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.match-card-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

.match-card-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 1.05rem;
}

.match-card-score {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.match-card-winner {
  font-size: 0.75rem;
  color: var(--cream-dim);
  margin-top: 6px;
}

/* Custom Select & Picker controls */
.custom-select {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.custom-select:focus {
  outline: none;
  border-color: var(--accent);
}

.match-picker-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.picker-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.picker-group label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
}

.picker-buttons {
  display: flex;
  gap: 6px;
}

/* Over Progression Toolbar & Inspector Layout */
.over-filters-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.over-filters-toolbar .filter-btn {
  text-align: center;
  white-space: nowrap;
  padding: 6px 14px;
}

.over-inspector-panel {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 220px 220px 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 840px) {
  .over-inspector-panel {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ==========================================================================
   MATCH REPOSITORY STYLING (PAGE 2 TEMPLATE DESIGN)
   ========================================================================== */

.match-repo-wrapper {
  margin-bottom: 30px;
}

.repo-header-strip {
  margin-bottom: 20px;
}

.repo-title {
  font-family: var(--disp);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cream);
  margin-top: 4px;
}

.repo-subtitle {
  font-size: 0.85rem;
  color: var(--cream-dim);
}

.repo-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.repo-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.repo-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.repo-pill:hover,
.repo-pill.active {
  background: var(--accent-bright);
  color: #000;
  border-color: var(--accent-bright);
  font-weight: 700;
}

.repo-team-sorter {
  display: flex;
  align-items: center;
}

.match-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.match-card-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.match-card-item:hover {
  border-color: var(--accent-bright);
  transform: translateY(-2px);
  background: var(--panel-hover);
}

.mc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.mc-stage {
  font-weight: 700;
  color: var(--cream-dim);
  text-transform: uppercase;
}

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

.mc-teams-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.mc-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.mc-team-row.winner-row {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--accent-bright);
}

.mc-team-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-team-name {
  font-family: var(--disp);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cream);
}

.mc-team-score {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
}

.mc-team-row.winner-row .mc-team-score {
  color: var(--accent-bright);
}

.mc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cream-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.mc-arrow {
  color: var(--accent-bright);
  font-weight: 700;
}

/* Top 3 Performers Cards Layout */
.top-performers-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}