/* =========================================================
   BLACK SEA CUP — STYLES
   ========================================================= */

:root {
  --navy-deep: #001220;
  --pool-blue: #002a4a;
  --pool-blue-light: #0a4f6e;
  --aqua: #00d4ff;
  --gold: #f0a500;
  --white: #f0f0f0;

  --glass-bg: rgba(0, 42, 74, 0.45);
  --glass-border: rgba(0, 212, 255, 0.18);

  --font-head: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --nav-height: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy-deep);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  letter-spacing: 0.03em;
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.section {
  padding: 6rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-eyebrow {
  color: var(--aqua);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 2.5rem;
  color: var(--white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--aqua), #00a3c4);
  color: #001220;
  box-shadow: 0 0 0 rgba(0, 212, 255, 0);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -8px rgba(0, 212, 255, 0.6);
}

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

.btn-outline:hover {
  background: var(--gold);
  color: #1a1200;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -8px rgba(240, 165, 0, 0.5);
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(0, 18, 32, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.12);
  transition: background 0.3s var(--ease);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--white);
}

.nav-logo .wave-icon {
  font-size: 1.6rem;
  color: var(--aqua);
}

.nav-logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.nav-links a {
  position: relative;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--white);
  padding: 0.4rem 0.1rem;
  transition: color 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--aqua);
}

.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  padding: 0.5rem;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--gold);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--gold);
}

.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 16, 0.7);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.nav-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 78vw);
    background: linear-gradient(180deg, var(--pool-blue), var(--navy-deep));
    border-left: 1px solid rgba(0, 212, 255, 0.2);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 1000;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.3rem;
  }

  .hamburger {
    display: flex;
  }
}

/* =========================================================
   NEWS TICKER
   ========================================================= */

.ticker-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 999;
  height: 38px;
  background: var(--gold);
  color: #1a1200;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-label {
  flex-shrink: 0;
  background: #1a1200;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
}

.ticker-track-wrap {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 32s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 2.5rem;
  position: relative;
}

.ticker-track span::after {
  content: "•";
  position: absolute;
  right: -0.2rem;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

body {
  padding-top: calc(var(--nav-height) + 38px);
}

body.no-ticker {
  padding-top: var(--nav-height);
}

body.no-ticker .ticker-bar {
  display: none;
}

/* =========================================================
   HERO / POOL ATMOSPHERE
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--pool-blue) 55%, var(--pool-blue-light) 100%);
  padding: 6rem 1.5rem 4rem;
}

.page-hero {
  min-height: 62vh;
  padding-top: 7rem;
}

.hero-compact {
  min-height: 72vh;
}

.caustics {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.caustic-line {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.65), transparent);
  filter: blur(1px);
  animation: caustic-drift linear infinite;
}

@keyframes caustic-drift {
  0% {
    transform: translateX(-6%) scaleY(1) skewY(0deg);
    opacity: 0.2;
  }
  50% {
    transform: translateX(6%) scaleY(2.4) skewY(2deg);
    opacity: 0.65;
  }
  100% {
    transform: translateX(-6%) scaleY(1) skewY(0deg);
    opacity: 0.2;
  }
}

.pool-surface {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  overflow: hidden;
  z-index: 1;
}

.pool-surface svg {
  position: absolute;
  top: 0;
  width: 200%;
  height: 100%;
  animation: wave-scroll 14s linear infinite;
}

@keyframes wave-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.hero-eyebrow {
  color: var(--aqua);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
  animation: fade-in-up 1s var(--ease) both;
}

.hero-title {
  font-size: clamp(3.2rem, 11vw, 8rem);
  background: linear-gradient(100deg, var(--white) 20%, var(--aqua) 45%, var(--white) 60%, var(--gold) 80%, var(--white) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: water-shimmer 6s linear infinite, fade-in-up 1s var(--ease) both;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.35));
}

@keyframes water-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 500;
  color: var(--white);
  opacity: 0.9;
  margin-top: 0.8rem;
  animation: fade-in-up 1s 0.15s var(--ease) both;
}

.hero-meta {
  margin-top: 1.6rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--white);
  animation: fade-in-up 1s 0.25s var(--ease) both;
}

.hero-meta .pill {
  border: 1px solid rgba(0, 212, 255, 0.35);
  background: rgba(0, 42, 74, 0.5);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta .pill strong {
  color: var(--gold);
}

.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-in-up 1s 0.35s var(--ease) both;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-hero .hero-title {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
}

/* =========================================================
   STATS BAR
   ========================================================= */

.stats-bar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: -5rem auto 0;
  padding: 0 1.5rem;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 212, 255, 0.5);
}

