:root {
  --bg: #030303;
  --bg2: #090909;
  --panel: rgba(255,255,255,0.045);
  --panel2: rgba(255,255,255,0.025);
  --text: #ffffff;
  --muted: #cfcfcf;
  --muted-2: #aaaaaa;
  --line: rgba(212,175,55,0.18);
  --line-strong: rgba(212,175,55,0.30);
  --gold: #d4af37;
  --gold2: #f0d77a;
  --red: #e54848;
  --green: #35d07f;
  --shadow: 0 18px 50px rgba(0,0,0,0.34);
  --radius: 18px;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.14), transparent 36%),
    radial-gradient(circle at top right, rgba(240,215,122,0.08), transparent 32%),
    linear-gradient(180deg, #070707 0%, #030303 58%, #000000 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  border: 1px solid rgba(212,175,55,0.45);
  background: var(--gold);
  color: #080808;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

button:hover {
  filter: brightness(1.08);
}

button.danger {
  background: transparent;
  color: var(--gold2);
  border-color: rgba(212,175,55,0.55);
}

.feed-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.speed-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.speed-btn {
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1;
  background: transparent;
  color: var(--gold2);
  border-color: rgba(212,175,55,0.35);
}

.speed-btn.active {
  background: var(--gold);
  color: #080808;
  border-color: var(--gold);
}

.match-page {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 14px 80px;
  overflow-x: hidden;
}

.hero,
.panel {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
  overflow: hidden;
}

.hero {
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.15), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
}

.eyebrow {
  color: var(--gold2);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.team {
  min-width: 0;
  text-align: center;
}

.team h1 {
  margin: 10px 0 6px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.team p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.club-logo {
  width: 118px;
  height: 118px;
  object-fit: contain;
  display: none;
  margin: 0 auto;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,0.38));
}

.scorebox {
  min-height: 122px;
  border-radius: 20px;
  background: rgba(0,0,0,0.48);
  border: 1px solid rgba(212,175,55,0.32);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
}

.scorebox div {
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  color: var(--gold2);
}

.scorebox span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 8px;
  letter-spacing: 0.10em;
}

.scorebox.spoiler div {
  filter: blur(8px);
}

.match-meta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  margin-top: 18px;
}

.match-meta span {
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.035);
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.match-help {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}

.match-help code {
  color: var(--gold2);
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 8px;
  padding: 3px 6px;
}

.hidden {
  display: none;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel h3 {
  margin: 0 0 12px;
  color: var(--gold2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lineups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.lineups ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.lineups li {
  min-width: 0;
  background: rgba(0,0,0,0.34);
  border: 1px solid rgba(212,175,55,0.16);
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.lineups li span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lineups .pos {
  color: var(--gold2);
  font-weight: 900;
  flex: 0 0 auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-feed-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5,5,5,0.96);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 14px;
  padding: 10px;
  margin: -6px -6px 14px;
}

.sticky-feed-head h2 {
  margin: 0;
}

.progress-wrap {
  height: 10px;
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 18px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
}

.timeline {
  display: grid;
  gap: 10px;
}

.event {
  border: 1px solid rgba(212,175,55,0.16);
  border-radius: 14px;
  padding: 13px;
  background: rgba(0,0,0,0.34);
}

.event.goal {
  border-color: rgba(53,208,127,0.55);
  background: rgba(53,208,127,0.10);
}

.event.card {
  border-color: rgba(212,175,55,0.55);
  background: rgba(212,175,55,0.08);
}

.event.sub {
  border-color: rgba(90,160,255,0.45);
  background: rgba(90,160,255,0.08);
}

.event.marker {
  border-color: rgba(212,175,55,0.40);
  background: rgba(212,175,55,0.08);
}

.event-minute {
  color: var(--gold2);
  font-weight: 900;
  margin-bottom: 6px;
}

.event-text {
  color: rgba(255,255,255,0.88);
  white-space: pre-wrap;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.final-score {
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900;
  text-align: center;
  border: 1px solid rgba(212,175,55,0.30);
  background: rgba(0,0,0,0.50);
  color: var(--gold2);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.info-card {
  min-width: 0;
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(0,0,0,0.32);
}

.info-card p {
  margin: 8px 0;
  color: rgba(255,255,255,0.84);
  overflow-wrap: anywhere;
}

.stats-bars {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
}

.stat-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-num {
  font-weight: 900;
  text-align: center;
  color: var(--gold2);
}

.stat-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--homeWidth) var(--awayWidth);
}

.stat-home {
  background: var(--gold);
}

.stat-away {
  background: rgba(255,255,255,0.38);
}

.player-stats {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.player-stats table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
}

.player-stats th,
.player-stats td {
  border-bottom: 1px solid rgba(212,175,55,0.16);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

.player-stats th {
  color: var(--gold2);
  background: rgba(0,0,0,0.54);
}

pre {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-x: auto;
  background: rgba(0,0,0,0.50);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: var(--radius);
  padding: 16px;
  line-height: 1.45;
  color: rgba(255,255,255,0.88);
}

@media (max-width: 760px) {
  .teams {
    grid-template-columns: 1fr;
  }
    
      .feed-controls {
    width: 100%;
    justify-content: stretch;
  }

  .speed-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .speed-btn {
    width: 100%;
  }

  .scorebox {
    order: 3;
  }

  .lineups,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-feed-head {
    position: sticky;
    top: 0;
  }

  button {
    width: 100%;
  }

  .stat-row {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
  }
}