:root {
  --navy: #003366;
  --gold: #c9a227;
  --light-bg: #f0f4f8;
  --card-bg: #ffffff;
  --border: #e0e6ed;
  --text: #222;
  --muted: #6c757d;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--light-bg);
  color: var(--text);
  margin: 0;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #001f3f 0%, #003366 50%, #0055aa 100%);
  color: white;
  padding: 40px 20px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-logos { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.hero-logos img { height: 60px; }
.hero h1 { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 800; margin: 0 0 6px; letter-spacing: -0.5px; }
.hero .subtitle { font-size: 0.95rem; opacity: 0.8; margin: 0 0 18px; }
.badge-date {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.rules-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  padding: 7px 14px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  margin-bottom: 0;
  transition: background 0.2s;
}
.rules-link:hover { background: rgba(255,255,255,0.1); }

/* ── Countdown ── */
.countdown-bar {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.countdown-unit { text-align: center; }
.countdown-unit .num { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--gold); }
.countdown-unit .lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }

/* ── Sticky Nav ── */
.tournament-nav {
  background: white;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.tournament-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0 8px;
  scrollbar-width: none;
}
.tournament-nav ul::-webkit-scrollbar { display: none; }
.tournament-nav a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #555;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px 14px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.tournament-nav a:hover { color: var(--navy); }
.tournament-nav a.active { color: var(--navy); border-bottom-color: var(--gold); }

/* Stacked icon + label on mobile — wraps to 2 rows, no horizontal scroll */
@media (max-width: 540px) {
  .tournament-nav ul { flex-wrap: wrap; overflow-x: hidden; }
  .tournament-nav a {
    flex: 1 0 30%;
    flex-direction: column;
    gap: 3px;
    padding: 7px 4px;
    font-size: 0.6rem;
    letter-spacing: 0;
    text-align: center;
    white-space: normal;
    border-bottom: 3px solid transparent;
    justify-content: center;
    align-items: center;
  }
  .tournament-nav a i { font-size: 1rem; }
  .tournament-nav a.active { color: var(--navy); border-bottom-color: var(--gold); }
}

/* ── Sponsor Banner ── */
.sponsor-banner { background: white; padding: 14px; text-align: center; border-bottom: 1px solid #eee; }
.sponsor-banner img { max-height: 80px; max-width: 100%; }

/* ── Content Wrap ── */
.content-wrap { max-width: 860px; margin: 28px auto 48px; padding: 0 16px; }

/* ── Card ── */
.card {
  background: var(--card-bg);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-header-bar {
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 18px 22px; }

/* ── Detail Rows ── */
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
}
.detail-row:last-child { border-bottom: none; }
.detail-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: #eef3f9;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
  font-size: 0.85rem;
}
.detail-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin-bottom: 2px; }
.detail-value { font-size: 0.92rem; font-weight: 600; }
.detail-value a { color: var(--navy); }
.detail-sub { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* ── Map link ── */
.map-link-box {
  display: flex; align-items: center; gap: 10px;
  background: #eef3f9; border-radius: 8px; padding: 10px 14px;
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.85rem;
  margin-top: 8px; transition: background 0.2s;
}
.map-link-box:hover { background: #dce8f5; color: var(--navy); }
.map-link-box i { font-size: 1.2rem; color: #e74c3c; }

/* ── Images ── */
.img-wrap { text-align: center; margin-top: 10px; }
.img-wrap img { max-width: 100%; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; }
.img-caption { font-size: 0.72rem; color: #999; margin-top: 5px; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  background: var(--navy); color: white;
  padding: 10px 12px; text-align: left; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #f7f9fc; }
.data-table tr:hover td { background: #eef3f9; }
.table-wrap { overflow-x: auto; }

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 5px; color: #333; }
.form-control {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid #ccd6e0; border-radius: 8px;
  font-size: 0.92rem; font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}
.form-control:focus { outline: none; border-color: var(--navy); }
.form-check { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--navy); }
.form-check label { font-size: 0.88rem; line-height: 1.4; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: 8px;
  font-family: inherit; font-weight: 700; font-size: 0.88rem;
  border: none; cursor: pointer; transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { opacity: 0.88; }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { opacity: 0.88; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: white; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ── Status badges ── */
.badge-pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 0.72rem; font-weight: 700;
}
.badge-open { background: #e8fff3; color: #0b6b3a; border: 1px solid #b7f0cf; }
.badge-closed { background: #fdeaea; color: #a61e22; border: 1px solid #f5c2c7; }

/* ── Admin gear button ── */
.admin-gear {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.admin-gear:hover { opacity: 1; transform: rotate(30deg); }

/* ── Loading ── */
.loading-msg { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.9rem; }
.skeleton { background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; height: 18px; margin: 8px 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
