/* ============================================================
   PLAYERLAB — STADIUM / HALI SAHA NEON-GLASS THEME
   Shared visual layer for all pages. Purely additive:
   it only restyles surfaces and adds an animated backdrop.
   No markup, IDs, classes, handlers or JS logic are changed.
   Loaded AFTER each page's own <style> so it wins the cascade.
   ============================================================ */

:root {
  --pl-base: #04070a;
  --pl-base-2: #06100b;
  --pl-neon: #2bff9e;
  --pl-neon-2: #22c55e;
  --pl-cyan: #38e2ff;
  --pl-gold: #f5c451;
  --pl-line: rgba(43, 255, 158, 0.16);
  --pl-line-soft: rgba(43, 255, 158, 0.10);
  --pl-glass: rgba(13, 22, 17, 0.55);
  --pl-glass-strong: rgba(8, 14, 11, 0.74);
  --pl-glow: rgba(43, 255, 158, 0.35);
}

/* ---- Deep stadium base so the fixed backdrop shows through ---- */
html {
  background: var(--pl-base) !important;
}

body {
  background: transparent !important;
}

/* ============================================================
   ANIMATED STADIUM BACKDROP  (built by playerlab-fx.js)
   ============================================================ */
#pl-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(125% 90% at 50% -15%, #0c2018 0%, #071009 48%, var(--pl-base) 100%);
}

#pl-stage>* {
  position: absolute;
  pointer-events: none;
}

/* mowing stripes of an astroturf pitch, gently panning */
#pl-stage .pl-turf {
  inset: -30%;
  background:
    repeating-linear-gradient(118deg,
      rgba(43, 255, 158, 0.045) 0 3px,
      transparent 3px 9px),
    repeating-linear-gradient(118deg,
      rgba(255, 255, 255, 0.018) 0 80px,
      rgba(0, 0, 0, 0.05) 80px 160px);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 35%, #000 30%, transparent 80%);
  mask-image: radial-gradient(120% 80% at 50% 35%, #000 30%, transparent 80%);
  animation: plTurfPan 38s linear infinite;
}

/* faint center pitch lines (circle + halfway), drawn with borders */
#pl-stage .pl-pitch {
  left: 50%;
  top: 50%;
  width: 70vmin;
  height: 70vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(43, 255, 158, 0.06);
  box-shadow: 0 0 0 1px rgba(43, 255, 158, 0.02) inset;
  animation: plPitchPulse 7s ease-in-out infinite;
}

#pl-stage .pl-pitch::before {
  content: '';
  position: absolute;
  left: -60vmin;
  right: -60vmin;
  top: 50%;
  border-top: 1px solid rgba(43, 255, 158, 0.05);
}

#pl-stage .pl-pitch::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: rgba(43, 255, 158, 0.18);
  box-shadow: 0 0 12px var(--pl-glow);
}

/* stadium floodlights — soft breathing light pools */
#pl-stage .pl-flood {
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(46px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

#pl-stage .pl-flood.a {
  top: -30vmax;
  left: -18vmax;
  background: radial-gradient(circle, rgba(43, 255, 158, 0.22), transparent 60%);
  animation: plFlood 12s ease-in-out infinite;
}

#pl-stage .pl-flood.b {
  top: -34vmax;
  right: -18vmax;
  background: radial-gradient(circle, rgba(56, 226, 255, 0.14), transparent 60%);
  animation: plFlood 15s ease-in-out infinite reverse;
}

#pl-stage .pl-flood.c {
  bottom: -36vmax;
  left: 30%;
  background: radial-gradient(circle, rgba(43, 255, 158, 0.10), transparent 60%);
  animation: plFlood 18s ease-in-out infinite;
}

#pl-stage canvas {
  inset: 0;
  width: 100%;
  height: 100%;
}

#pl-stage .pl-vignette {
  inset: 0;
  background: radial-gradient(130% 100% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

@keyframes plTurfPan {
  to {
    transform: translateX(-160px);
  }
}

@keyframes plPitchPulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes plFlood {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.45;
  }

  50% {
    transform: translate(4vmax, 3vmax) scale(1.12);
    opacity: 0.7;
  }
}

/* ============================================================
   GLASS + NEON SURFACES  (selectors that exist across pages)
   ============================================================ */

/* top navigation → frosted glass with a neon hairline */
nav {
  background: var(--pl-glass-strong) !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--pl-line) !important;
  box-shadow: 0 1px 0 rgba(43, 255, 158, 0.07), 0 10px 34px rgba(0, 0, 0, 0.45) !important;
}

/* standalone bordered cards → glass tiles */
.video-card,
.pitch-card,
.sidebar-card,
.tryout-card,
.player-card,
.player-name-card,
.vid-card,
.section-card,
.tryout-pub-card,
.card,
.stat,
.page-stat,
.feature-card {
  background: var(--pl-glass) !important;
  border: 1px solid var(--pl-line) !important;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease, border-color .2s ease !important;
}

/* lift + neon glow on hover for interactive cards */
.video-card:hover,
.pitch-card:hover,
.tryout-card:hover,
.player-card:hover,
.vid-card:hover,
.card:hover,
.stat:hover,
.tryout-pub-card:hover,
.sidebar-card:hover {
  border-color: var(--pl-neon) !important;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(43, 255, 158, 0.18),
    0 14px 50px -10px var(--pl-glow) !important;
  transform: translateY(-5px) !important;
}

