/* v5.26 — Ball physics, star glow, second-angle replay, excitement++ */

/* ============ STAR PLAYER GLOW OVERLAY ============ */
#v526-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
  mix-blend-mode: screen;
}

/* ============ SCORER NAMEPLATE ============ */
.v526-nameplate {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%) translateY(-12px) scale(0.92);
  z-index: 91;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px 14px 18px;
  background: linear-gradient(135deg, rgba(20, 22, 30, 0.96), rgba(8, 10, 16, 0.96));
  border: 1px solid rgba(255, 215, 0, 0.55);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.15) inset,
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 200, 80, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.2, 0.9, 0.2, 1.05);
  font-family: 'Oswald', system-ui, sans-serif;
}
.v526-nameplate.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.v526-nameplate .flag {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.v526-nameplate .meta { display: flex; flex-direction: column; gap: 2px; }
.v526-nameplate .name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffd54f;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.v526-nameplate .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}
.v526-nameplate .min {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  padding: 0 4px 0 14px;
  border-left: 1px solid rgba(255,255,255,0.18);
}

/* ============ SECOND-ANGLE REPLAY (CINEMATIC GOAL CAM) ============ */
.v526-cinecam {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: none;
  background: radial-gradient(ellipse at 50% 60%, #0d2a3a 0%, #02070d 75%);
  overflow: hidden;
  pointer-events: none;
}
.v526-cinecam.show { display: block; }

.v526-cinecam .stage {
  position: absolute;
  inset: 0;
  perspective: 1100px;
  perspective-origin: 50% 40%;
}

.v526-cinecam .pitch3d {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 200%;
  height: 70%;
  transform: translateX(-50%) rotateX(62deg);
  transform-origin: 50% 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #1e6b2a 0px,
      #1e6b2a 100px,
      #1a5e25 100px,
      #1a5e25 200px
    );
  border-top: 4px solid rgba(255,255,255,0.85);
  box-shadow: inset 0 60px 80px rgba(0,0,0,0.45);
}

/* Goal frame in 3D space */
.v526-cinecam .goal {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translateX(-50%);
  width: 320px;
  height: 130px;
  border: 5px solid rgba(255,255,255,0.95);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.12) 100%);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 8px 30px rgba(0,0,0,0.6);
}
.v526-cinecam .goal::before {
  /* Net pattern */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 9px);
}
.v526-cinecam.goalpulse .goal {
  animation: v526-netbulge 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes v526-netbulge {
  0%   { transform: translateX(-50%) scale(1); }
  35%  { transform: translateX(-50%) scale(1.05, 1.18); box-shadow: 0 0 80px rgba(255,220,100,0.5); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Animated ball arcing into the net */
.v526-cinecam .cineball {
  position: absolute;
  left: 50%;
  top: 70%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #b8b8b8 70%, #555);
  box-shadow: 0 6px 18px rgba(0,0,0,0.7);
  transform: translate(-50%, -50%);
  animation: v526-balltogoal 1.1s cubic-bezier(0.45, 0.1, 0.55, 1) forwards;
  animation-delay: 0.25s;
  opacity: 0;
}
@keyframes v526-balltogoal {
  0%   { left: 30%; top: 80%; transform: translate(-50%, -50%) scale(0.45); opacity: 1; }
  60%  { left: 45%; top: 30%; transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  100% { left: 50%; top: 38%; transform: translate(-50%, -50%) scale(0.7); opacity: 0.9; }
}

/* Crowd glow behind the goal */
.v526-cinecam .crowd {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,200,80,0.18), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 4px);
}
.v526-cinecam .crowd::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(255,255,255,0.12), transparent 60%);
  animation: v526-crowdflash 0.8s ease-out;
}
@keyframes v526-crowdflash {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Cinecam caption — "GOAL CAM · BEHIND NET" */
.v526-cinecam .caption {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(255, 215, 0, 0.85);
  padding: 8px 16px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(0,0,0,0.45);
  border-radius: 4px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Scorer banner inside cinecam */
.v526-cinecam .scorer-banner {
  position: absolute;
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Oswald', sans-serif;
  font-size: 64px;
  font-weight: 700;
  color: #ffd54f;
  letter-spacing: 0.06em;
  text-shadow:
    0 4px 22px rgba(0,0,0,0.85),
    0 0 40px rgba(255,200,80,0.6);
  opacity: 0;
  animation: v526-scorerin 0.6s ease-out 0.6s forwards;
}
@keyframes v526-scorerin {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.92); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ============ POST/BAR METALLIC CLANG FLASH ============ */
.v526-postclang {
  position: fixed;
  inset: 0;
  z-index: 87;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18) 0%, transparent 35%),
    linear-gradient(180deg, transparent 0%, rgba(180, 200, 230, 0.18) 50%, transparent 100%);
  opacity: 0;
  animation: v526-clangflash 0.45s ease-out;
}
@keyframes v526-clangflash {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============ HALFTIME HIGHLIGHTS MINI-REEL ============ */
.v526-htreel {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: linear-gradient(180deg, rgba(5,10,20,0.96), rgba(0,0,0,0.97));
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.v526-htreel.show { display: flex; }

.v526-htreel .head {
  font-family: 'Oswald', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #ffd54f;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-shadow: 0 6px 30px rgba(0,0,0,0.7), 0 0 50px rgba(255,200,80,0.4);
}
.v526-htreel .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.v526-htreel .stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px 28px;
  width: min(640px, 86vw);
  padding: 22px 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 12px;
  font-family: 'Oswald', sans-serif;
}
.v526-htreel .stats .l { text-align: right; color: #6dd5ed; font-size: 24px; font-weight: 600; }
.v526-htreel .stats .c { text-align: center; color: rgba(255,255,255,0.55); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.25em; padding-top: 6px; }
.v526-htreel .stats .r { text-align: left; color: #ff6b6b; font-size: 24px; font-weight: 600; }

.v526-htreel .moments {
  margin-top: 24px;
  width: min(640px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v526-htreel .moments .row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.035);
  border-left: 3px solid #ffd54f;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  color: #fff;
  opacity: 0;
  animation: v526-momentin 0.4s ease-out forwards;
}
.v526-htreel .moments .row .min {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #ffd54f;
  min-width: 32px;
}
@keyframes v526-momentin {
  to { opacity: 1; transform: translateY(0); }
}

.v526-htreel .countdown {
  margin-top: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.v526-htreel .countdown span { color: #ffd54f; font-size: 18px; font-weight: 700; }

/* ============ TACTICAL URGENCY OVERLAY ============ */
.v526-urgency {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(220, 50, 50, 0.18) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.v526-urgency.show { opacity: 1; animation: v526-urgencypulse 1.4s ease-in-out infinite; }
@keyframes v526-urgencypulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* ============ MOBILE GUARDS ============ */
@media (max-width: 720px) {
  .v526-nameplate { padding: 10px 18px 10px 12px; gap: 10px; }
  .v526-nameplate .flag { font-size: 28px; }
  .v526-nameplate .name { font-size: 18px; }
  .v526-nameplate .min { font-size: 20px; }
  .v526-cinecam .scorer-banner { font-size: 38px; }
  .v526-cinecam .goal { width: 220px; height: 90px; }
  .v526-htreel .head { font-size: 32px; }
  .v526-htreel .stats { gap: 10px 14px; }
}
