/* ==================================================================
   KONSEPT 6 - "Son Saniye Basketi"  |  300 x 600 sabit
   0..44 ust bar | 44..88 skorboard | 88..582 tam boy salon
   Gerçekçi salon, seyirci, pota ve top katmanları.
   ================================================================== */

#stage { background: #0a0d0f; }

/* ---------------- skorboard ---------------- */
.sb {
  position: absolute;
  top: 44px; left: 0; right: 0;
  height: 44px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px;
  background: #06090b;
  box-shadow: inset 0 -8px 10px rgba(0,0,0,.6), 0 1px 0 #262c30;
}
.sbs { display: flex; align-items: center; gap: 8px; }
.sbs.r { justify-content: flex-end; }
.sbs em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .12em; color: #6f7c82; }
.sbs b { font-size: 29px; font-weight: 800; line-height: 1; color: #ff6a21; text-shadow: 0 0 10px rgba(255,106,33,.5); }
.sbm { text-align: center; padding: 0 14px; border-left: 1px solid #1b2124; border-right: 1px solid #1b2124; }
.sbm b { display: block; font-size: 25px; font-weight: 800; line-height: 1; color: #ff2f2f; text-shadow: 0 0 11px rgba(255,47,47,.55); }
.sbm em { display: block; margin-top: 3px; font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: .14em; color: #6f7c82; }

/* ---------------- salon ---------------- */
.court { position: absolute; top: 88px; left: 0; right: 0; bottom: 18px; overflow: hidden; }

/* Tribün ve parke aynı fotoğraf perspektifini paylaşır. */
.arena {
  position: absolute;
  inset: 0;
  background: #4a3526 url('../assets/arena-realistic.jpg') center center / cover no-repeat;
}
.arena::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,9,16,.12), transparent 50%, rgba(23,12,5,.09)),
    linear-gradient(90deg, rgba(5,9,15,.13), transparent 20%, transparent 80%, rgba(5,9,15,.13));
}
.floorwrap { display: none; }
.fshade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 67%, rgba(8,10,13,.34));
}

/* ---------------- gerçekçi cam / çelik pota ---------------- */
.hoop { position: absolute; top: 0; left: 0; right: 0; height: 180px; pointer-events: none; }
.pole {
  position: absolute;
  left: 142px; top: -8px;
  width: 16px; height: 59px;
  background: linear-gradient(90deg, #15232c 0, #5a6c77 34%, #9ca9ad 44%, #384951 65%, #111e25);
  border: 1px solid rgba(7,16,24,.7);
  box-shadow: 2px 1px 4px rgba(0,0,0,.35);
  z-index: 5;
}
.hoop-photo {
  position: absolute;
  display: block;
  left: 47px; top: 42.2px;
  width: 206px; height: 120px;
  clip-path: inset(0 0 22% 0);
  filter: drop-shadow(0 3px 3px rgba(3,9,15,.28));
  z-index: 6;
}
.net {
  position: absolute;
  left: 47px; top: 135.8px;
  width: 206px; height: 26.4px;
  overflow: hidden;
  z-index: 10;
  transform-origin: 50% 0;
  will-change: transform;
}
.net img { position: absolute; left: 0; bottom: 0; width: 206px; height: 120px; display: block; }
.rim-front {
  position: absolute;
  left: 117px; top: 107px;
  width: 66px; height: 20px;
  z-index: 10;
  opacity: 0;
  transition: opacity .05s;
}
.hoop.ball-through .rim-front { opacity: 1; }
/* ---------------- gerçekçi basketbol topu ---------------- */
.ball {
  position: absolute;
  left: 150px; top: 370px;
  width: 0; height: 0;
  z-index: 8;
  will-change: transform;
}
.ball img {
  position: absolute;
  left: -32px; top: -32px;
  width: 64px; height: 64px;
  display: block;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.5));
}
.ball .sh {
  position: absolute;
  left: -27px; top: 29px;
  width: 54px; height: 11px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  filter: blur(3px);
}
.ball.spin img { animation: bSpin .62s linear infinite; }
@keyframes bSpin { to { transform: rotate(-360deg); } }

#arc { position: absolute; left: 0; top: 0; width: 300px; height: 494px; z-index: 7; pointer-events: none; }

.buzz { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.buzz.on { animation: bz .85s var(--ease-out) 3; }
@keyframes bz {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(255,47,47,0); }
  50%      { box-shadow: inset 0 0 30px 8px rgba(255,47,47,.5); }
}