/* glass strips / bars */
.stats-bar,
.search-section,
.tabs,
.filters,
.card-head,
footer {
  background: var(--pl-glass) !important;
  border-color: var(--pl-line) !important;
}

footer {
  border-top: 1px solid var(--pl-neon) !important;
  box-shadow: 0 -1px 30px rgba(43, 255, 158, .08);
}

/* modals / sheets / video boxes → strong glass */
#venue-modal,
#vp-box,
.vp-box,
.pl-glass-modal {
  background: var(--pl-glass-strong) !important;
  border: 1px solid var(--pl-line) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(43, 255, 158, 0.10) !important;
}

/* ---- neon numbers & headings ---- */
.stat-num,
.stat-n,
.ps-n,
.pstat-num {
  color: var(--pl-neon) !important;
  text-shadow: 0 0 22px rgba(43, 255, 158, 0.45);
}

.section-title,
h1,
h2 {
  letter-spacing: .5px;
}

.section-title::before {
  box-shadow: 0 0 14px var(--pl-glow);
}

/* ---- primary / search / login buttons → neon with sheen ---- */
.btn-primary,
.btn-search,
.btn-login {
  position: relative;
  overflow: hidden;
  border: none !important;
  background: linear-gradient(135deg, #16a34a 0%, var(--pl-neon) 100%) !important;
  color: #04140c !important;
  box-shadow: 0 8px 24px rgba(43, 255, 158, 0.22) !important;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

.btn-login {
  color: #fff !important;
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%) !important;
  box-shadow: 0 8px 22px rgba(239, 68, 68, .28) !important;
}

.btn-primary:hover,
.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(43, 255, 158, 0.5) !important;
  filter: saturate(1.15);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239, 68, 68, .5) !important;
}

.btn-primary::after,
.btn-search::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: plSheen 4.5s ease-in-out infinite;
}

@keyframes plSheen {

  0%,
  65% {
    left: -120%;
  }

  100% {
    left: 140%;
  }
}

/* tabs / filter pills → neon active state */
.tab.active {
  color: var(--pl-neon) !important;
  border-bottom-color: var(--pl-neon) !important;
  text-shadow: 0 0 18px var(--pl-glow);
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, #16a34a, var(--pl-neon)) !important;
  border-color: var(--pl-neon) !important;
  color: #04140c !important;
}

/* the round logo badge / ball → soft pulsing glow + gentle bob */
.logo-icon,
.logo-ball,
.logo-badge {
  box-shadow: 0 0 24px rgba(43, 255, 158, 0.4) !important;
  animation: plBob 3.6s ease-in-out infinite;
}

@keyframes plBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* inputs / selects / textareas → neon focus ring */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--pl-neon) !important;
  box-shadow: 0 0 0 3px rgba(43, 255, 158, 0.16) !important;
  outline: none !important;
}

/* banners on profile pages → deeper turf + stronger glow */
.banner-glow {
  background: radial-gradient(ellipse at 30% 60%, rgba(43, 255, 158, 0.20), transparent 62%) !important;
}


/* ---- respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {

  #pl-stage .pl-turf,
  #pl-stage .pl-flood,
  #pl-stage .pl-pitch,
  .btn-primary::after,
  .btn-search::after,
  .logo-icon,
  .logo-ball,
  .logo-badge {
    animation: none !important;
  }
}

/* ===== inline emoji-replacement icons (pl-icons.js) ===== */
.pl-ico-wrap { display: inline; }
.pl-ico {
  width: 1.32em;
  height: 1.32em;
  display: inline-block;
  vertical-align: -0.26em;
  fill: currentColor;
  flex: none;
}
.pl-ico-c { width: 1.4em; height: 1.4em; vertical-align: -0.3em; }
.pl-flag {
  width: 1.5em;
  height: auto;
  vertical-align: -0.28em;
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.pl-ico-flag {
  width: 1.35em;
  height: 1em;
  vertical-align: -0.12em;
  border-radius: 2px;
  overflow: hidden;
}
/* the logo box now holds the crest image, not an emoji — drop the green glow box */
.logo-icon, .logo-ball { box-shadow: none !important; }

/* ===== responsive safety net (all pages) =====
   overflow-x:clip (NOT hidden) so it never breaks the sticky ball hero. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }

@media (max-width: 600px) {
  /* keep wide tables from forcing horizontal scroll on phones */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ===== responsive nav + spacing (all pages) ===== */
@media (max-width: 860px) {
  /* let top navs wrap instead of overflowing / being clipped */
  nav { flex-wrap: wrap; height: auto !important; row-gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .nav-links { flex-wrap: wrap; gap: 8px 14px; }
  .nav-right { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 600px) {
  /* trim oversized side padding on phones */
  .content-section, .tabs-section, .footer-inner,
  #pl-arena .pa-inner, .main, .page-hero { padding-left: 1rem !important; padding-right: 1rem !important; }
  /* multi-column feature/footer grids stack on phones */
  .footer-inner { grid-template-columns: 1fr !important; }
}