/* Easter Egg - WipEout (1995) WebAssembly Modal & Controls */

/* Avatar easter egg glitch state */
.profile-avatar.egg-pulse {
  animation: egg-glitch 200ms ease infinite alternate;
}

.profile-avatar {
  touch-action: manipulation;
  cursor: pointer;
}

@keyframes egg-glitch {
  0% {
    transform: scale(1) translate(0, 0);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: scale(1.04) translate(-2px, 1px);
    filter: hue-rotate(90deg) contrast(1.2);
  }
  100% {
    transform: scale(0.98) translate(2px, -1px);
    filter: hue-rotate(180deg);
  }
}

/* Flash Banner on trigger */
.wipeout-egg-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #0a0e14;
  color: #00f0ff;
  border: 1px solid #00f0ff;
  border-radius: 999px;
  box-shadow:
    0 4px 20px rgba(0, 240, 255, 0.35),
    0 0 10px rgba(0, 240, 255, 0.2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
  animation: banner-enter 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wipeout-egg-banner[hidden] {
  display: none !important;
}

.wipeout-egg-banner .banner-glitch-icon {
  color: #ffd000;
  animation: blink 400ms infinite;
}

@keyframes banner-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* Modal Dialog */
.wipeout-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(8, 10, 15, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e4ec;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow: hidden;
}

.wipeout-modal:not([open]) {
  display: none !important;
}

.wipeout-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.wipeout-frame {
  display: flex;
  flex-direction: column;
  width: min(100vw, 1160px);
  height: min(100vh, 740px);
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 240, 255, 0.15);
  overflow: hidden;
}

/* Header */
.wipeout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #141820;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  gap: 12px;
}

.wipeout-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wipeout-tag-prefix {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 0.05em;
}

.wipeout-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.wipeout-badge {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.wipeout-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.wipeout-tool-btn,
.wipeout-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
  transition: all 120ms ease;
  min-height: 32px;
}

.wipeout-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.wipeout-close-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ff8888;
}

.wipeout-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.6);
}

/* Viewport & Canvas */
.wipeout-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: hidden;
}

.wipeout-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000000;
  outline: none;
}

/* Audio Track Toast HUD */
.wipeout-track-toast {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 8px;
  z-index: 18;
  pointer-events: none;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(0, 240, 255, 0.25);
  animation: toast-in 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wipeout-track-toast[hidden] {
  display: none !important;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wipeout-track-toast .track-icon {
  font-size: 14px;
  color: #00f0ff;
  animation: bounce 600ms infinite alternate ease-in-out;
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2px);
  }
}

.wipeout-track-toast .track-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wipeout-track-toast .track-name {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.wipeout-track-toast .track-artist {
  font-family: ui-monospace, monospace;
  font-size: 9.5px;
  color: #00f0ff;
  letter-spacing: 0.02em;
}

/* Loader */
.wipeout-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000000;
  z-index: 10;
  gap: 16px;
  padding: 24px;
}

.wipeout-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00f0ff;
  border-right-color: #ffd000;
  animation: spinner-spin 900ms linear infinite;
}

@keyframes spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

.wipeout-loader-status {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-align: center;
}

.wipeout-progress-bar {
  width: min(280px, 80%);
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.wipeout-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff, #ffd000);
  border-radius: 999px;
  transition: width 150ms ease;
}

.wipeout-loader-sub {
  font-size: 11px;
  color: #7d8590;
  letter-spacing: 0.04em;
}

/* Crash Recovery Overlay */
.wipeout-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wipeout-error-overlay[hidden] {
  display: none !important;
}

.wipeout-error-box {
  width: min(440px, 100%);
  background: #141820;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(239, 68, 68, 0.2);
}

.wipeout-error-box .error-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #ff8888;
  font-size: 10.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  margin-bottom: 12px;
}

.wipeout-error-box h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.wipeout-error-box p {
  margin: 0 0 20px 0;
  font-size: 12.5px;
  color: #8b949e;
  line-height: 1.5;
}

.wipeout-error-box .error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.wipeout-btn-secondary {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #c9d1d9;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.wipeout-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Controls Help Drawer */
.wipeout-help-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.wipeout-help-overlay[hidden] {
  display: none !important;
}

.wipeout-help-box {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  background: #141820;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.help-box-header h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.help-box-header .help-sub {
  font-size: 11.5px;
  color: #8b949e;
}

.wipeout-help-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.help-section-title {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 0.04em;
}

.wipeout-help-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #c9d1d9;
}

.help-keys {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}

.help-keys kbd,
.wipeout-controls-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #f0f6fc;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.kbd-touch {
  background: rgba(0, 240, 255, 0.15) !important;
  border-color: rgba(0, 240, 255, 0.35) !important;
  color: #00f0ff !important;
  font-weight: 700;
}

.kbd-thrust {
  background: rgba(0, 240, 255, 0.25) !important;
  border-color: #00f0ff !important;
  color: #00f0ff !important;
}

