[data-world-cup-root] {
  max-width: min(96rem, 100%);
}

[data-world-cup-layout],
[data-world-cup-selector],
[data-world-cup-stage],
[data-world-cup-below] {
  min-width: 0;
}

[data-world-cup-selector] [data-model-picker-trigger] {
  min-height: 3rem;
}

[data-world-cup-picker-row] {
  grid-template-columns: minmax(0, 1fr);
}

[data-world-cup-swap] svg {
  flex: 0 0 auto;
}

[data-world-cup-swap] {
  min-width: 3rem;
}

[data-world-cup-start] {
  min-height: 3.5rem;
  min-width: min(15rem, 100%);
  border-color: rgb(14 116 144) !important;
  background: rgb(14 116 144) !important;
  padding: 0.75rem 2rem !important;
  color: #fff !important;
  font-size: 1rem;
  font-weight: 900;
}

[data-world-cup-start-layer] {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 15;
  pointer-events: none;
}

[data-world-cup-start-layer] [data-world-cup-start] {
  min-height: 4.5rem;
  min-width: min(23rem, 90%);
  font-size: 1.25rem;
  pointer-events: auto;
}

[data-world-cup-root][data-match-view="field"] [data-world-cup-start-layer] {
  display: none;
}

[data-world-cup-start]:hover {
  background: rgb(21 94 117) !important;
}

[data-world-cup-start]:disabled {
  cursor: wait;
  opacity: 0.65;
}

[data-world-cup-setup-speed] {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

[data-world-cup-setup-speed] button {
  transition: background 0.18s ease, color 0.18s ease;
}

[data-world-cup-metrics] {
  display: grid;
  gap: 0.375rem;
}

[data-world-cup-metric] {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 0.35rem 0.45rem;
  align-items: center;
}

[data-world-cup-metric] span:nth-child(1) {
  grid-row: auto;
}

[data-world-cup-metric] span:nth-child(3),
[data-world-cup-metric] span:nth-child(5) {
  justify-self: end;
}

[data-world-cup-log] {
  max-height: 11rem;
  min-height: 6rem;
  overflow-y: auto;
  white-space: pre-wrap;
}

.aibenchy-worldcup-field canvas {
  min-height: 0 !important;
  aspect-ratio: 16 / 11;
}

[data-world-cup-stage] canvas {
  min-height: 24rem;
  max-height: calc(100vh - 20rem);
  object-fit: contain;
}

[data-world-cup-hud] {
  position: absolute;
  top: 0.25rem;
  right: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  grid-template-columns: auto auto auto !important;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  align-items: start;
  pointer-events: none;
  background: transparent;
  border-bottom: 0;
}

[data-world-cup-hud] > div {
  border-radius: 0.375rem;
  background: rgba(2, 6, 23, 0.72);
  padding: 0.28rem 0.55rem;
}

[data-world-cup-hud] > div:nth-child(2) {
  padding: 0.32rem 0.8rem;
  pointer-events: auto;
}

[data-world-cup-hud] > div:first-child,
[data-world-cup-hud] > div:nth-child(3) {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: fit-content;
  max-width: min(25rem, 100%);
  --world-cup-team-color: rgb(34 211 238);
}

[data-world-cup-hud] > div:first-child {
  padding-left: 0.85rem;
}

[data-world-cup-hud] > div:nth-child(3) {
  justify-self: start;
  padding-right: 0.85rem;
}

[data-world-cup-hud] > div:first-child::before,
[data-world-cup-hud] > div:nth-child(3)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.32rem;
  background: var(--world-cup-team-color);
  box-shadow: 0 0 0.75rem color-mix(in srgb, var(--world-cup-team-color), transparent 45%);
}

[data-world-cup-hud] > div:first-child::before {
  left: 0;
}

[data-world-cup-hud] > div:nth-child(3)::after {
  right: 0;
}

.aibenchy-worldcup-speed-float {
  position: absolute;
  top: 4.9rem;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  pointer-events: auto;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

[data-world-cup-speed][data-active='true'] {
  background: rgb(14 116 144);
  color: white;
}

.dark [data-world-cup-speed][data-active='true'] {
  background: rgb(34 211 238);
  color: rgb(2 6 23);
}

[data-world-cup-goal-banner] {
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 1rem;
}

[data-world-cup-goal-banner] span {
  display: block;
  max-width: 100%;
  border: 0 !important;
  background: transparent !important;
  padding: 0.12em 0 !important;
  color: #fff !important;
  text-align: center;
  text-shadow: 0 0.08em 0.18em rgba(2, 6, 23, 0.85);
  font-size: clamp(2.9rem, 11vw, 11rem) !important;
  line-height: 1.08;
  letter-spacing: 0.04em;
  white-space: normal;
  animation: aibenchy-field-banner 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

[data-world-cup-goal-banner][data-hiding="true"] span {
  animation: aibenchy-field-banner-out 0.26s ease-in forwards;
}

[data-world-cup-postgame] {
  align-items: center;
  justify-items: center;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(10px);
}

@keyframes aibenchy-field-banner {
  0% {
    transform: translateY(0.28em) scale(0.92);
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  58% {
    transform: translateY(0) scale(1.02);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes aibenchy-field-banner-out {
  to {
    transform: translateY(-0.18em) scale(0.98);
    opacity: 0;
  }
}

.aibenchy-worldcup-intro[hidden],
[data-world-cup-terminals][hidden] {
  display: none;
}

.dark [data-world-cup-start] {
  border-color: rgb(34 211 238) !important;
  background: rgb(34 211 238) !important;
  color: rgb(2 6 23) !important;
}

.dark [data-world-cup-start]:hover {
  background: rgb(103 232 249) !important;
}

@media (max-width: 767px) {
  [data-world-cup-main] {
    left: auto;
    width: 100%;
    transform: none;
    padding-inline: 0;
  }

  [data-world-cup-root] {
    width: 100%;
    max-width: 100%;
  }

  [data-world-cup-swap] {
    justify-self: center;
  }

  [data-world-cup-start-layer] [data-world-cup-start] {
    min-width: min(16rem, 100%);
  }

  [data-world-cup-stage] canvas {
    min-height: 16rem;
    max-height: none;
  }

  [data-world-cup-hud] {
    top: 0.2rem;
    right: 0.5rem;
    left: 0.5rem;
    padding: 0;
  }

  .aibenchy-worldcup-speed-float {
    top: 6.75rem;
  }

  [data-world-cup-hud] > div:nth-child(3) {
    text-align: left;
  }
}

@media (min-width: 768px) {
  [data-world-cup-picker-row] {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  }

  [data-world-cup-swap] {
    margin-top: 1.55rem;
    align-self: end;
  }
}

@media (min-width: 1024px) {
  [data-world-cup-log] {
    max-height: clamp(7rem, 20vh, 12rem);
  }
}

@media (min-width: 1280px) {
  [data-world-cup-stage] canvas {
    max-height: calc(100vh - 19rem);
  }
}
