/* V1.325Beta: premium practice chooser, single-owner room surfaces, and clean seat cards. */

.practice-mode-dialog[hidden] {
  display: none !important;
}

.practice-mode-dialog {
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 12%, rgba(89, 211, 255, 0.2), transparent 38%),
    radial-gradient(circle at 18% 78%, rgba(246, 191, 76, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(3, 10, 21, 0.78), rgba(2, 7, 16, 0.94)) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.12) !important;
  backdrop-filter: blur(16px) saturate(1.12) !important;
}

.practice-mode-shell {
  isolation: isolate;
  width: min(1080px, calc(100vw - 40px)) !important;
  padding: clamp(28px, 3.7vw, 46px) !important;
  overflow: hidden auto !important;
  border: 1px solid rgba(128, 221, 255, 0.55) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(90deg, rgba(4, 15, 29, 0.97) 0%, rgba(5, 20, 36, 0.9) 46%, rgba(4, 15, 29, 0.7) 100%),
    url("assets/ui/lobby-bot-practice-solid-fast.webp?v=V1.325Beta-practice-room-recovery1") center / cover no-repeat !important;
  box-shadow:
    0 34px 96px rgba(0, 0, 0, 0.58),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 70px rgba(33, 179, 226, 0.08),
    0 0 0 1px rgba(246, 196, 82, 0.13) !important;
}

.practice-mode-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(2, 10, 22, 0.72), transparent 58%),
    radial-gradient(circle at 86% 24%, rgba(67, 222, 242, 0.13), transparent 31%);
}

.practice-mode-kicker {
  color: #ffd46c !important;
  letter-spacing: 0.28em !important;
  text-shadow: 0 0 16px rgba(255, 205, 93, 0.28) !important;
}

.practice-mode-shell h2 {
  font-size: clamp(30px, 3.4vw, 44px) !important;
  letter-spacing: 0.015em;
  text-shadow:
    0 3px 18px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(85, 205, 255, 0.2) !important;
}

.practice-mode-shell > p {
  margin-bottom: 26px !important;
  color: rgba(229, 246, 255, 0.88) !important;
  font-size: 14px !important;
}

.practice-mode-options {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(13px, 1.6vw, 20px) !important;
}

.practice-mode-option {
  --practice-card-art: url("assets/ui/mode-1v1-gpt2-fast.webp?v=V1.325Beta-practice-room-recovery1");
  isolation: isolate;
  min-height: clamp(218px, 24vw, 284px) !important;
  padding: 24px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  overflow: hidden !important;
  border: 1px solid rgba(128, 220, 255, 0.48) !important;
  border-radius: 20px !important;
  color: #f7fbff !important;
  background:
    linear-gradient(180deg, rgba(2, 9, 20, 0.03) 20%, rgba(3, 12, 25, 0.5) 58%, rgba(3, 10, 21, 0.96) 100%),
    var(--practice-card-art) 64% center / cover no-repeat !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -34px 54px rgba(0, 0, 0, 0.23),
    0 16px 34px rgba(0, 0, 0, 0.3) !important;
  text-align: left !important;
  transform: translateZ(0);
}

.practice-mode-option[data-practice-mode="3v3"] {
  --practice-card-art: url("assets/ui/mode-3v3-gpt2-fast.webp?v=V1.325Beta-practice-room-recovery1");
  border-color: rgba(246, 190, 80, 0.48) !important;
}

.practice-mode-option[data-practice-mode="identity"] {
  --practice-card-art: url("assets/ui/mode-identity-gpt2-fast.webp?v=V1.325Beta-practice-room-recovery1");
  border-color: rgba(189, 135, 255, 0.55) !important;
}

.practice-mode-option::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: -1 !important;
  display: block !important;
  pointer-events: none !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: inherit !important;
  background:
    linear-gradient(100deg, rgba(2, 8, 18, 0.78) 0%, rgba(2, 8, 18, 0.18) 60%, transparent 100%) !important;
}

.practice-mode-option::after {
  content: "›" !important;
  position: absolute !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  border: 1px solid rgba(255, 220, 133, 0.5) !important;
  border-radius: 50% !important;
  color: #ffe1a0 !important;
  background: rgba(4, 16, 30, 0.72) !important;
  box-shadow: 0 0 18px rgba(77, 207, 245, 0.14) !important;
  font: 800 25px/1 system-ui, sans-serif !important;
}

.practice-mode-option > span,
.practice-mode-option > strong,
.practice-mode-option > small {
  position: relative !important;
  z-index: 2 !important;
  max-width: calc(100% - 40px) !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.76) !important;
}

.practice-mode-option > span {
  color: #ffd36c !important;
  font-size: clamp(28px, 2.65vw, 38px) !important;
  line-height: 1 !important;
}

.practice-mode-option > strong {
  font-size: 19px !important;
}

.practice-mode-option > small {
  color: rgba(226, 243, 253, 0.82) !important;
  font-size: 12px !important;
}