.stat-number {
  font-family: var(--font-head);
  font-size: 3rem;
  color: var(--aqua);
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.5);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.75;
  margin-top: 0.4rem;
}

/* =========================================================
   LANE LINE DIVIDER
   ========================================================= */

.lane-divider {
  height: 26px;
  margin: 5rem 0 0;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px,
    var(--gold) 40px,
    transparent 40px,
    transparent 60px
  );
  opacity: 0.85;
  position: relative;
}

.lane-divider::before,
.lane-divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(240, 165, 0, 0.4);
}

.lane-divider::before {
  top: 0;
}

.lane-divider::after {
  bottom: 0;
}

/* =========================================================
   NEWS SECTION
   ========================================================= */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.news-card {
  position: relative;
  background: linear-gradient(160deg, rgba(0, 42, 74, 0.6), rgba(0, 18, 32, 0.8));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 14px;
  padding: 1.75rem;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.news-card.in-view {
  animation: card-fade-up 0.7s var(--ease) both;
}

@keyframes card-fade-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 20px 40px -20px rgba(0, 212, 255, 0.35);
}

.news-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.35), transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease), height 0.6s var(--ease);
  pointer-events: none;
}

.news-card:hover::before {
  width: 340px;
  height: 340px;
}

.news-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
  background: var(--aqua);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

.news-card h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-top: 0.9rem;
  color: var(--white);
  position: relative;
  z-index: 1;
}

.news-date {
  display: block;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.news-card p {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  color: var(--white);
  opacity: 0.75;
  position: relative;
  z-index: 1;
}

.news-read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--aqua);
  position: relative;
  z-index: 1;
}

/* News article modal */

.news-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.news-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.news-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 8, 16, 0.8);
  backdrop-filter: blur(6px);
}

.news-modal-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(0, 42, 74, 0.95), rgba(0, 18, 32, 0.98));
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 16px;
  padding: 2.5rem;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.news-modal.open .news-modal-content {
  transform: translateY(0) scale(1);
}

.news-modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 18, 32, 0.6);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.news-modal-close:hover {
  background: var(--aqua);
  color: var(--navy-deep);
}

.news-modal-content h2 {
  font-size: 2rem;
  margin: 1rem 2rem 0.5rem 0;
  color: var(--white);
}

.news-modal-content .news-date {
  color: var(--gold);
}

.news-modal-body {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-modal-body p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.9;
}

body.modal-open {
  overflow: hidden;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-admin-link {
  color: var(--aqua);
  opacity: 1;
  font-weight: 600;
}

.footer-admin-link:hover {
  color: var(--gold);
}

/* =========================================================
   SCROLL REVEAL (generic)
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   TEAMS PAGE
   ========================================================= */

.filter-bar {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(0, 42, 74, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.filter-btn:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1200;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
  perspective: 1600px;
}

.team-card {
  height: 340px;
  perspective: 1200px;
  opacity: 0;
  transform: translateY(-60px) rotateX(-25deg);
}

.team-card.in-view {
  animation: team-drop 0.8s var(--ease) both;
}

@keyframes team-drop {
  from {
    opacity: 0;
    transform: translateY(-60px) rotateX(-25deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.team-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s var(--ease);
  transform-style: preserve-3d;
}

.team-card:hover .team-card-inner,
.team-card.flipped .team-card-inner {
  transform: rotateY(180deg);
}

.team-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.team-card-front {
  background: linear-gradient(160deg, rgba(0, 42, 74, 0.7), rgba(0, 18, 32, 0.9));
  justify-content: center;
  gap: 0.6rem;
}

.team-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: #001220;
  margin-bottom: 0.4rem;
  box-shadow: 0 0 30px -6px rgba(0, 212, 255, 0.5);
}

.team-flag {
  font-size: 1.6rem;
}

.team-card-front h3 {
  font-size: 1.6rem;
  color: var(--white);
}

.team-founded {
  font-size: 0.8rem;
  color: var(--aqua);
  opacity: 0.85;
  letter-spacing: 0.05em;
}

.team-group-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.team-card-back {
  background: linear-gradient(160deg, rgba(240, 165, 0, 0.16), rgba(0, 18, 32, 0.95));
  transform: rotateY(180deg);
  justify-content: center;
  gap: 0.7rem;
}

.team-card-back h4 {
  font-size: 1.2rem;
  color: var(--gold);
}

.team-card-back p {
  font-size: 0.85rem;
  opacity: 0.85;
}

.team-titles {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--aqua);
}

.team-star {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
}

.team-star span {
  color: var(--gold);
}

/* =========================================================
   TOURNAMENT PAGE — TABS
   ========================================================= */

.tabs-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  flex-wrap: wrap;
}

.tab-btn {
  font-family: var(--font-head);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--white);
  opacity: 0.55;
  background: none;
  border: none;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  position: relative;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.tab-btn:hover {
  opacity: 0.9;
}

.tab-btn.active {
  opacity: 1;
  color: var(--gold);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -1px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tab-slide-in 0.45s var(--ease) both;
}

@keyframes tab-slide-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.phase-heading {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--aqua);
  letter-spacing: 0.05em;
  margin: 2.5rem 0 1.2rem;
}

