* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0b1220;
  color: #e5e7eb;
}
.nav {
  display: flex;
  gap: 16px;
  padding: 14px 20px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
}
.nav a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}
.container {
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 14px;
}
.list {
  display: grid;
  gap: 10px;
}
.link-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.link-card:hover {
  border-color: #2563eb;
}
code {
  background: #1f2937;
  padding: 2px 6px;
  border-radius: 6px;
}
@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.bracket{
    display:flex;
    gap:12px;
    overflow-x:auto;
    padding-bottom:10px;
  }
  .round-col{
    min-width:280px;
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .match-card{
    background:#0f172a;
    border:1px solid #1f2937;
    border-radius:12px;
    padding:12px;
  }
  .btn{
    background:#2563eb;
    color:white;
    border:none;
    padding:8px 10px;
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
  }
  .btn:disabled{
    opacity:.5;
    cursor:not-allowed;
  }

/* ===== Tournament UI (Pro) ===== */
:root{
  --bg:#0b1220;
  --card:#0f172a;
  --card2:#0b1020;
  --line:#1f2937;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --blue:#2563eb;
  --green:#22c55e;
  --amber:#f59e0b;
  --red:#ef4444;
}

h2, h3 { letter-spacing: .2px; }

.tm-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.muted{
  color: var(--muted);
  font-weight:600;
}

.bracket{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding: 6px 2px 14px;
  scroll-snap-type: x mandatory;
}

.round-col{
  min-width: 320px;
  display:flex;
  flex-direction:column;
  gap:12px;
  scroll-snap-align: start;
}

.round-col h3{
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(37,99,235,.12), rgba(15,23,42,.35));
  border-radius: 14px;
  font-size: 15px;
}

.match-card{
  background: radial-gradient(1200px 400px at 20% 0%, rgba(37,99,235,.12), transparent 50%),
              linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .15s ease, border-color .15s ease;
}

.match-card:hover{
  transform: translateY(-2px);
  border-color: rgba(37,99,235,.35);
}

.match-card.active{
  border-color: rgba(37,99,235,.75);
  box-shadow: 0 0 0 1px rgba(37,99,235,.35), 0 12px 40px rgba(37,99,235,.12);
}

.match-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom: 10px;
}

.match-code{
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.badge{
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(17,24,39,0.75);
  letter-spacing: .3px;
}

.badge.active-badge{
  border-color: rgba(37,99,235,.7);
  background: rgba(37,99,235,.12);
}

.badge.ready{ border-color: rgba(245,158,11,.7); background: rgba(245,158,11,.12); }
.badge.live{ border-color: rgba(37,99,235,.7); background: rgba(37,99,235,.12); }
.badge.completed{ border-color: rgba(34,197,94,.7); background: rgba(34,197,94,.12); }

.team-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.team{
  font-weight: 900;
  font-size: 16px;
}

.right-meta{
  color: rgba(229,231,235,.85);
  font-weight: 800;
}

.vs{
  margin: 6px 0;
  color: rgba(148,163,184,.75);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.match-actions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
}

.btn{
  background: linear-gradient(180deg, rgba(37,99,235,1), rgba(29,78,216,1));
  color: white;
  border: none;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37,99,235,.22);
  transition: transform .12s ease, opacity .12s ease, filter .12s ease;
}

.btn:hover{ transform: translateY(-1px); }
.btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(20%);
  transform: none;
  box-shadow: none;
}

.btn-approve{
  padding: 8px 12px;
}

/* Responsive */
@media (max-width: 900px){
  .container{ max-width: 100%; }
  .round-col{ min-width: 280px; }
}