.practice-mode-option:not(:disabled):hover,
.practice-mode-option:not(:disabled):focus-visible {
  border-color: rgba(255, 219, 126, 0.94) !important;
  filter: brightness(1.08) saturate(1.08) !important;
  transform: translateY(-4px) translateZ(0) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 20px 42px rgba(0, 0, 0, 0.4),
    0 0 26px rgba(84, 207, 246, 0.15) !important;
}

.practice-mode-option:not(:disabled):focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(112, 211, 255, 0.42),
    0 0 0 6px rgba(246, 211, 126, 0.24),
    0 20px 42px rgba(0, 0, 0, 0.4) !important;
}

.practice-mode-option:disabled {
  filter: none !important;
  transform: none !important;
}

.practice-mode-close {
  z-index: 8 !important;
  border-color: rgba(151, 224, 255, 0.48) !important;
  background: rgba(3, 15, 28, 0.86) !important;
}

/* One paint owner per room. Old mode covers and hidden screens must never bleed through. */
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app > .arena {
  isolation: isolate !important;
  background-color: #dceaf4 !important;
  background-image:
    linear-gradient(180deg, rgba(13, 40, 67, 0.3), rgba(25, 58, 86, 0.08) 30%, rgba(255, 255, 255, 0.02) 62%, rgba(16, 43, 69, 0.2)),
    url("assets/ui/room-lobby/room-lobby-minimal-celestial-v1.webp?v=V1.325Beta-practice-room-recovery1") !important;
  background-position: center, center !important;
  background-size: cover, cover !important;
  background-repeat: no-repeat, no-repeat !important;
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app::before,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app::after,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app > .arena::before,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app > .arena::after,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app #roomLobby#roomLobby.room-lobby::before,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app #roomLobby#roomLobby.room-lobby::after,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app #roomSeatGrid#roomSeatGrid.room-seat-grid::before,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app #roomSeatGrid#roomSeatGrid.room-seat-grid::after {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  pointer-events: none !important;
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app #roomLobby#roomLobby.room-lobby:not([hidden]),
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app #roomSeatGrid#roomSeatGrid.room-seat-grid {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app
  > .arena
  > :is(#lobby, #roomLobby, #identitySelect, #characterSelect, #battle)[hidden],
html body:not(.maintenance-mode)
  :is(#roomLobby, #practiceModeDialog, #rulesDialog, #gameCodexDialog, #professionCodexDialog, #characterCodexDialog)[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* The home lobby kept display:grid after entering a room; its illustrated buttons
   were the apparent "extra frames" underneath every room. State class wins here. */
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app > .arena > #lobby#lobby.lobby,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.character-select-app > .arena > #lobby#lobby.lobby,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.identity-select-app > .arena > #lobby#lobby.lobby,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.battle-app > .arena > #lobby#lobby.lobby {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  .practice-mode-dialog {
    place-items: center !important;
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left)) !important;
  }

  .practice-mode-shell {
    width: 100% !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 24px 14px 15px !important;
    border-radius: 22px !important;
    background:
      linear-gradient(90deg, rgba(4, 15, 29, 0.96), rgba(5, 20, 36, 0.84)),
      url("assets/ui/lobby-bot-practice-solid-fast.webp?v=V1.325Beta-practice-room-recovery1") 62% center / cover no-repeat !important;
  }

  .practice-mode-kicker {
    margin: 0 42px 4px !important;
  }

  .practice-mode-shell h2 {
    padding: 0 32px;
    font-size: clamp(25px, 7vw, 30px) !important;
  }

  .practice-mode-shell > p {
    margin: 7px auto 13px !important;
    padding: 0 30px !important;
    font-size: 11px !important;
  }

  .practice-mode-options {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .practice-mode-option {
    min-height: 112px !important;
    padding: 13px 56px 13px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 3px !important;
    background:
      linear-gradient(90deg, rgba(2, 9, 20, 0.94) 0%, rgba(2, 9, 20, 0.58) 54%, rgba(2, 9, 20, 0.12) 100%),
      var(--practice-card-art) 66% center / cover no-repeat !important;
  }

  .practice-mode-option > span,
  .practice-mode-option > strong,
  .practice-mode-option > small {
    max-width: 70% !important;
  }

  .practice-mode-option > span {
    font-size: clamp(23px, 6.5vw, 29px) !important;
  }

  .practice-mode-option > strong {
    font-size: 15px !important;
  }

  .practice-mode-option > small {
    font-size: 10px !important;
  }

  .practice-mode-option::after {
    right: 14px !important;
    bottom: 50% !important;
    transform: translateY(50%) !important;
  }

}

@media (max-width: 720px) and (max-height: 700px) {
  .practice-mode-shell {
    padding-top: 18px !important;
    padding-bottom: 11px !important;
  }

  .practice-mode-shell > p {
    margin-bottom: 9px !important;
  }

  .practice-mode-option {
    min-height: 88px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .practice-mode-option {
    transition: none !important;
  }
}