.phase-heading:first-child {
  margin-top: 0;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.match-card {
  background: linear-gradient(160deg, rgba(0, 42, 74, 0.6), rgba(0, 18, 32, 0.85));
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 14px;
  padding: 1.5rem;
}

.match-round-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
  text-align: center;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.match-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.match-team .flag {
  font-size: 2rem;
}

.match-team .name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
}

.match-vs {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.8;
}

.match-meta {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(0, 212, 255, 0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  opacity: 0.75;
}

.countdown {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.countdown .unit {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  text-align: center;
  min-width: 54px;
}

.countdown .unit .num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--aqua);
  display: block;
}

.countdown .unit .label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Results */

.result-card .match-team.winner {
  position: relative;
}

.result-card .match-team.winner .score {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(240, 165, 0, 0.65);
}

.score {
  font-family: var(--font-head);
  font-size: 2.4rem;
  color: var(--white);
}

.result-stats {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  opacity: 0.7;
  gap: 1rem;
}

/* Standings */

.standings-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  margin-bottom: 2rem;
}

table.standings {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

table.standings th,
table.standings td {
  padding: 0.9rem 1rem;
  text-align: center;
  font-size: 0.88rem;
}

table.standings th {
  background: rgba(0, 18, 32, 0.9);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--aqua);
}

table.standings td:nth-child(2),
table.standings th:nth-child(2) {
  text-align: left;
}

table.standings tbody tr {
  background: rgba(0, 42, 74, 0.35);
  border-top: 1px solid rgba(0, 212, 255, 0.08);
  opacity: 0;
  transform: translateY(16px);
}

table.standings tbody tr.in-view {
  animation: row-fade-in 0.5s var(--ease) both;
}

@keyframes row-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

table.standings tbody tr.qualify {
  background: linear-gradient(90deg, rgba(240, 165, 0, 0.18), rgba(240, 165, 0, 0.05));
}

table.standings td.pos {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--gold);
}

td.team-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

td.pts {
  font-weight: 800;
  color: var(--aqua);
}

.group-label {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--gold);
  margin: 2rem 0 1rem;
}

.group-label:first-child {
  margin-top: 0;
}

/* Bracket */

.bracket-wrap {
  margin-top: 3rem;
  overflow-x: auto;
}

.bracket-wrap svg {
  min-width: 720px;
  width: 100%;
}

/* =========================================================
   MEDIA PAGE
   ========================================================= */

.add-stream-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 3.5rem;
}

.add-stream-form input {
  flex: 1;
  min-width: 200px;
  background: rgba(0, 18, 32, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.add-stream-form input:focus {
  outline: none;
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.streams-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 5rem;
}

.stream-card {
  background: linear-gradient(160deg, rgba(0, 42, 74, 0.6), rgba(0, 18, 32, 0.85));
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  opacity: 0;
  transform: translateY(30px);
}

.stream-card.in-view {
  animation: card-fade-up 0.6s var(--ease) both;
}

.stream-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 45px -18px rgba(0, 212, 255, 0.45);
}

.stream-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--pool-blue), var(--navy-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: rgba(0, 212, 255, 0.4);
}

