@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: #1a1a3e;
  --bg-card-hover: #222255;
  --gold: #f0a500;
  --gold-light: #ffd060;
  --red: #e74c3c;
  --red-dark: #c0392b;
  --green: #2ecc71;
  --blue: #3498db;
  --text: #f0f0f0;
  --text-muted: #8888aa;
  --border: #2a2a5a;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(240,165,0,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(231,76,60,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(10,10,26,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0 2rem;
}

nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

nav .nav-logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav .nav-logo .cup-icon { font-size: 1.4rem; }

nav .nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--gold);
  background: rgba(240,165,0,0.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* ===== MAIN LAYOUT ===== */
main {
  position: relative;
  z-index: 1;
  padding-top: 64px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ===== HERO / HOMEPAGE ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 64px);
  padding: 2rem;
}

.hero-video-wrapper {
  position: relative;
  width: 420px;
  max-width: 90vw;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 0 60px rgba(240,165,0,0.3), 0 0 120px rgba(240,165,0,0.1);
  animation: pulse-glow 3s ease-in-out infinite;
  border: 3px solid var(--gold);
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hero-video-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gold), var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.hero-play-btn {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: var(--radius);
}

.hero-play-btn:hover {
  background: rgba(0,0,0,0.3);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 60px rgba(240,165,0,0.3), 0 0 120px rgba(240,165,0,0.1); }
  50% { box-shadow: 0 0 80px rgba(240,165,0,0.5), 0 0 160px rgba(240,165,0,0.2); }
}

@keyframes rotate-border {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: 4rem;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 300;
}

/* ===== COUNTDOWN ===== */
.countdown-section {
  margin-top: 1rem;
}

.countdown-label {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 1.5rem;
}

.countdown {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  min-width: 110px;
  text-align: center;
  box-shadow: var(--shadow);
}

.countdown-item .number {
  font-family: 'Bebas Neue', cursive;
  font-size: 3.5rem;
  color: var(--gold);
  line-height: 1;
}

.countdown-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

/* ===== INFO CARDS ===== */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.info-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.info-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.info-card h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.info-card p {
  color: rgba(240,240,240,0.85);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== PAGE HEADERS ===== */
.page-header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.page-header h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: 3rem;
  letter-spacing: 3px;
  color: var(--gold);
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.card h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

/* ===== TOURNAMENT BRACKET ===== */
.bracket-container {
  overflow-x: auto;
  padding: 2rem 0;
}

.bracket {
  display: flex;
  gap: 3rem;
  min-width: max-content;
  align-items: center;
  padding: 1rem;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 240px;
}

.bracket-round-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  color: var(--gold);
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.match-card:hover {
  border-color: var(--gold);
}

.match-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.match-team:first-child {
  border-bottom: 1px solid var(--border);
}

.match-team.winner {
  background: rgba(46,204,113,0.1);
}

.match-team .team-name {
  font-weight: 500;
  flex: 1;
}

.match-team .team-name.tbd {
  color: var(--text-muted);
  font-style: italic;
}

.cups-display {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--red);
  font-weight: 600;
}

.cups-display .cup-icon-sm {
  font-size: 0.85rem;
}

/* ===== GROUP TABLES ===== */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.group-card .group-header {
  background: linear-gradient(135deg, rgba(240,165,0,0.2), rgba(231,76,60,0.1));
  padding: 1rem;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--gold);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.group-card .group-teams {
  padding: 0.5rem;
}

.group-team-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  gap: 0.75rem;
}

.group-team-row:hover {
  background: rgba(240,165,0,0.05);
}

.group-team-row .rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.group-team-row .team-info {
  flex: 1;
}

.group-team-row .team-info .name {
  font-weight: 500;
}

.group-team-row .team-info .members {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== TEAMS OVERVIEW ===== */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.2s;
}

.team-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.team-card .team-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.team-card h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 1px;
}

.team-card .group-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(240,165,0,0.15);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.team-card .member-list {
  list-style: none;
  margin-top: 0.75rem;
}

.team-card .member-list li {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.2rem 0;
}

/* ===== RULES PAGE ===== */
.rules-content {
  max-width: 800px;
  margin: 0 auto;
}

.rule-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.rule-section h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rule-section h2 .rule-icon {
  font-size: 1.5rem;
}

.rule-section ul, .rule-section ol {
  padding-left: 1.5rem;
  color: var(--text);
}

.rule-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.rule-section p {
  line-height: 1.7;
  color: rgba(240,240,240,0.85);
}

.rule-highlight {
  background: rgba(240,165,0,0.1);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
  font-size: 0.95rem;
}

/* ===== FORM STYLES ===== */
.form-container {
  max-width: 560px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  font-style: italic;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}

.info-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow);
}

.info-tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
  z-index: 11;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,165,0,0.15);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group .required-star {
  color: var(--red);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex-shrink: 0;
  cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #d4920a);
  color: #000;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(240,165,0,0.3);
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-danger:hover {
  background: var(--red-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== ALERTS ===== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
}

.alert.show { display: block; }

.alert-success {
  background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.3);
  color: var(--green);
}

.alert-error {
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.3);
  color: var(--red);
}

/* ===== ADMIN ===== */
.admin-login {
  max-width: 400px;
  margin: 4rem auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 180px);
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  height: fit-content;
  position: sticky;
  top: 84px;
}

.admin-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.admin-sidebar .sidebar-link:hover,
.admin-sidebar .sidebar-link.active {
  background: rgba(240,165,0,0.1);
  color: var(--gold);
}