.kbd-shoot {
  background: rgba(255, 80, 80, 0.25) !important;
  border-color: #ff5050 !important;
  color: #ff8888 !important;
}

.kbd-brake {
  background: rgba(255, 208, 0, 0.18) !important;
  border-color: #ffd000 !important;
  color: #ffd000 !important;
}

.help-gamepad-desc {
  margin: 0;
  font-size: 11.5px;
  color: #8b949e;
  line-height: 1.6;
}

.help-box-footer {
  margin-top: 4px;
}

.wipeout-btn-primary {
  width: 100%;
  padding: 9px 16px;
  background: #00f0ff;
  color: #040910;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.wipeout-btn-primary:hover {
  opacity: 0.9;
}

/* Footer Hint Bar */
.wipeout-footer {
  padding: 6px 16px;
  background: #141820;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.wipeout-controls-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #8b949e;
}

.wipeout-controls-hint .hint-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.wipeout-controls-hint .hint-group-p1 {
  border: 1px solid rgba(0, 240, 255, 0.28);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.08);
}

.wipeout-controls-hint .hint-group-p2 {
  border: 1px solid rgba(255, 170, 0, 0.28);
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.08);
}

.wipeout-controls-hint .hint-group-system {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.wipeout-controls-hint .hint-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
}

.wipeout-controls-hint .hint-group-p1 .hint-tag {
  background: rgba(0, 240, 255, 0.16);
  color: #00f0ff;
}

.wipeout-controls-hint .hint-group-p2 .hint-tag {
  background: rgba(255, 170, 0, 0.18);
  color: #ffaa00;
}

.wipeout-controls-hint .hint-separator {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.18);
}

/* Touch Controls for Mobile / Tablets */
.wipeout-touch-controls {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Show touch controls on touch / coarse pointer devices or narrow screens */
@media (pointer: coarse), (max-width: 820px) {
  .wipeout-touch-controls {
    display: block;
  }
  .wipeout-footer {
    display: none;
  }
}

.touch-side {
  position: absolute;
  bottom: 12px;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Left side cluster */
.touch-side-left {
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* Virtual Analog Joystick */
.touch-joystick-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.touch-joystick-base {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 24, 38, 0.88) 0%, rgba(5, 10, 18, 0.94) 100%);
  border: 2px solid rgba(0, 240, 255, 0.45);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.6),
    inset 0 0 16px rgba(0, 240, 255, 0.18);
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.touch-joystick-base:active {
  cursor: grabbing;
  border-color: #00f0ff;
  box-shadow:
    0 8px 28px rgba(0, 240, 255, 0.35),
    inset 0 0 20px rgba(0, 240, 255, 0.3);
}

.touch-joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  margin-left: -25px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #00f0ff, #0088cc 60%, #004466 100%);
  border: 2.5px solid #ffffff;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.7);
  pointer-events: none;
  will-change: transform;
}

.touch-joystick-knob::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px #ffffff;
}

.joystick-tick {
  position: absolute;
  font-size: 11px;
  color: rgba(0, 240, 255, 0.5);
  pointer-events: none;
  user-select: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  transition:
    color 80ms ease,
    text-shadow 80ms ease;
}

.joystick-tick.active {
  color: #00f0ff;
  text-shadow:
    0 0 8px #00f0ff,
    0 0 16px rgba(0, 240, 255, 0.85);
}

