/* ============================================================
   TIRS AU BUT — Ultra Beautiful Penalty Shootout
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Exo+2:wght@400;600;700;800;900&display=swap');

:root {
  --green-dark:  #0a1a0e;
  --green-pitch: #1e6b2a;
  --gold:        #ffd700;
  --gold-dark:   #c8a200;
  --red:         #e02020;
  --blue:        #2060d0;
  --hud-bg:      rgba(8,14,10,.92);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #060e08;
  font-family: 'Exo 2', sans-serif;
  color: #fff;
}

/* ============================================================
   WRAP + CANVAS
   ============================================================ */
#penaltyWrap {
  position: relative;
  width: 100vw; height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 80%, #0a2010 0%, #050c06 100%);
}

#penaltyCanvas {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  max-height: calc(100vh - 64px);
  cursor: crosshair;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 12px 60px rgba(0,0,0,.7),
    0 0 120px rgba(0,80,20,.15);
}

/* ============================================================
   HUD
   ============================================================ */
#penaltyHud {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--hud-bg);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 12px;
  z-index: 10;
}

.phud-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.phud-label {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .5;
  line-height: 1;
}

.phud-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: .04em;
}
.phud-player .phud-score { color: var(--gold); text-shadow: 0 0 12px rgba(255,215,0,.5); }
.phud-ai     .phud-score { color: #a080ff;     text-shadow: 0 0 12px rgba(160,128,255,.4); }

.phud-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.phud-round {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

.phud-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.shot-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.shot-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  background: transparent;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.shot-dot.goal {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 6px rgba(255,215,0,.6);
}
.shot-dot.save, .shot-dot.miss {
  background: rgba(255,80,80,.5);
  border-color: rgba(255,80,80,.7);
}
.shot-dot.ai-dot.goal {
  background: #a080ff;
  border-color: #a080ff;
  box-shadow: 0 0 6px rgba(160,128,255,.5);
}

.phud-menu-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  font-size: .95rem;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  transition: background .1s, border-color .1s;
}
.phud-menu-btn:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}

/* ============================================================
   INTRO OVERLAY
   ============================================================ */
#penaltyIntro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(0,100,30,.25) 0%, transparent 60%),
    rgba(4,10,6,.88);
  backdrop-filter: blur(2px);
}

.pint-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
}

.pint-ball-icon {
  font-size: 3.5rem;
  animation: ballBounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(255,255,255,.3));
}

@keyframes ballBounce {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(180deg); }
}

.pint-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: .12em;
  color: var(--gold);
  text-shadow:
    0 0 20px rgba(255,215,0,.6),
    0 0 50px rgba(255,215,0,.2);
  margin: 0;
  line-height: 1;
}

.pint-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .08em;
  text-align: center;
  margin: -8px 0 0;
}

.pint-controls {
  display: flex;
  gap: 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 14px 20px;
}

.pint-ctrl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  text-align: center;
}

.pint-ctrl-icon { font-size: 1.4rem; }

.pint-diff-row {
  display: flex;
  gap: 8px;
}

.pint-diff-btn {
  padding: 7px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: rgba(255,255,255,.5);
  font-family: 'Exo 2', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .12s;
}
.pint-diff-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.pint-diff-btn.active {
  background: rgba(255,215,0,.15);
  border-color: rgba(255,215,0,.5);
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255,215,0,.4);
}

.pint-play-btn {
  padding: 14px 48px;
  border: none;
  border-radius: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: .1em;
  cursor: pointer;
  background: linear-gradient(180deg, #50c840 0%, #28a018 55%, #1a7810 100%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
  box-shadow:
    0 5px 0 #0a4806,
    0 8px 24px rgba(40,160,24,.4),
    inset 0 1px 0 rgba(255,255,255,.3);
  transition: filter .1s, transform .08s, box-shadow .08s;
  margin-top: 4px;
}
.pint-play-btn:hover  { filter: brightness(1.12); }
.pint-play-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #0a4806, 0 3px 8px rgba(0,0,0,.3);
}

/* ============================================================
   GAME OVER
   ============================================================ */
#penaltyGameover {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
}

.pgo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 52px;
  background: linear-gradient(160deg, #0e1c10 0%, #080e08 100%);
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255,215,0,.06),
    0 20px 80px rgba(0,0,0,.7),
    0 0 60px rgba(40,160,24,.08);
  position: relative;
  overflow: hidden;
  min-width: 280px;
}

.pgo-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,.5), transparent);
}

.pgo-icon {
  font-size: 3.2rem;
  animation: pgoIconPop .5s cubic-bezier(.17,.67,.35,1.4) both;
}
@keyframes pgoIconPop {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.pgo-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: .12em;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,.5), 0 0 40px rgba(255,215,0,.2);
}

.pgo-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  margin-top: -10px;
}

.pgo-btns {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.pgo-btn {
  padding: 11px 28px;
  border: none;
  border-radius: 10px;
  font-family: 'Exo 2', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .1s, transform .08s, box-shadow .08s;
}
.pgo-btn:active { transform: translateY(3px); }

.pgo-btn-primary {
  background: linear-gradient(180deg, #50c840 0%, #28a018 55%, #1a7810 100%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
  box-shadow: 0 4px 0 #0a4806, 0 6px 18px rgba(40,160,24,.3), inset 0 1px 0 rgba(255,255,255,.25);
}
.pgo-btn-primary:hover  { filter: brightness(1.1); }
.pgo-btn-primary:active { box-shadow: 0 1px 0 #0a4806; }

.pgo-btn-secondary {
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.15);
}
.pgo-btn-secondary:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .pint-title { font-size: 2.6rem; }
  .pint-ball-icon { font-size: 2.8rem; }
  .pint-controls { flex-direction: column; gap: 10px; padding: 12px; }
  .pgo-box { padding: 28px 28px; min-width: 260px; }
  .pgo-title { font-size: 2rem; }
  .pgo-score { font-size: 2.4rem; }
  #penaltyHud { height: 48px; }
  .phud-score { font-size: 1.5rem; }
}
