.penalty-game {
  margin: 3rem 0 7rem;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  border-radius: 2rem;
  background: #f2f7ed;
  color: #142019;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(340px, 1.28fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.penalty-head {
  position: sticky;
  top: 7rem;
}
.penalty-head h2 {
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 0.92;
  margin: 0.5rem 0 1.2rem;
}
.penalty-head h2 em {
  color: #168348;
  font-style: normal;
}
.penalty-head > p:last-child {
  line-height: 1.65;
  color: #53665b;
}
.penalty-panel {
  background: #fff;
  border: 1px solid #d9e5d7;
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 1.2rem 3rem #35633b18;
}
.step-label {
  font-weight: 800;
  margin: 0.4rem 0 0.7rem;
}
.step-label b {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  background: #142019;
  color: #fff;
  border-radius: 50%;
  margin-right: 0.4rem;
}
.kicker-choices {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.kicker-choices button {
  border: 2px solid transparent;
  background: #edf4eb;
  border-radius: 0.75rem;
  padding: 0.25rem;
  cursor: pointer;
}
.kicker-choices button:hover,
.kicker-choices button:focus-visible {
  border-color: #21a45e;
}
.kicker-choices button.active {
  border-color: #168348;
  background: #d7f3df;
}
.kicker-choices img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.kicker-choices small {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pokemon-picker {
  margin-bottom: 0.75rem;
  padding: 0.8rem;
  border: 1px solid #d9e5d7;
  border-radius: 0.85rem;
  background: #f7faf5;
}
.pokemon-picker label {
  display: block;
  font-size: 0.82rem;
  font-weight: 850;
  margin-bottom: 0.45rem;
}
.pokemon-picker > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}
.pokemon-picker input {
  min-width: 0;
  border: 2px solid #c9d7c9;
  border-radius: 0.65rem;
  padding: 0.65rem;
  background: #fff;
  color: #142019;
}
.pokemon-picker button {
  border: 0;
  border-radius: 0.65rem;
  background: #168348;
  color: #fff;
  font-weight: 900;
  padding: 0.65rem 1rem;
}
.pokemon-picker button:disabled {
  opacity: 0.6;
}
.pokemon-picker p {
  margin: 0.4rem 0 0;
  color: #647368;
  font-size: 0.75rem;
}
.pitch {
  position: relative;
  min-height: 390px;
  border-radius: 1.1rem;
  overflow: hidden;
  background: linear-gradient(#8dd3f5 0 35%, #55ad5b 35% 100%);
}
.pitch:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 19%;
  height: 2px;
  background: #ffffff9c;
}
.score-strip {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 8;
  display: flex;
  gap: 0.35rem;
}
.score-strip span {
  background: #142019d9;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.score-strip i {
  font-style: normal;
}
.goal {
  position: absolute;
  z-index: 2;
  left: 14%;
  right: 14%;
  top: 15%;
  height: 47%;
  border: 0.55rem solid #fff;
  border-bottom-width: 0.75rem;
  box-shadow: 0 0.3rem 0.6rem #0003;
}
.net {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, #ffffff55 0 2px, transparent 2px 34px),
    repeating-linear-gradient(0deg, #ffffff55 0 2px, transparent 2px 28px);
}
.aim {
  position: absolute;
  z-index: 6;
  width: 2.5rem;
  height: 2.5rem;
  border: 0.2rem solid #fff;
  border-radius: 50%;
  background: #ffdc3dcc;
  box-shadow: 0 0 0 0.35rem #ffdc3d44;
  cursor: pointer;
  animation: pulseAim 1.2s infinite;
}
.aim:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #142019;
  transform: translate(-50%, -50%);
}
.aim.active {
  background: #ff6b3d;
  box-shadow: 0 0 0 0.5rem #ff6b3d55;
}
.top-left {
  left: 5%;
  top: 8%;
}
.top-right {
  right: 5%;
  top: 8%;
}
.middle-left {
  left: 5%;
  bottom: 8%;
}
.middle-right {
  right: 5%;
  bottom: 8%;
}
.center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
@keyframes pulseAim {
  50% {
    box-shadow: 0 0 0 0.7rem #ffdc3d10;
  }
}
.keeper {
  position: absolute;
  z-index: 4;
  width: 28%;
  height: 70%;
  object-fit: contain;
  left: 50%;
  bottom: -5%;
  transform: translateX(-50%);
  transition: transform 0.55s;
}
.keeper.dive-top-left {
  transform: translate(-120%, -20%) rotate(-28deg);
}
.keeper.dive-top-right {
  transform: translate(20%, -20%) rotate(28deg);
}
.keeper.dive-middle-left {
  transform: translate(-120%, 8%) rotate(-40deg);
}
.keeper.dive-middle-right {
  transform: translate(20%, 8%) rotate(40deg);
}
.penalty-spot {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: 80%;
  height: 30%;
}
.kicker {
  position: absolute;
  width: 26%;
  height: 110%;
  object-fit: contain;
  left: 9%;
  bottom: -12%;
  transition: transform 0.35s;
}
.kicker.kick {
  transform: translateX(1.2rem) rotate(8deg);
}
.soccer-ball {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 9%;
  font-size: 2.2rem;
  transform: translateX(-50%);
  transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.35, 1);
}
.soccer-ball.shot {
  transform: translate(var(--ball-x), var(--ball-y)) scale(0.48) rotate(520deg);
}
.kicker.celebrate-spin {
  animation: goalSpin 0.85s ease-in-out 2;
}
.kicker.celebrate-bounce {
  animation: goalBounce 0.5s ease-in-out 4;
}
.kicker.celebrate-wiggle {
  animation: goalWiggle 0.28s ease-in-out 7;
}
.goal-celebration {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}
.goal-celebration i {
  position: absolute;
  left: var(--x);
  top: -2rem;
  color: #ffdc3d;
  font-style: normal;
  font-size: 1.35rem;
  animation: confettiFall 1.4s var(--delay) ease-in both;
}
.goal-celebration:not(.show) {
  display: none;
}
@keyframes goalSpin {
  50% {
    transform: translateX(2rem) rotate(360deg) scale(1.18);
  }
}
@keyframes goalBounce {
  50% {
    transform: translateY(-2.5rem) scale(1.12);
  }
}
@keyframes goalWiggle {
  25% {
    transform: rotate(-16deg);
  }
  75% {
    transform: rotate(16deg);
  }
}
@keyframes confettiFall {
  to {
    transform: translateY(410px) rotate(520deg);
    opacity: 0;
  }
}
.power-area {
  margin-top: 1rem;
}
.power-track {
  height: 1.4rem;
  background: linear-gradient(
    90deg,
    #e04343,
    #ffcb36 38%,
    #35ad63 62%,
    #35ad63 85%,
    #e04343
  );
  border-radius: 0.7rem;
  position: relative;
  overflow: hidden;
}
.power-track i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.28rem;
  background: #fff;
  border: 2px solid #142019;
  box-shadow: 0 0 0.4rem #0006;
  transform: translateX(0);
}
.sweet-spot {
  position: absolute;
  left: 62%;
  width: 23%;
  top: 0;
  bottom: 0;
  border-left: 2px solid #fff8;
  border-right: 2px solid #fff8;
}
.power-area button,
.next-penalty {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0.8rem;
  background: #168348;
  color: #fff;
  font: inherit;
  font-weight: 900;
  padding: 0.85rem;
  margin-top: 0.65rem;
  cursor: pointer;
}
.power-area button:disabled {
  background: #a9b7aa;
  cursor: not-allowed;
}
.power-area button.moving {
  background: #e43f3f;
}
.penalty-message {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
  min-height: 1.5rem;
  margin: 1rem 0 0.4rem;
}
.penalty-message.goal-text {
  color: #168348;
}
.penalty-message.miss-text {
  color: #d03b3b;
}
.next-penalty {
  background: #142019;
}
.next-penalty[hidden] {
  display: none;
}
.dark .penalty-game {
  background: #16291d;
  color: #fff;
}
.dark .penalty-head > p:last-child {
  color: #b9c9bd;
}
.dark .penalty-panel {
  background: #1c2b21;
  border-color: #38533f;
}
.dark .kicker-choices button {
  background: #293b2e;
  color: #fff;
}
.dark .kicker-choices button.active {
  background: #245d39;
}
.dark .pokemon-picker {
  background: #223629;
  border-color: #38533f;
}
.dark .pokemon-picker input {
  background: #15251b;
  color: #fff;
  border-color: #496952;
}
.dark .pokemon-picker p {
  color: #b9c9bd;
}
@media (max-width: 820px) {
  .penalty-game {
    grid-template-columns: 1fr;
    margin-bottom: 4rem;
  }
  .penalty-head {
    position: static;
  }
  .kicker-choices {
    grid-template-columns: repeat(3, 1fr);
  }
  .pitch {
    min-height: 350px;
  }
}
@media (max-width: 480px) {
  .goal {
    left: 6%;
    right: 6%;
  }
  .pitch {
    min-height: 320px;
  }
  .aim {
    width: 2.2rem;
    height: 2.2rem;
  }
  .kicker {
    width: 34%;
    left: 2%;
  }
}
