/* ── Polish layer: stadium feel + smoother motion ── */

.field {
  perspective: 900px;
  background: linear-gradient(180deg, #0a2812 0%, #062010 45%, #041408 100%);
}

.field::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 220, 120, 0.14), transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(0, 0, 0, 0.55), transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.field-ambient {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015) 0,
    rgba(255, 255, 255, 0.015) 2px,
    transparent 2px,
    transparent 6px
  );
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}

.field-flood {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 38%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 245, 200, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 3;
  animation: floodPulse 4s ease-in-out infinite;
}

@keyframes floodPulse {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

.penalty-spot {
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  z-index: 12;
  pointer-events: none;
}

.penalty-spot::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.field.field-kick {
  animation: fieldKick 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fieldKick {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.018);
  }
  100% {
    transform: scale(1);
  }
}

.field.field-goal-shake {
  animation: goalShake 0.35s ease;
}

@keyframes goalShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.goal {
  width: min(68vw, 340px);
  height: min(30vh, 150px);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
  transition: transform 0.35s ease;
}

.goal-frame {
  border-width: 4px;
  box-shadow:
    0 0 24px rgba(255, 255, 255, 0.15),
    inset 0 -8px 20px rgba(0, 0, 0, 0.25);
}

.ball {
  width: 32px;
  height: 32px;
  background-color: #f3f4f6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='s' cx='35%25' cy='30%25' r='65%25'%3E%3Cstop offset='0%25' stop-color='%23fff'/%3E%3Cstop offset='55%25' stop-color='%23e5e7eb'/%3E%3Cstop offset='100%25' stop-color='%23b8bcc4'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='32' cy='32' r='31' fill='url(%23s)'/%3E%3Cpath fill='%23111827' d='M32 6l8.2 6.8L42 22l-10 3.2L22 22l1.8-9.2L32 6z'/%3E%3Cpath fill='%23111827' d='M14 26l7.5 5.5-1 9.5-8.8 3.5-7.5-5.5 1.8-9.2L14 26z'/%3E%3Cpath fill='%23111827' d='M50 26l7.5 5.5-1.8 9.2-7.5 5.5L40 41l1-9.5L50 26z'/%3E%3Cpath fill='%23111827' d='M20 48l6.5-4.5L32 48l5.5-4.5L44 48l-2 10H22l-2-10z'/%3E%3Cpath fill='%23111827' d='M32 28l6 4.5-1.2 7.5L32 42l-4.8-2-1.2-7.5L32 28z'/%3E%3Ccircle cx='32' cy='32' r='31' fill='none' stroke='rgba(0,0,0,0.12)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    inset 0 -3px 8px rgba(0, 0, 0, 0.18);
}

.ball.flight {
  transition: none;
}

.ball-trail {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 14;
  opacity: 0;
  filter: blur(2px);
}

.keeper {
  width: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.keeper-head {
  width: 30px;
  height: 30px;
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.08);
}

.keeper-body {
  width: 44px;
  height: 32px;
  background: linear-gradient(155deg, #fbbf24, #ea580c);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.sz:hover:not(.disabled) {
  background: rgba(38, 179, 106, 0.16);
  box-shadow: inset 0 0 20px rgba(38, 179, 106, 0.12);
}

.diff-screen {
  animation: diffIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes diffIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.diff-card {
  transform: translateY(0);
  animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.diff-card:nth-child(1) {
  animation-delay: 0.05s;
}
.diff-card:nth-child(2) {
  animation-delay: 0.12s;
}
.diff-card:nth-child(3) {
  animation-delay: 0.19s;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diff-card:hover {
  transform: translateY(-2px) scale(1.01);
}

.msg-ov.show .msg-box {
  animation: popIn 0.22s ease;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.instr {
  animation: instrPulse 2.5s ease-in-out infinite;
}

@keyframes instrPulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-flood,
  .field.field-kick,
  .field.field-goal-shake,
  .diff-screen,
  .diff-card,
  .instr {
    animation: none !important;
  }
}
