:root {
  --bg: #f4f8ff;
  --bg-2: #fff4cf;
  --ink: #12223a;
  --muted: #4f607a;
  --card: #ffffff;
  --accent: #1b51a5;
  --accent-2: #25abe2;
  --accent-3: #f8df5b;
  --danger: #b23a2c;
  --line: rgba(27, 81, 165, 0.12);
  --shadow: 0 18px 40px rgba(18, 34, 58, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(248, 223, 91, 0.35), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgba(37, 171, 226, 0.25), transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Bebas Neue", "Impact", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

p {
  margin: 0 0 12px 0;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  padding: 32px 0 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo .title {
  font-size: 42px;
}

.logo .subtitle {
  font-size: 16px;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  align-items: center;
  padding: 24px 0 36px;
}

.hero-card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-card .stat {
  font-size: 34px;
  font-family: "Bebas Neue", "Impact", sans-serif;
  color: var(--accent);
}

.section {
  padding: 24px 0 40px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 171, 226, 0.16);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-head {
  align-items: center;
  gap: 24px;
}

.calendar-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(37, 171, 226, 0.12), rgba(248, 223, 91, 0.35));
  border: 1px solid var(--line);
  box-shadow: 0 16px 30px rgba(18, 34, 58, 0.12);
  flex: 1 1 520px;
}

.calendar-brand h2,
.embed-brand h2 {
  margin-bottom: 6px;
}

#last-updated {
  margin: 4px 0 0;
  font-size: 13px;
}

.brand-logo {
  display: block;
  width: clamp(140px, 22vw, 220px);
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(18, 34, 58, 0.2));
}

.calendar-brand .brand-logo {
  width: clamp(160px, 24vw, 240px);
}

.calendar-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.embed-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(37, 171, 226, 0.12), rgba(248, 223, 91, 0.3));
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(18, 34, 58, 0.1);
  margin-bottom: 16px;
}

.embed-brand .brand-logo {
  width: clamp(120px, 22vw, 180px);
}

.embed-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-bar button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-bar button.active,
.filter-bar button:hover {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.day-block {
  margin-bottom: 28px;
}

.card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: 0 10px 25px rgba(18, 34, 58, 0.1);
}

.card h3 {
  font-size: 20px;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.match-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.match-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.match-item {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(27, 81, 165, 0.18);
  background: rgba(248, 223, 91, 0.16);
}

.match-teams {
  font-weight: 600;
  font-size: 15px;
}

.match-teams .vs {
  color: var(--muted);
  font-weight: 500;
  margin: 0 6px;
}

.score {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.match-note {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(27, 81, 165, 0.14);
  color: var(--accent);
}

.pill.live {
  background: rgba(37, 171, 226, 0.22);
  color: var(--accent-2);
}

.pill.final {
  background: rgba(248, 223, 91, 0.5);
  color: var(--accent);
}

.pill.postponed {
  background: rgba(248, 223, 91, 0.28);
  color: var(--accent);
  border: 1px dashed rgba(27, 81, 165, 0.35);
}

.pill.canceled {
  background: rgba(178, 58, 44, 0.18);
  color: var(--danger);
  border: 1px solid rgba(178, 58, 44, 0.35);
}

.table-wrap {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.standings-table th,
.standings-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(27, 81, 165, 0.15);
  text-align: right;
}

.standings-table th:first-child,
.standings-table td:first-child {
  text-align: left;
}

.standings-table thead {
  background: rgba(37, 171, 226, 0.18);
}

.notice {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(248, 223, 91, 0.3);
  border: 1px dashed rgba(27, 81, 165, 0.25);
  color: var(--ink);
  font-weight: 600;
}

.notice:empty {
  display: none;
}

.footer {
  padding: 40px 0 30px;
  color: var(--muted);
  font-size: 13px;
}

/* Admin */
.auth-panel {
  display: grid;
  gap: 12px;
  background: #fff;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.auth-panel input,
.auth-panel select,
.auth-panel button,
.admin-card input,
.admin-card select,
.admin-card button {
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(27, 81, 165, 0.2);
}

.admin-card {
  display: grid;
  gap: 10px;
}

.admin-card .score-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-card .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card button.primary {
  background: var(--accent-2);
  color: #fff;
  border: none;
}

.auth-panel button.primary {
  background: var(--accent-2);
  color: #fff;
  border: none;
}

.admin-card button.secondary {
  background: #fff;
}

.auth-panel button.secondary {
  background: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(37, 171, 226, 0.16);
  color: var(--accent);
}

/* Embed layout */
body.embed {
  background: var(--bg);
}

body.embed .site-header,
body.embed .hero,
body.embed .footer {
  display: none;
}

body.embed .section {
  padding: 16px 0;
}

@media (max-width: 920px) {
  .calendar-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-filters {
    align-items: flex-start;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .logo .title {
    font-size: 32px;
  }

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

  .calendar-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-brand .brand-logo {
    width: clamp(160px, 60vw, 220px);
  }

  .calendar-filters {
    align-items: flex-start;
    width: 100%;
  }

  .embed-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .embed-brand .brand-logo {
    width: clamp(150px, 55vw, 200px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeUp 0.6s ease both;
}
