body.penalty-game-active #hero,
body.penalty-game-active #updated,
body.penalty-game-active #demoBanner {
  display: none;
}

.penalty-game {
  width: min(100%, 560px);
  margin: 0 auto;
  color: #fff;
}

.penalty-game * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.penalty-game__head {
  min-height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 12px;
}

.penalty-game__title small {
  display: block;
  color: #a9cbff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.penalty-game__title strong {
  display: block;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -.7px;
}

.penalty-game__scoreboard {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.penalty-game__pill,
.penalty-game__ranking-button {
  min-width: 68px;
  padding: 8px 12px;
  border-radius: 18px;
  text-align: center;
  background: #ffffff14;
  border: 1px solid #ffffff22;
  box-shadow: inset 0 1px 0 #ffffff1c;
}

.penalty-game__pill b {
  display: block;
  font-size: 20px;
  line-height: 18px;
}

.penalty-game__pill span {
  display: block;
  font-size: 10px;
  color: #dbe8ff;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.penalty-game__ranking-button {
  color: #fff;
  font: 900 12px inherit;
  cursor: pointer;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.penalty-game__field {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: inset 0 0 0 1px #ffffff22, 0 18px 45px #00000040;
  background:
    linear-gradient(180deg, #bdeefe 0 30%, #a4e0fb 30% 34%, transparent 34%),
    linear-gradient(180deg, #89d732 34% 56%, #77c823 56% 100%);
  touch-action: none;
  user-select: none;
}

.penalty-game__crowd {
  position: absolute;
  left: 0;
  right: 0;
  top: 4%;
  height: 23%;
  background:
    radial-gradient(circle at 8px 7px, #fff9e4 0 5px, transparent 6px) 0 0/26px 18px,
    radial-gradient(circle at 14px 10px, #fff1b7 0 4px, transparent 5px) 0 0/31px 19px,
    linear-gradient(180deg, #d2bb8c 0, #b99f6e 100%);
  opacity: .92;
}

.penalty-game__goal-shadow {
  position: absolute;
  left: 10%;
  top: 27%;
  width: 80%;
  height: 10%;
  background: radial-gradient(ellipse at center, #00000025 0, #00000000 72%);
  z-index: 2;
}

.penalty-game__goal {
  position: absolute;
  left: 5%;
  top: 10%;
  width: 90%;
  height: 34%;
  z-index: 6;
  pointer-events: none;
}

.penalty-game__goal-front {
  position: absolute;
  inset: 0;
  border: 7px solid #f5fbff;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 1px 0 #ffffffc2 inset;
}

.penalty-game__goal-back {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 8%;
  bottom: 10%;
  border: 5px solid #ffffffd4;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  opacity: .95;
}

.penalty-game__goal-net {
  position: absolute;
  left: 6.5%;
  right: 6.5%;
  top: 8.5%;
  bottom: 10.5%;
  background:
    linear-gradient(90deg, #ffffff8a 1px, transparent 1px) 0 0/16px 16px,
    linear-gradient(#ffffff8a 1px, transparent 1px) 0 0/16px 16px;
  opacity: .7;
}

.penalty-game__goal-side-left,
.penalty-game__goal-side-right {
  position: absolute;
  top: 1.5%;
  width: 10%;
  height: 84%;
  border: 6px solid #ffffffd8;
  border-top: 0;
  background:
    linear-gradient(90deg, #ffffff70 1px, transparent 1px) 0 0/16px 16px,
    linear-gradient(#ffffff70 1px, transparent 1px) 0 0/16px 16px;
  opacity: .9;
}

.penalty-game__goal-side-left {
  left: 0;
  border-right: 0;
  transform: skewY(16deg);
  transform-origin: left top;
}

.penalty-game__goal-side-right {
  right: 0;
  border-left: 0;
  transform: skewY(-16deg);
  transform-origin: right top;
}

.penalty-game__goal-mouth {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 11%;
  bottom: 14%;
  border-radius: 4px;
  background: linear-gradient(180deg, #b9e0f4 0, #a8d2eb 55%, #95c6e5 100%);
  opacity: .42;
  z-index: -1;
}

.penalty-game__keeper {
  position: absolute;
  left: 50%;
  top: 31%;
  width: 126px;
  height: 136px;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 8px 5px #00000045);
}

.penalty-game__keeper svg {
  display: block;
  width: 100%;
  height: 100%;
}

.penalty-game__keeper.saved {
  animation: penalty-keeper-pulse .28s ease;
}

@keyframes penalty-keeper-pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.07); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.penalty-game__lane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 43%;
  z-index: 11;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -18%, #c4ef62 0%, #9be13b 24%, transparent 56%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.055) 0 36px, rgba(41,121,12,.045) 36px 72px),
    linear-gradient(180deg, #91db31 0%, #7bc926 48%, #65b41d 100%);
}

.penalty-game__lane::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.12) 0%, transparent 18%, transparent 82%, rgba(0,0,0,.12) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.12), transparent 58%);
  opacity: .72;
}

.penalty-game__lane::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -9%;
  width: 118%;
  height: 132%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: .2;
  background:
    linear-gradient(70deg, transparent 49.7%, #ffffff 49.9%, #ffffff 50.15%, transparent 50.35%),
    linear-gradient(110deg, transparent 49.7%, #ffffff 49.9%, #ffffff 50.15%, transparent 50.35%);
}

.penalty-game__mark {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  box-shadow: 0 1px 0 #0005;
  z-index: 12;
}

.penalty-game__ball,
.penalty-game__shot-ball {
  position: absolute;
  border-radius: 50%;
  z-index: 15;
  background:
    radial-gradient(circle at center, #183db0 0 42%, #ff6201 42% 50%, transparent 50%),
    radial-gradient(circle at 35% 28%, #fff 0 18%, #ececec 19% 21%, #fff 22% 51%, #19308d 52% 66%, #fff 67%),
    radial-gradient(circle at 67% 62%, #19308d 0 16%, transparent 17%),
    radial-gradient(circle at 52% 35%, #19308d 0 13%, transparent 14%);
  box-shadow: 0 8px 14px #00000055;
}

.penalty-game__ball {
  left: 50%;
  top: 78%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%) scale(1);
}

.penalty-game__shot-ball {
  display: none;
  left: 50%;
  top: 78%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%) scale(1);
}

.penalty-game__ball.hidden { visibility: hidden; }

.penalty-game__impact {
  position: absolute;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.4);
  z-index: 18;
  font-size: 20px;
  font-weight: 900;
  opacity: 0;
  box-shadow: 0 6px 12px #00000035;
}

.penalty-game__impact.show {
  display: flex;
  animation: penalty-impact-pop .45s ease forwards;
}

.penalty-game__impact.goal { background: #22c55e; color: #fff; }
.penalty-game__impact.miss { background: #ef4444; color: #fff; }

@keyframes penalty-impact-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.penalty-game__aim {
  position: absolute;
  left: 50%;
  top: 78%;
  height: 4px;
  border-radius: 6px;
  background: #ffffffdc;
  transform-origin: 0 50%;
  display: none;
  z-index: 14;
  box-shadow: 0 0 0 2px #17387a66;
}

.penalty-game__aim::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 13px;
  height: 13px;
  border-top: 4px solid #fff;
  border-right: 4px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}

.penalty-game__reticle {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffffdd;
  display: none;
  z-index: 14;
  box-shadow: 0 0 0 2px #17387a66;
}

.penalty-game__reticle::before,
.penalty-game__reticle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #ffffffd8;
  transform: translate(-50%, -50%);
}

.penalty-game__reticle::before { width: 2px; height: 14px; }
.penalty-game__reticle::after { width: 14px; height: 2px; }

.penalty-game__power {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 118px;
  height: 9px;
  background: #ffffff24;
  border-radius: 999px;
  overflow: hidden;
  z-index: 16;
  box-shadow: inset 0 1px 0 #ffffff20;
}

.penalty-game__power i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #009fe3, #ff6201);
  transition: width .06s linear;
}

.penalty-game__restart {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  width: min(84%, 300px);
  padding: 18px 18px 16px;
  border-radius: 22px;
  text-align: center;
  background: #0f1a3feb;
  border: 1px solid #ffffff45;
  box-shadow: 0 18px 45px #00000055;
  z-index: 24;
  display: none;
}

.penalty-game__restart.show { display: block; }
.penalty-game__restart b { display: block; font-size: 30px; line-height: 1; }
.penalty-game__restart p { margin: 10px 0 16px; color: #dbe9ff; font-weight: 700; }
.penalty-game__restart button,
.penalty-game__ranking-card button {
  border: 0;
  border-radius: 16px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #ff6201, #ff8b29);
  color: #fff;
  font: 900 15px inherit;
  box-shadow: 0 7px 18px #0004;
  cursor: pointer;
}

.penalty-game__ranking {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: #071338b5;
  backdrop-filter: blur(4px);
}

.penalty-game__ranking.show { display: flex; }

.penalty-game__ranking-card {
  width: min(92%, 360px);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #183c92, #10275f);
  box-shadow: 0 18px 44px #0009;
  border: 1px solid #ffffff38;
}

.penalty-game__ranking-card h2 { margin: 0 0 8px; font-size: 22px; }
.penalty-game__ranking-card p { margin: 0 0 14px; color: #b9d5ff; font-size: 13px; font-weight: 800; }
.penalty-game__ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.penalty-game__ranking-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: #ffffff12; font-weight: 900; }
.penalty-game__ranking-list li.active { outline: 2px solid #daff4f; background: #ffffff1d; }
.penalty-game__ranking-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.penalty-game__ranking-list b { font-size: 18px; color: #daff4f; }
.penalty-game__ranking-actions { display: grid; gap: 8px; margin-top: 14px; }
.penalty-game__ranking-actions .secondary { background: #ffffff18; border: 1px solid #ffffff2c; box-shadow: none; }

@media (max-height: 720px) {
  .penalty-game__field { min-height: 430px; }
  .penalty-game__goal { top: 9%; height: 34%; }
  .penalty-game__keeper { top: 30%; width: 116px; height: 126px; }
  .penalty-game__ball { width: 78px; height: 78px; }
}