.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.admin-panel h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(42,42,90,0.5);
  font-size: 0.9rem;
}

.admin-table tr:hover td {
  background: rgba(240,165,0,0.03);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

.modal h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.modal-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10,10,26,0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  nav .nav-links.open { display: flex; }

  .hero h1 { font-size: 2.5rem; }
  .hero .subtitle { font-size: 1rem; }
  .hero-video-wrapper { width: 320px; }
  .hero-video-fallback { font-size: 3.5rem; }

  .countdown { gap: 0.75rem; }
  .countdown-item { padding: 1rem 1.25rem; min-width: 80px; }
  .countdown-item .number { font-size: 2.5rem; }

  .page-header h1 { font-size: 2rem; }

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

  .admin-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 0.25rem;
  }

  .bracket { gap: 1.5rem; }
  .bracket-round { min-width: 200px; }

  .form-card { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 1rem; }
  .hero h1 { font-size: 2rem; }
  .countdown-item .number { font-size: 2rem; }
  .countdown-item .label { font-size: 0.65rem; }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

.section-divider {
  text-align: center;
  margin: 3rem 0 2rem;
}

.section-divider h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 2px;
}

.section-divider p {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ===== PHASE TABS ===== */
.phase-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  margin-bottom: 1.5rem;
}

.phase-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.phase-tab:hover { color: var(--text); background: rgba(240,165,0,0.05); }
.phase-tab.active { background: rgba(240,165,0,0.15); color: var(--gold); }

/* ===== GROUP PILLS ===== */
.group-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.group-pill {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: 'Bebas Neue', cursive;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.group-pill:hover { border-color: var(--gold); color: var(--gold); }
.group-pill.active { background: var(--gold); color: #000; border-color: var(--gold); }

/* ===== GROUP ACCORDION ===== */
.group-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.group-accordion:hover { border-color: rgba(240,165,0,0.3); }

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  gap: 1rem;
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.accordion-group-badge {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(240,165,0,0.2), rgba(231,76,60,0.1));
  color: var(--gold);
  font-family: 'Bebas Neue', cursive;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.accordion-teams-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accordion-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.accordion-progress {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.accordion-chevron {
  color: var(--text-muted);
  transition: transform 0.3s;
  font-size: 1.1rem;
}

.group-accordion.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.group-accordion.open .accordion-body {
  max-height: 2000px;
}

.group-standings {
  padding: 0 1.25rem;
}

/* ===== STANDINGS TABLE ===== */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.standings-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

.standings-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(42,42,90,0.3);
}

.standings-table tr.rank-gold td {
  background: rgba(255,215,0,0.1);
}
.standings-table tr.rank-gold td:first-child .rank-num {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000;
}

.standings-table tr.rank-silver td {
  background: rgba(192,192,192,0.08);
}
.standings-table tr.rank-silver td:first-child .rank-num {
  background: linear-gradient(135deg, #c0c0c0, #808080);
  color: #000;
}

.standings-table tr.rank-bronze td {
  background: rgba(205,127,50,0.08);
}
.standings-table tr.rank-bronze td:first-child .rank-num {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  color: #fff;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.team-name-cell { font-weight: 500; }

/* ===== GROUP MATCH ROWS ===== */
.group-matches-list {
  padding: 1rem 1.25rem 1.25rem;
}

.group-matches-list h4 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.group-match-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  background: var(--bg-secondary);
  gap: 0.5rem;
}

.group-match-row.finished { opacity: 0.8; }

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

.gm-team:last-child {
  flex-direction: row-reverse;
  text-align: right;
}

.gm-name { font-weight: 500; }
.gm-team.winner .gm-name { color: var(--green); }

.gm-cups {
  font-size: 0.75rem;
  color: var(--red);
  font-weight: 600;
  white-space: nowrap;
}

.gm-vs {
  width: 36px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.gm-vs:has(+ .finished), .group-match-row.finished .gm-vs {
  color: var(--green);
}

/* ===== K.O. PHASE ===== */
.ko-info {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bracket-horizontal {
  overflow-x: auto;
  padding: 1rem 0;
}

.bracket-vertical { display: none; }

.ko-round-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.ko-round-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(240,165,0,0.08), rgba(231,76,60,0.04));
}

.ko-round-header h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: var(--gold);
  flex: 1;
}

.ko-round-icon { font-size: 1.2rem; }

.ko-match-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

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

.ko-match-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ko-match-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
}

.ko-match-team.winner {
  background: rgba(46,204,113,0.08);
}

.ko-team-name { font-weight: 500; }
.ko-team-name.tbd { color: var(--text-muted); font-style: italic; }

.ko-cups {
  font-size: 0.8rem;
  color: var(--red);
  font-weight: 600;
}

.ko-match-divider {
  height: 1px;
  background: var(--border);
}

/* ===== MOBILE RESPONSIVE FOR TURNIER ===== */
@media (max-width: 900px) {
  .bracket-horizontal { display: none; }
  .bracket-vertical { display: block; }

  .accordion-teams-preview { display: none; }

  .phase-tab { font-size: 0.8rem; padding: 0.6rem 0.5rem; }
}

@media (max-width: 480px) {
  .ko-matches-grid {
    grid-template-columns: 1fr;
  }

  .group-match-row {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .gm-team, .gm-team:last-child {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    text-align: left;
  }

  .gm-vs {
    width: 100%;
    font-size: 0.6rem;
    padding: 0.1rem 0;
  }

  .hide-mobile { display: none; }
}
