:root {
  --bg: #0b0d10;
  --card: #151921;
  --card-hover: #1c212e;
  --text: #f0f2f5;
  --muted: #9aa3b2;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --live: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  background: #111318;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #22262e;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

main {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.centered {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}

h2 {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  color: var(--text);
}

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

.match-card {
  background: var(--card);
  border: 1px solid #22262e;
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

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

.match-card .competition {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.team img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.team-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.vs {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
  padding: 0 0.5rem;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.85rem;
}

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

.live-badge, .has-streams {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.live-badge {
  background: rgba(239, 68, 68, 0.15);
  color: var(--live);
}

.has-streams {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.btn-back {
  background: transparent;
  color: var(--text);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.btn-back:hover {
  background: #1a1d23;
}

#detail-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.detail-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.detail-teams img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.detail-teams .vs {
  font-size: 1.2rem;
}

.competition-name {
  color: var(--muted);
  margin: 0.25rem 0;
}

.match-time {
  color: var(--muted);
  margin: 0 0 1rem;
}

.player {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid #22262e;
}

.stream-info {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: #111318;
  border-bottom: 1px solid #22262e;
  min-height: 2rem;
  display: flex;
  align-items: center;
}

video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
}

.stream-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stream-list h3 {
  width: 100%;
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.link-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.link-btn:hover {
  background: var(--accent-hover);
}

.no-streams {
  color: var(--muted);
  font-size: 0.95rem;
}
