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

:root {
  /* Official Team Colors */
  --team-blue: #0038A8;
  --team-red: #CE1126;
  --team-white: #FFFFFF;

  /* Dark Mode Surface Colors */
  --bg-color: #0B1120;
  /* Very dark slate for main background */
  --surface: #1E293B;
  /* Slate 800 - Cards/Nav */
  --surface-hover: #334155;
  /* Slate 700 - Hover states */

  --text-main: #F8FAFC;
  /* Slate 50 - High contrast text */
  --text-muted: #94A3B8;
  /* Slate 400 - Secondary text */

  --border-color: #334155;
  /* Slate 700 - Subtle borders */

  /* Deep Shadows tailored for Dark UI */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.7);

  /* Glow effects matching team colors */
  --glow-red: 0 0 20px rgba(206, 17, 38, 0.4);
  --glow-blue: 0 0 20px rgba(0, 56, 168, 0.4);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-color);
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ==== Main Mobile-Optimized Nav ==== */

.nav {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.85);
  /* Translucent surface */
  backdrop-filter: blur(12px);
  /* Modern glassmorphism on scroll */
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--team-blue);
  /* Subtle nod to the team blue */
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);

  /* Crucial Mobile Scroll setup */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  align-items: center;
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
}

.nav::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Webkit */
}

.nav a {
  text-decoration: none;
  padding: 12px 24px;
  background: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  /* Larger tap target */
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a:active {
  transform: scale(0.96);
  /* Tactile feedback on tap */
}

.nav a.active {
  background: var(--team-red);
  color: var(--team-white);
  border-color: var(--team-red);
  box-shadow: var(--glow-red);
}

/* ==== Tournament Banner Block ==== */

.tournament-banner {
  background: var(--surface);
  padding: 20px 20px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.banner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.banner-logos a {
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.banner-logos a:active {
  transform: scale(0.95);
}

.banner-logos img {
  display: block;
  height: auto;
}

.yeti-logo {
  max-height: 100px;
  width: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.tournament-logo {
  max-height: 100px;
  width: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

@media (max-width: 600px) {
  .tournament-banner {
    padding: 16px;
  }

  .banner-logos {
    gap: 24px;
  }

  .yeti-logo,
  .tournament-logo {
    max-height: 80px;
  }
}

/* ==== Main Content & Iframe ==== */

.content {
  height: calc(100vh - 160px);
  /* Fill remaining mobile space */
  background: var(--bg-color);
  position: relative;
  display: flex;
  flex-direction: column;
}

.iframe-hint {
  text-align: center;
  padding: 14px;
  background: var(--team-blue);
  /* Using team blue for highlight blocks */
  color: var(--team-white);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 16px auto;
  max-width: 600px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow-md), var(--glow-blue);
}

iframe {
  flex-grow: 1;
  width: 100%;
  border: none;
  background: #ffffff;
  /* Typically game sheets are white, so keep iframe bg white to avoid ugly loading flashes */
}

footer {
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
  font-size: 13px;
  font-weight: 500;
  border-top: 2px solid var(--team-red);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  /* Accommodate iPhone home bar */
}

/* ==== Component Animations ==== */

.menu-highlight {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 3px solid var(--team-red);
  border-radius: 8px;
  pointer-events: none;
  animation: pulseOnce 1.8s ease-out forwards;
}

@keyframes pulseOnce {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(206, 17, 38, 0.6);
  }

  40% {
    transform: scale(1.1 -0.02);
    box-shadow: 0 0 0 10px rgba(206, 17, 38, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

/* ==== Auxiliary Content Pages (Like Video) ==== */

.body-content {
  max-width: 760px;
  margin: 24px auto;
  padding: 24px;
  color: var(--text-main);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.body-content h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--team-red);
  display: inline-block;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.body-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.body-content p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.schedule-highlight {
  background: rgba(206, 17, 38, 0.1);
  /* Real team red tinted background */
  border: 1px solid var(--team-red);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px auto;
  font-weight: 700;
  display: inline-block;
  color: var(--text-main);
  box-shadow: var(--glow-red);
}

.schedule-highlight span {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--team-red);
}

.sheet-image-wrapper {
  max-width: 1100px;
  margin: 20px auto;
  text-align: center;
  padding: 0 16px;
}

.sheet-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.sheet-caption {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Desktop Fixes */
@media (min-width: 768px) {
  .nav {
    justify-content: center;
    overflow-x: visible;
  }

  .nav a {
    font-size: 15px;
  }

  .nav a:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
  }

  iframe {
    width: calc(100% - 40px);
    margin: 0 auto 20px auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    height: auto;
  }

  .iframe-hint {
    display: none;
  }

  .banner-logos a:hover {
    transform: translateY(-3px);
  }
}