/* ---------------- ASAMA 1 ---------------- */
.ask {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px 40px;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.26) 36%, rgba(0,0,0,.85) 64%, rgba(0,0,0,.92) 100%);
}
.ask.on { display: flex; }
.ask.out { animation: askOut .32s var(--ease-in) forwards; }
@keyframes askOut { to { opacity: 0; } }
.freeze {
  padding: 4px 9px;
  border-radius: 3px;
  border: 1px solid rgba(255,47,47,.6);
  background: rgba(255,47,47,.14);
  color: #ff6a6a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  animation: fb 1.1s steps(1, end) infinite;
}
@keyframes fb { 50% { opacity: .35; } }
.aq {
  margin: 12px 0 16px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.04em;
  text-align: center;
  text-shadow: 0 3px 10px rgba(0,0,0,.9);
}
.bigodd {
  position: relative;
  width: 100%;
  height: 90px;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 14px;
  animation: glowRing 1.8s var(--ease-both) infinite;
}
.bigodd .crown { top: 8px; left: 10px; right: auto; width: 18px; height: 18px; }
.flag {
  position: absolute;
  top: 11px; left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  color: var(--crown-a);
  z-index: 2;
}
.bl { position: relative; z-index: 2; font-size: 14px; font-weight: 700; color: rgba(255,255,255,.92); }
.bv { position: relative; z-index: 2; font-size: 34px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.anote { margin-top: 12px; font-size: 11px; font-weight: 500; color: #9fa9ad; text-align: center; }

/* ---------------- ASAMA 2 ---------------- */
.hint { left: 0; right: 0; top: auto; bottom: 38px; z-index: 30; opacity: 0; transition: opacity .25s linear; }
.hint.on  { opacity: 1; }
.hint.off { opacity: 0; }
.hint .finger { order: -1; width: 28px; height: 28px; animation: fSw 2s var(--ease-both) infinite; }
@keyframes fSw {
  0%        { transform: translate(0,0) scale(1); opacity: .25; }
  14%       { opacity: 1; }
  58%       { transform: translate(0,-48px) scale(.78); opacity: 1; }
  80%, 100% { transform: translate(0,-48px) scale(.78); opacity: 0; }
}

/* ---------------- sonuc ---------------- */
.shout {
  position: absolute;
  left: 0; right: 0; top: 196px;
  z-index: 45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
}
.shout .s1 {
  font-size: 46px; font-weight: 900; line-height: .9;
  letter-spacing: -.05em; color: var(--yellow);
  text-shadow: 0 2px 0 #6d6600, 0 5px 14px rgba(0,0,0,.85);
  transform: scale(.4);
}
.shout .s2 {
  margin-top: 8px; font-size: 14px; font-weight: 800; line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,.95);
  opacity: 0; transform: translateY(8px);
}
.shout.on { opacity: 1; }
.shout.on .s1 { animation: sIn .58s var(--pop) forwards; }
.shout.on .s2 { animation: sSub .45s var(--ease-out) .22s forwards; }
@keyframes sIn  { 0% { transform: scale(.35) rotate(-7deg); } 70% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1) rotate(-1deg); } }
@keyframes sSub { to { opacity: 1; transform: none; } }

#conf { position: absolute; inset: 0; z-index: 46; pointer-events: none; }

/* ---------------- bitis karti ---------------- */
.endcard {
  position: absolute;
  left: 0; right: 0;
  top: 250px; bottom: 18px;
  z-index: 60;
  padding: 20px 16px 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10,13,15,.92) 0, #0e1316 28px, #090c0e 100%);
  transform: translateY(110%);
  transition: transform .5s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.endcard.up { transform: translateY(0); }
.ectag {
  align-self: center;
  padding: 4px 10px; border-radius: 4px;
  background: var(--green-dark);
  font-size: 10px; font-weight: 900; letter-spacing: .14em;
}
.ecamt { margin-top: 10px; font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -.045em; color: var(--yellow); }
.ecsub {
  margin: 10px auto 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 5px;
  background: rgba(0,134,65,.2);
  border: 1px solid rgba(0,210,102,.3);
  font-size: 11px; font-weight: 600; color: #d4f2e1;
}
.ecsub img { width: 13px; height: 13px; }
.ecsub b { color: var(--yellow); font-weight: 900; }
.eccopy { margin: auto 0 12px; font-size: 12px; font-weight: 600; line-height: 1.42; color: #c3ccd0; }
.endcard .cta { margin-bottom: 10px; }

/* Açılış perdesi potayı ve gerçekçi tribünleri görünür bırakır. */
.ask { background: linear-gradient(180deg, transparent 0%, rgba(3,8,13,.04) 37%, rgba(5,9,12,.76) 61%, #0a0d0f 80%); }
.sb { background: linear-gradient(180deg, #17232e, #091119); border-bottom: 1px solid rgba(185,218,233,.16); }
.sbm { border-color: #31404c; }
.sbs em, .sbm em { color: #aab8c2; }
.ball .sh { z-index: -1; opacity: .7; }
.ball.spin .sh { opacity: 0; }
#stage { background: linear-gradient(180deg, #0c151f, #0a0d0f 78%); }
.hint .txt {
  padding: 7px 15px;
  line-height: 1.15;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  background: rgba(6,14,20,.78);
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
  text-shadow: 0 1px 5px #05080c;
}