.joystick-tick.tick-u {
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
}
.joystick-tick.tick-d {
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}
.joystick-tick.tick-l {
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
}
.joystick-tick.tick-r {
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.touch-dpad-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.touch-horiz {
  display: flex;
  gap: 36px;
}

/* Right side cluster */
.touch-side-right {
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Auto-Fire Toggle Button */
.touch-autofire {
  width: auto;
  min-height: 32px;
  padding: 3px 12px;
  background: rgba(20, 25, 35, 0.85);
  border: 1.5px solid rgba(255, 208, 0, 0.45);
  color: #ffd000;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.touch-autofire.active,
.touch-autofire[data-autofire="true"] {
  background: rgba(255, 208, 0, 0.28);
  border-color: #ffd000;
  box-shadow: 0 0 14px rgba(255, 208, 0, 0.6);
  color: #ffffff;
}

/* Special Bomb Button (A) */
.touch-btn.touch-bomb {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 120, 50, 0.45), rgba(180, 40, 20, 0.65));
  border: 2px solid #ff6633;
  color: #ffffff;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(255, 102, 51, 0.4);
}

.touch-btn.touch-bomb .action-main {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1;
}

.touch-btn.touch-bomb:active,
.touch-btn.touch-bomb.active {
  background: #ff6633 !important;
  box-shadow: 0 0 24px rgba(255, 102, 51, 0.85) !important;
}

.touch-actions-cluster {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

/* Center top utilities */
.touch-center-top {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  display: flex;
  gap: 10px;
  z-index: 16;
}

/* Common Touch Button Styling */
.touch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 60ms ease,
    background 60ms ease,
    box-shadow 60ms ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.touch-btn:active,
.touch-btn.active {
  transform: scale(0.92) !important;
}

/* D-pad buttons */
.touch-dpad {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 16px;
  border-radius: 10px;
}

.touch-dpad:active,
.touch-dpad.active {
  background: rgba(0, 240, 255, 0.45);
  border-color: #00f0ff;
  color: #ffffff;
}

/* Airbrake buttons */
.touch-brake {
  height: 38px;
  min-width: 104px;
  padding: 0 12px;
  background: rgba(0, 240, 255, 0.14);
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  gap: 6px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(0, 240, 255, 0.15);
}

.touch-brake:active,
.touch-brake.active {
  background: rgba(0, 240, 255, 0.55);
  border-color: #00f0ff;
  color: #040910;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}

/* Action buttons */
.touch-action {
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

/* Thrust (Accelerate) - Primary Action */
.touch-thrust {
  width: 66px;
  height: 66px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.35) 0%, rgba(0, 160, 200, 0.18) 100%);
  border: 2px solid #00f0ff;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(0, 240, 255, 0.4);
}

.touch-thrust .action-main {
  font-size: 14px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 0.04em;
  line-height: 1;
}

.touch-thrust .action-sub {
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  font-family: ui-monospace, monospace;
  line-height: 1;
}

.touch-thrust:active,
.touch-thrust.active {
  background: #00f0ff;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.85);
}

.touch-thrust:active .action-main,
.touch-thrust.active .action-main {
  color: #040910;
}

.touch-thrust:active .action-sub,
.touch-thrust.active .action-sub {
  color: rgba(4, 9, 16, 0.8);
}

/* Shoot (Button B) */
.touch-shoot {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin-bottom: 0;
  background: radial-gradient(circle, rgba(255, 80, 80, 0.45) 0%, rgba(180, 30, 30, 0.65) 100%);
  border: 2px solid #ff5050;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(255, 80, 80, 0.35);
}

.touch-shoot .action-main {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1;
}

.touch-shoot:active,
.touch-shoot.active {
  background: #ff5050;
  box-shadow: 0 0 20px rgba(255, 80, 80, 0.85);
}

.touch-shoot:active .action-main,
.touch-shoot.active .action-main {
  color: #ffffff;
}

/* Utility Pills (Camera & Pause) */
.touch-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(10, 14, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e0e4ec;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  gap: 5px;
}

.touch-pill .pill-icon {
  font-size: 12px;
}

.touch-pill:active,
.touch-pill.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: #ffffff;
}

.touch-pill.touch-p2 {
  border-color: rgba(0, 240, 255, 0.4);
  color: #00f0ff;
}

.touch-pill.touch-p2:active,
.touch-pill.touch-p2.active {
  background: rgba(0, 240, 255, 0.3);
  border-color: #00f0ff;
  color: #ffffff;
}

/* Fullscreen mode adjustments (Desktop & Mobile) */
.wipeout-modal.is-fullscreen,
:fullscreen,
:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #000000 !important;
  z-index: 100000 !important;
}

.wipeout-modal.is-fullscreen .wipeout-frame,
:fullscreen .wipeout-frame,
:-webkit-full-screen .wipeout-frame {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
}

.wipeout-modal.is-fullscreen .wipeout-header,
:fullscreen .wipeout-header,
:-webkit-full-screen .wipeout-header {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 30 !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%) !important;
  border-bottom: none !important;
  padding: 8px 14px !important;
}

.wipeout-modal.is-fullscreen .wipeout-viewport,
:fullscreen .wipeout-viewport,
:-webkit-full-screen .wipeout-viewport {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
}

.wipeout-modal.is-fullscreen .wipeout-viewport canvas,
:fullscreen .wipeout-viewport canvas,
:-webkit-full-screen .wipeout-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Small Viewports (Mobile Phones <= 480px) */
@media (max-width: 480px) {
  .wipeout-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .wipeout-header {
    padding: 6px 10px;
  }
  .wipeout-title-group .wipeout-tag-prefix,
  .wipeout-title-group .wipeout-badge {
    display: none;
  }
  .wipeout-tool-btn .btn-text {
    display: none;
  }
  .wipeout-tool-btn {
    padding: 6px;
  }
  .touch-side-left {
    left: 8px;
    bottom: 8px;
    gap: 6px;
  }
  .touch-side-right {
    right: 8px;
    bottom: 8px;
    gap: 6px;
  }
  .touch-dpad {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }
  .touch-horiz {
    gap: 26px;
  }
  .touch-brake {
    height: 32px;
    min-width: 86px;
    padding: 0 8px;
    font-size: 10px;
  }
  .touch-thrust {
    width: 58px;
    height: 58px;
  }
  .touch-thrust .action-main {
    font-size: 12.5px;
  }
  .touch-shoot {
    width: 48px;
    height: 48px;
  }
  .touch-shoot .action-main {
    font-size: 10.5px;
  }
}
