/* System Override is independent of the Hunter experiment. */
#level-select-modal {
  position: fixed;
  inset: 16px;
  margin: auto;
  width: calc(100% - 32px);
  max-width: 340px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  overflow-y: auto;
  touch-action: pan-y;
  padding: clamp(20px, 4vw, 30px);
  background: #0d0d15;
  color: #fff;
  border: 2px solid var(--warning-color);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(255, 136, 0, 0.45);
  text-align: center;
}

#level-select-modal:not([open]) { display: none; }

#level-select-modal::backdrop {
  background-color: rgba(8, 4, 2, 0.98);
  background-image: radial-gradient(ellipse at center,
    rgba(255, 136, 0, 0.21) 0%,
    rgba(170, 65, 0, 0.12) 55%,
    rgba(80, 26, 0, 0.06) 100%);
  animation: override-opening 450ms ease-in-out 3 both;
}

@keyframes override-opening {
  0%, 100% { background-color: rgba(8, 4, 2, 0.98); }
  40% { background-color: rgba(82, 31, 4, 0.99); }
}

#level-select-modal h2 {
  color: var(--warning-color);
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  margin: 0 0 20px;
  text-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

#level-select-modal label { display: block; font-size: 0.8rem; line-height: 1.6; }
#overrideDescription { font-family: "Segoe UI", sans-serif; font-size: 0.9rem; line-height: 1.5; }

#levelInput {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--warning-color);
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  padding: 10px;
  width: 80px;
  text-align: center;
  margin: 14px 0 24px;
  border-radius: 5px;
}

.level-btn-group { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.level-action-btn {
  background: rgba(255, 136, 0, 0.14);
  border: 2px solid var(--warning-color);
  color: var(--warning-color);
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.level-action-btn:hover { background: var(--warning-color); color: #000; box-shadow: 0 0 15px rgba(255, 136, 0, 0.5); }
#levelInput:focus-visible, .level-action-btn:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  #level-select-modal::backdrop { animation: none; }
  .level-action-btn { transition: none; }
}