.badge {
  position: absolute;
  top: 0.7rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-platform {
  left: 0.7rem;
  background: rgba(0, 18, 32, 0.85);
  color: var(--aqua);
  border: 1px solid rgba(0, 212, 255, 0.4);
}

.badge-live {
  right: 0.7rem;
  background: #ff3b3b;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.stream-body {
  padding: 1.2rem;
}

.stream-body h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

.watch-btn {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--aqua);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.watch-btn:hover {
  background: var(--aqua);
  color: var(--navy-deep);
}

/* Social masonry */

.social-grid {
  columns: 4 240px;
  column-gap: 1.5rem;
}

.social-post {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  background: linear-gradient(160deg, rgba(0, 42, 74, 0.6), rgba(0, 18, 32, 0.85));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.social-post.in-view {
  animation: card-fade-up 0.6s var(--ease) both;
}

.social-thumb {
  width: 100%;
  background: linear-gradient(135deg, var(--pool-blue-light), var(--pool-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.social-body {
  padding: 1rem 1.1rem;
}

.social-caption {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.6rem;
}

.social-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
}

/* Follow us */

.follow-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.follow-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(0, 42, 74, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.25);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.follow-icon:hover {
  animation: icon-pulse 0.9s ease-in-out infinite;
  border-color: var(--aqua);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

@keyframes icon-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

/* =========================================================
   ADMIN PANEL
   ========================================================= */

.admin-toolbar {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: transparent;
  border: 2px solid #ff5c5c;
  color: #ff5c5c;
}

.btn-danger:hover {
  background: #ff5c5c;
  color: #1a0000;
}

.admin-note {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.65;
  line-height: 1.6;
}

.admin-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.admin-section-head h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--aqua);
  letter-spacing: 0.03em;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2.5rem;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(0, 42, 74, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  flex-wrap: wrap;
}

.admin-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
}

.admin-row-info strong {
  font-size: 0.95rem;
  color: var(--white);
}

.admin-row-info span {
  opacity: 0.65;
}

.admin-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-row-actions button {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: transparent;
  color: var(--aqua);
  transition: all 0.2s var(--ease);
}

.admin-row-actions button:hover {
  background: var(--aqua);
  color: var(--navy-deep);
}

.admin-row-actions button.danger {
  border-color: rgba(255, 92, 92, 0.4);
  color: #ff8080;
}

.admin-row-actions button.danger:hover {
  background: #ff5c5c;
  color: #1a0000;
}

.admin-empty {
  padding: 1.5rem;
  text-align: center;
  opacity: 0.5;
  font-size: 0.85rem;
  border: 1px dashed rgba(0, 212, 255, 0.2);
  border-radius: 10px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 4rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aqua);
  opacity: 0.85;
}

.admin-field input[type="text"],
.admin-field input[type="number"],
.admin-field input[type="date"],
.admin-field input[type="url"],
.admin-field input[type="color"],
.admin-field select,
.admin-field textarea {
  background: rgba(0, 18, 32, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.admin-field textarea {
  resize: vertical;
  font-family: var(--font-body);
}

.admin-field input[type="color"] {
  padding: 0.3rem;
  height: 42px;
}

.admin-field-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.admin-field-checkbox input {
  width: 18px;
  height: 18px;
}

.admin-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.admin-form-title {
  grid-column: 1 / -1;
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.admin-standings-group {
  margin-bottom: 3rem;
}

.admin-standings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.admin-standings-table th,
.admin-standings-table td {
  padding: 0.6rem 0.5rem;
  text-align: center;
  font-size: 0.82rem;
}

.admin-standings-table th {
  color: var(--aqua);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-standings-table td:first-child {
  text-align: left;
  font-weight: 700;
}

.admin-standings-table input {
  width: 56px;
  text-align: center;
  background: rgba(0, 18, 32, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 6px;
  padding: 0.4rem;
  color: var(--white);
  font-family: var(--font-body);
}

.admin-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gold);
  color: #1a1200;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 3000;
}

.admin-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1080px) {
  .teams-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .streams-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
    margin-top: -3.5rem;
  }
}

@media (max-width: 860px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .teams-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .social-grid {
    columns: 3 200px;
  }
}

@media (max-width: 640px) {
  .stats-bar {
    grid-template-columns: 1fr;
    margin-top: -3rem;
  }

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

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

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

  .social-grid {
    columns: 2 160px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .match-teams {
    flex-direction: row;
  }

  .tab-btn {
    font-size: 1.05rem;
    padding: 0.8rem 1rem;
  }

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

  .admin-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
