/* ---------- Base ---------- */
:root {
  --navy: #0c1524;
  --navy-light: #16223a;
  --accent: #35d07f;
  --accent-dark: #23a862;
  --gold: #f4b93f;
  --red: #e5484d;
  --text: #1c2230;
  --muted: #6b7688;
  --border: #e3e7ee;
  --bg: #f5f7fb;
  --white: #ffffff;
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .3px;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 38px; width: auto; border-radius: 6px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.main-nav a {
  color: #cfd8e6;
  font-size: .93rem;
  font-weight: 600;
  white-space: nowrap;
}
.main-nav a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: #06251a !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800 !important;
}
.nav-cta:hover { background: var(--accent-dark); }

/* ---------- Alerts ---------- */
.alert {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
}
.alert-success { background: #e4f9ee; color: #157347; border: 1px solid #b7ecd0; }
.alert-error { background: #fdeaea; color: #b5262b; border: 1px solid #f7c6c8; }
.alert-info { background: #eaf2fd; color: #1a5fb4; border: 1px solid #c7dcf7; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-size: .95rem;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #06251a; }
.btn-primary:hover { background: var(--accent-dark); color: #06251a; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-light); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c93337; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* ---------- Hero Slider ---------- */
.hero-slider {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: var(--navy);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  display: flex;
  align-items: flex-end;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide .hero-caption {
  position: relative;
  z-index: 2;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  width: 100%;
  color: #fff;
}
.hero-empty {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  text-align: center;
  padding: 20px;
}
.hero-empty h1 { font-size: 2rem; }
.hero-dots {
  position: absolute;
  bottom: 12px;
  right: 20px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  border: none;
}
.hero-dot.active { background: #fff; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,.35);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

/* ---------- Sections / Cards ---------- */
.section { padding: 40px 0; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.team-card img.team-logo { width: 64px; height: 64px; object-fit: cover; margin: 0 auto 10px; border-radius: 50%; background: #eee; }
.team-card h4 { margin-bottom: 4px; }
.rank-badge {
  display: inline-block;
  background: var(--gold);
  color: #4a3600;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .8rem;
}

/* ---------- Tables ---------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data-table th, table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: .92rem;
}
table.data-table th { background: var(--navy); color: #fff; font-weight: 700; }
table.data-table td.team-cell { text-align: left; font-weight: 700; }
table.data-table tr:hover td { background: #f8fafc; }
.team-cell-inner { display: flex; align-items: center; gap: 10px; }
.team-cell-inner img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #eee; }
.team-crest-fallback {
  display: inline-block;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  text-align: center;
  flex-shrink: 0;
}
.pens-note { color: var(--muted); font-weight: 600; font-size: .82em; }

.fixture-card { margin-bottom: 10px; padding: 14px; }
.fixture-card-top { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; margin-bottom: 10px; }
.fixture-card-teams { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; font-weight: 700; text-align: center; }
.fixture-team { display: inline-flex; align-items: center; gap: 6px; }
.pos-badge {
  display: inline-block;
  width: 22px; height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: var(--border);
  font-weight: 700;
  font-size: .8rem;
}

/* ---------- Forms ---------- */
.form-card {
  max-width: 520px;
  margin: 40px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.form-wide { max-width: 780px; }
label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 100px; }
.field-hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--muted);
  padding: 4px;
}
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.repeater-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.repeater-row input { flex: 1; }
.remove-row-btn { background: var(--red); color: #fff; border: none; border-radius: 6px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.pill-pending { background: #fff3cd; color: #7a5b00; }
.pill-approved { background: #dff5e6; color: #157347; }
.pill-rejected { background: #fde2e2; color: #b5262b; }
.pill-banned { background: #2b2b2b; color: #fff; }

/* ---------- Sponsors ---------- */
.sponsor-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 20px 0;
}
.sponsor-strip img { max-height: 60px; width: auto; filter: grayscale(20%); }

/* ---------- Bracket ---------- */
.bracket {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  padding: 20px 0;
}
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; min-width: 220px; gap: 20px; }
.bracket-round h4 { text-align: center; color: var(--muted); }
.bracket-match {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: .88rem;
}
.bracket-team:last-child { border-bottom: none; }
.bracket-team img { width: 20px; height: 20px; border-radius: 50%; margin-right: 6px; object-fit: cover; }
.bracket-team-name { display: flex; align-items: center; }
.bracket-winner { background: #eafbf1; }

/* ---------- Announcement modal ---------- */
.announcement-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.announcement-modal {
  background: #fff; border-radius: var(--radius); padding: 30px;
  max-width: 460px; width: 90%; position: relative;
}
.announcement-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  font-size: 1.6rem; cursor: pointer; color: var(--muted);
}

/* ---------- Confirm modal ---------- */
.confirm-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.confirm-modal {
  background: #fff; border-radius: var(--radius); padding: 24px;
  max-width: 360px; width: 90%;
}
.confirm-modal p { font-weight: 600; margin: 0 0 18px; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b8c2d4; margin-top: 60px; padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: #b8c2d4; margin-right: 16px; }
.footer-nav a:hover { color: #fff; }

/* ---------- Misc ---------- */
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.badge-comp-league { background: #dbeafe; color: #1e40af; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.badge-comp-cup { background: #fde7c8; color: #92400e; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 14px;
  }
  .main-nav.open { display: flex; }
  .hero-slider, .hero-empty { height: 260px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  table.data-table th, table.data-table td { font-size: .8rem; padding: 8px 6px; }
}
