.save-import-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.78);
  backdrop-filter: blur(2px);
  z-index: 32;
}

.save-import-overlay.is-open {
  display: block;
}

.save-import-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 90%);
  padding: 26px;
  background: rgba(10, 18, 32, 0.95);
  border: 3px solid rgba(90, 170, 255, 0.55);
  border-radius: 16px;
  box-shadow: 0 0 44px rgba(90, 170, 255, 0.35),
    inset 0 0 26px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 33;
}

.save-import-modal.is-open {
  display: flex;
}

.save-import-modal[hidden],
.save-import-overlay[hidden] {
  display: none !important;
}

.save-import-header h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 220, 255, 0.95);
}

.save-import-header p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(210, 235, 255, 0.78);
}

.save-import-label {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(150, 210, 255, 0.85);
}

.save-import-input {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(235, 245, 255, 0.9);
  background: rgba(6, 12, 22, 0.9);
  border: 2px solid rgba(90, 170, 255, 0.45);
  border-radius: 10px;
  padding: 12px;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.save-import-input:focus {
  border-color: rgba(120, 200, 255, 0.9);
  box-shadow: 0 0 24px rgba(90, 170, 255, 0.35);
}

.save-import-message {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.72rem;
  color: rgba(255, 120, 120, 0.9);
}

.save-import-message.is-success {
  color: rgba(130, 255, 180, 0.9);
}

.save-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.save-import-actions button {
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.save-import-cancel {
  border: 2px solid rgba(255, 120, 0, 0.55);
  background: rgba(30, 12, 8, 0.85);
  color: rgba(255, 210, 190, 0.95);
  box-shadow: 0 0 18px rgba(255, 110, 30, 0.28);
}

.save-import-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255, 150, 60, 0.38);
}

.save-import-confirm {
  border: 2px solid rgba(140, 220, 255, 0.85);
  background: linear-gradient(
    180deg,
    rgba(110, 200, 255, 0.96),
    rgba(20, 120, 210, 0.94)
  );
  color: #f2fbff;
  box-shadow: 0 0 26px rgba(90, 170, 255, 0.4);
}

.save-import-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(120, 210, 255, 0.45);
}

:root {
  color-scheme: dark;
  font-family: "Press Start 2P", system-ui, sans-serif;
  --hud-bg: rgba(25, 8, 8, 0.78);
  --hud-border: #ff5c00;
  --hud-shadow: #ff9f0d;
  --hud-text: #ffe5ad;
  --hud-accent: #ff2d00;
  --hud-green: #21ff00;
  --hud-blue: #00e0ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(
    ellipse at top,
    #070e1b 0%,
    #04040b 60%,
    #010104 100%
  );
  color: var(--hud-text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  overflow: auto;
  transform: scale(0.7);
  margin: -180px;
  margin-top: -210px;
}

body,
body * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.game-viewport {
  width: min(1000px, 100vw);
  min-height: min(1000px, 100vh);
  max-width: 1000px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  box-sizing: border-box;
}

.starscape {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#ffffff 0.5px, transparent 0.5px),
    radial-gradient(#90d7ff 0.5px, transparent 0.5px);
  background-size: 100px 100px;
  opacity: 0.25;
  animation: drift 60s linear infinite;
  z-index: 0;
}

.starscape.parallax {
  animation-duration: 90s;
  opacity: 0.15;
  transform: scale(1.5);
}

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.12;
  mix-blend-mode: screen;
}

#starfield-mid {
  z-index: -1;
  opacity: 0.18;
}

#starfield-front {
  z-index: 0;
  opacity: 0.24;
}

.nebula-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(140, 60, 255, 0.28),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(40, 160, 255, 0.22),
      transparent 55%
    ),
    radial-gradient(
      circle at 50% 78%,
      rgba(255, 120, 80, 0.18),
      transparent 60%
    );
  filter: blur(12px);
  opacity: 0.9;
  z-index: -3;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-100px, -100px, 0);
  }
}

#game-root {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  gap: 24px;
  padding: 24px;
  box-sizing: border-box;
  overflow: hidden auto;
  grid-template-rows: auto 1fr auto auto;
  grid-template-columns: 1fr;
}

.settings-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--hud-border);
  background: rgba(35, 12, 12, 0.82);
  color: var(--hud-accent);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(255, 90, 0, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  z-index: 18;
}

.settings-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 0 28px rgba(255, 120, 0, 0.55);
}

.settings-toggle:active {
  transform: scale(0.96);
}

.settings-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 1, 0.75);
  backdrop-filter: blur(2px);
  z-index: 19;
}

.settings-overlay[hidden],
.settings-panel[hidden] {
  display: none !important;
}

.settings-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 90%);
  background: rgba(25, 10, 10, 0.94);
  border: 3px solid var(--hud-border);
  border-radius: 14px;
  box-shadow: 0 0 32px rgba(255, 90, 0, 0.35), inset 0 0 16px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  z-index: 20;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--hud-accent);
}

.settings-close {
  border: 2px solid var(--hud-border);
  border-radius: 8px;
  background: rgba(40, 12, 12, 0.85);
  color: var(--hud-text);
  font-size: 0.9rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.settings-close:hover {
  box-shadow: 0 0 16px rgba(255, 100, 0, 0.45);
}

.settings-close:active {
  transform: scale(0.94);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-row.settings-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 2px solid rgba(255, 90, 90, 0.2);
  border-radius: 12px;
  background: rgba(60, 12, 12, 0.65);
  box-shadow: inset 0 0 18px rgba(90, 0, 0, 0.4);
}

.settings-danger-copy h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 150, 150, 0.95);
}

.settings-danger-copy p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: rgba(255, 215, 215, 0.8);
}

.settings-danger-button {
  border: 2px solid rgba(255, 90, 90, 0.9);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffeaea;
  background: linear-gradient(
    180deg,
    rgba(210, 40, 40, 0.95),
    rgba(120, 10, 10, 0.92)
  );
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 60, 60, 0.3);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.settings-danger-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 120, 120, 0.9);
  box-shadow: 0 0 24px rgba(255, 90, 90, 0.45);
}

.settings-danger-button:active {
  transform: scale(0.97);
}

.settings-danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255, 230, 210, 0.88);
}

.settings-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.settings-mute-button {
  border: 2px solid rgba(255, 200, 120, 0.65);
  border-radius: 10px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 230, 210, 0.95);
  background: linear-gradient(
    180deg,
    rgba(70, 46, 20, 0.92),
    rgba(38, 20, 10, 0.92)
  );
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 200, 120, 0.3);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.settings-mute-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 220, 150, 0.85);
  box-shadow: 0 0 18px rgba(255, 210, 140, 0.45);
}

.settings-mute-button:active {
  transform: scale(0.97);
}

.settings-mute-button[aria-pressed="true"] {
  border-color: rgba(255, 120, 80, 0.9);
  box-shadow: 0 0 18px rgba(255, 120, 80, 0.45);
  background: linear-gradient(
    180deg,
    rgba(120, 32, 18, 0.94),
    rgba(90, 18, 12, 0.92)
  );
}

.settings-hint {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 220, 200, 0.72);
}

.settings-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-slider input[type="range"] {
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 120, 0, 0.7),
    rgba(255, 40, 0, 0.9)
  );
  outline: none;
}

.settings-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hud-text);
  border: 2px solid var(--hud-border);
  box-shadow: 0 0 8px rgba(255, 120, 0, 0.6);
  cursor: pointer;
}

.settings-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hud-text);
  border: 2px solid var(--hud-border);
  box-shadow: 0 0 8px rgba(255, 120, 0, 0.6);
  cursor: pointer;
}

.settings-value {
  min-width: 48px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--hud-green);
}

.doom-hud {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 16px;
  padding: 16px;
  border: 4px solid var(--hud-border);
  border-radius: 12px;
  background: var(--hud-bg);
  box-shadow: 0 0 24px rgba(255, 76, 0, 0.3), inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.hud-segment {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 2px solid var(--hud-border);
  background: rgba(30, 10, 10, 0.75);
  padding: 12px;
  position: relative;
  text-shadow: 0 0 8px rgba(255, 40, 0, 0.55);
}

.hud-segment::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 150, 0, 0.2);
  pointer-events: none;
}

.hud-segment .label {
  color: var(--hud-accent);
  font-size: 0.8rem;
  letter-spacing: 0.12rem;
}

.hud-segment .value {
  font-size: 1rem;
  color: var(--hud-text);
}

.hud-segment.profile {
  display: grid;
  grid-template-columns: auto 1fr minmax(140px, auto);
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 3px solid var(--hud-border);
  background: url("./imgs/astronaut_icon.png") center/cover no-repeat,
    linear-gradient(135deg, #101417, #232f40);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
}

.avatar.is-loading {
  position: relative;
  background-image: linear-gradient(135deg, #101417, #232f40);
}

.avatar.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  margin-left: -14px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--hud-accent);
  animation: hud-spin 0.9s linear infinite;
}

.callsign-loading {
  font-size: 0.7rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--hud-accent);
}

.callsign-loading[hidden] {
  display: none;
}

.asset-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 18, 0.92);
  backdrop-filter: blur(6px);
  z-index: 1000;
  pointer-events: all;
}

.asset-loading-overlay[hidden] {
  display: none;
}

.asset-loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 38px;
  border-radius: 16px;
  border: 1px solid rgba(255, 150, 0, 0.35);
  background: linear-gradient(
    150deg,
    rgba(12, 18, 32, 0.95),
    rgba(8, 12, 24, 0.85)
  );
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
}

.asset-loading-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--hud-accent);
  animation: hud-spin 0.9s linear infinite;
}

.asset-loading-text {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  text-align: center;
  color: var(--hud-accent);
}

@keyframes hud-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.callsign {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
}

.profile-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 150, 0, 0.25);
}

.profile-side .daily-streak {
  align-items: flex-start;
}

.callsign-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.callsign-row .value {
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.daily-streak {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.daily-streak .label {
  font-size: 0.68rem;
  letter-spacing: 0.12rem;
  color: var(--hud-accent);
}

.daily-streak-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.daily-streak .value {
  font-size: 0.95rem;
  color: var(--hud-green);
}

.daily-streak .bonus {
  font-size: 0.75rem;
  color: var(--hud-text);
  opacity: 0.85;
}

.daily-streak .bonus + .bonus {
  margin-top: 2px;
}

.player-level {
  font-size: 0.9rem;
  color: var(--hud-green);
  text-shadow: 0 0 12px rgba(33, 255, 0, 0.45);
  border: 1px solid rgba(33, 255, 0, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(12, 40, 18, 0.45);
}
.player-epoch {
  font-size: 0.78rem;
  color: rgba(255, 215, 120, 0.9);
  margin-left: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 215, 120, 0.4);
  border-radius: 6px;
  padding: 2px 8px;
  background: rgba(60, 32, 6, 0.45);
  text-shadow: 0 0 12px rgba(255, 190, 90, 0.6);
}

.xp-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 229, 173, 0.85);
}

.xp-meter {
  position: relative;
  width: min(220px, 48vw);
  height: 10px;
  border: 1px solid rgba(33, 255, 0, 0.45);
  border-radius: 999px;
  background: rgba(10, 35, 15, 0.65);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.xp-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #00ff8f, #33ffcc, #00b3ff);
  transition: width 200ms ease;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.6);
}

.xp-label {
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.3);
}

.currency .currency-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.currency-columns {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.currency-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 120px;
}

.inventory-toggle {
  align-self: flex-end;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid rgba(255, 180, 60, 0.6);
  background: rgba(40, 16, 8, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.inventory-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 160, 60, 0.45);
}

.inventory-toggle:active {
  transform: translateY(0);
}

.inventory-toggle[aria-expanded="true"] {
  border-color: rgba(255, 200, 120, 0.8);
  box-shadow: 0 0 18px rgba(255, 200, 120, 0.4);
}

.badge {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

.badge.blue {
  background: linear-gradient(145deg, #50c7ff, #0b1dff);
}

.badge.red {
  background: linear-gradient(145deg, #ff6f3c, #cc0202);
}

.badge.green {
  background: linear-gradient(145deg, #65ff90, #09a25f);
}

.badge.coin {
  background: linear-gradient(145deg, #ffd460, #ff9f1c);
  border-color: rgba(255, 220, 120, 0.75);
  box-shadow: 0 0 12px rgba(255, 180, 60, 0.55);
  border-radius: 50%;
}

.hud-segment.stats .stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #ffe5ad;
}

.hud-segment.stats .stat span:first-child {
  color: var(--hud-border);
}

.arena {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr) minmax(
      220px,
      0.7fr
    );
  align-items: stretch;
  padding-bottom: 55px;
  min-height: 0;
}

.asteroid-orbit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 320px;
}

.asteroid {
  --integrity: 1;
  width: clamp(200px, 40vw, 280px);
  height: clamp(200px, 40vw, 280px);
  border-radius: 50%;
  border: 6px solid rgba(0, 0, 0, 0.35);
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 196, 140, 0.2) 0%,
    rgba(80, 45, 20, 0.12) 45%,
    rgba(20, 10, 5, 0.4) 100%
  );
  box-shadow: inset -26px -18px 70px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(255, 120, 0, 0.18);
  position: relative;
  z-index: 2;
  cursor: crosshair;
  transition: transform 120ms ease, box-shadow 120ms ease;
  overflow: visible;
}

.asteroid.asteroid--golden {
  border: 6px solid rgba(255, 210, 90, 0.65);
  box-shadow: inset -22px -16px 70px rgba(70, 35, 0, 0.65),
    0 0 100px rgba(255, 200, 80, 0.55);
}

.asteroid.asteroid--golden::after {
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 240, 160, 0.32),
      rgba(255, 220, 140, 0.08) 52%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 210, 120, 0.24),
      rgba(140, 70, 0, 0.08) 60%
    );
  opacity: 0.55;
  animation: goldenPulse 3s ease-in-out infinite;
}

.asteroid.asteroid--golden .asteroid-shadow {
  background: radial-gradient(
    ellipse at center,
    rgba(140, 90, 0, 0.55) 0%,
    rgba(80, 50, 0, 0.2) 65%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0.55;
}

.asteroid-name--golden {
  color: #ffd75a;
  text-shadow: 0 0 14px rgba(255, 215, 80, 0.65),
    0 0 30px rgba(255, 200, 70, 0.45);
}

.asteroid.asteroid--golden .asteroid-shadow {
  background: radial-gradient(
    ellipse at center,
    rgba(140, 90, 0, 0.55) 0%,
    rgba(80, 50, 0, 0.2) 65%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0.55;
}

.asteroid-name--golden {
  color: #ffd75a;
  text-shadow: 0 0 14px rgba(255, 215, 80, 0.65),
    0 0 30px rgba(255, 200, 70, 0.45);
}

@keyframes goldenPulse {
  0% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.35;
    transform: scale(0.96);
  }
}

.asteroid.searching {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  transition: opacity 180ms ease, transform 200ms ease;
}

.asteroid-sprite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88%;
  height: 88%;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  image-rendering: auto;
  pointer-events: none;
  filter: drop-shadow(-12px 12px 12px rgba(0, 0, 0, 0.35));
  transition: filter 300ms ease;
}

.asteroid.searching .asteroid-shadow {
  opacity: 0;
}

.asteroid-shadow {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 60%;
  height: 18%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.1) 65%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: calc(0.3 + (1 - var(--integrity, 1)) * 0.4);
  filter: blur(2px);
  pointer-events: none;
  transition: opacity 220ms ease;
}

.asteroid.auto-mining-active::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 2px solid rgba(120, 210, 255, 0.28);
  box-shadow: 0 0 24px rgba(120, 210, 255, 0.38),
    inset 0 0 18px rgba(0, 25, 60, 0.75);
  animation: autoOrbit 3.8s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.65;
}

.asteroid.hit {
  animation: impact 0.18s ease;
}

.impact-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.damage-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #ffe5ad;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  animation: spark 640ms ease-out forwards;
  opacity: 0;
  text-shadow: 0 0 10px rgba(255, 120, 0, 0.8);
}

.damage-spark.auto {
  font-size: 0.7rem;
  color: rgba(170, 211, 255, 0.85);
  text-shadow: 0 0 8px rgba(90, 180, 255, 0.65);
}

.auto-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(240px, 46vw, 320px);
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(40, 150, 255, 0) 0%,
    rgba(110, 225, 255, 0.75) 18%,
    rgba(245, 255, 255, 0.98) 50%,
    rgba(110, 225, 255, 0.75) 82%,
    rgba(40, 150, 255, 0) 100%
  );
  transform: translate(-50%, -50%) rotate(var(--auto-angle, 0deg))
    scaleX(var(--auto-scale, 0.8));
  transform-origin: center;
  border-radius: 50%;
  mix-blend-mode: screen;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(140, 220, 255, 0.65));
  animation: autoBeam 460ms ease-out forwards;
  opacity: 0;
}

.asteroid-searching {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(18, 12, 24, 0.55),
    rgba(6, 3, 8, 0.5)
  );
  border-radius: 50%;
  color: rgba(190, 225, 255, 0.86);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.7),
    0 0 28px rgba(120, 170, 255, 0.3);
  pointer-events: none;
  text-align: center;
  padding: 28px;
  z-index: 4;
}

.asteroid-searching[hidden] {
  display: none !important;
}

.asteroid-searching-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(110, 180, 255, 0.25);
  border-top-color: rgba(190, 230, 255, 0.85);
  animation: asteroidSearchSpin 900ms linear infinite;
}

.asteroid-searching-text {
  max-width: 220px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(200, 240, 255, 0.9);
}

@keyframes asteroidSearchSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.asteroid-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--fx-size, 14px);
  height: var(--fx-size, 14px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    var(--fx-color, rgba(255, 204, 150, 0.95)) 0%,
    rgba(255, 220, 170, 0.35) 55%,
    rgba(255, 220, 170, 0) 100%
  );
  box-shadow: 0 0 18px var(--fx-shadow, rgba(255, 180, 120, 0.55));
  filter: saturate(1.12);
  opacity: 0;
  mix-blend-mode: screen;
  animation: asteroidParticle var(--fx-duration, 920ms) ease-out forwards;
}

@keyframes asteroidParticle {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.55);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--fx-x, 0px)),
        calc(-50% + var(--fx-y, 0px))
      )
      scale(0.2);
  }
}

@keyframes spark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--dx, 0px)),
        calc(-50% + var(--dy, -38px))
      )
      scale(0.95);
  }
}

@keyframes autoBeam {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--auto-angle, 0deg)) scaleX(0.2);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--auto-angle, 0deg))
      scaleX(var(--auto-scale, 0.8));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--auto-angle, 0deg))
      scaleX(calc(var(--auto-scale, 0.8) * 1.28));
  }
}

@keyframes autoOrbit {
  0% {
    opacity: 0.5;
    transform: rotate(0deg) scale(1);
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.5;
    transform: rotate(360deg) scale(1);
  }
}

.asteroid::after {
  content: "";
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 210, 170, 0.18),
      rgba(120, 60, 25, 0) 55%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 220, 160, 0.15),
      rgba(30, 10, 0, 0) 60%
    );
  mix-blend-mode: screen;
  opacity: calc(0.18 + (1 - var(--integrity, 1)) * 0.9);
  pointer-events: none;
}

@keyframes impact {
  0% {
    transform: scale(1);
    filter: brightness(1.1);
  }
  45% {
    transform: scale(0.97);
    filter: brightness(1.35);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.asteroid:active {
  transform: scale(0.96);
  box-shadow: inset -20px -15px 55px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(255, 80, 0, 0.45);
}

.targeting-reticle {
  position: absolute;
  width: clamp(260px, 50vw, 340px);
  height: clamp(260px, 50vw, 340px);
  border: 2px dashed rgba(255, 60, 0, 0.6);
  border-radius: 50%;
  animation: pulse 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 4;
}

.reticle-line {
  position: absolute;
  background: var(--hud-accent);
  opacity: 0.7;
}

.reticle-line.horizontal {
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
}

.reticle-line.vertical {
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 2px;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 70, 0, 0.4),
      inset 0 0 12px rgba(255, 70, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 70, 0, 0.55),
      inset 0 0 24px rgba(255, 70, 0, 0.55);
  }
}

.integrity-panel {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, calc(100% + 18px));
  width: clamp(220px, 36vw, 320px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--hud-text);
  text-shadow: 0 0 8px rgba(255, 90, 0, 0.65);
  z-index: 5;
}

.integrity-panel .meter {
  width: 100%;
  height: 14px;
  border: 2px solid var(--hud-border);
  background: rgba(30, 10, 10, 0.8);
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.meter-fill {
  width: 100%;
  background: linear-gradient(90deg, #21ff00, #ffe600);
  transform-origin: left;
  transition: width 160ms ease, background 200ms ease;
  flex: 0 0 auto;
}

.meter-fill[data-state="warning"] {
  background: linear-gradient(90deg, #ffe600, #ff7b00);
}

.meter-fill[data-state="critical"] {
  background: linear-gradient(90deg, #ff7b00, #ff2400);
}

.meter-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.readout {
  border: 4px solid var(--hud-border);
  border-radius: 12px;
  padding: 20px;
  background: var(--hud-bg);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 50, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.readout-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.readout-line .tag {
  color: var(--hud-accent);
}

.readout-line .value {
  color: var(--hud-green);
}

.readout-buff {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(255, 220, 170, 0.85);
  text-transform: uppercase;
}

.upgrade-bay,
.mission-log {
  border: 4px solid var(--hud-border);
  border-radius: 12px;
  padding: 20px;
  background: rgba(20, 6, 6, 0.85);
  box-shadow: 0 0 24px rgba(255, 70, 0, 0.25);
}

.mission-log {
  display: flex;
  flex-direction: column;
  height: 340px;
  margin-top: 30px;
}

.mission-log ul {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 0, 0.7) rgba(40, 12, 12, 0.75);
}

.section-title {
  margin: 0 0 12px;
  color: var(--hud-accent);
  font-size: 1rem;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.upgrade-card {
  border: 2px solid rgba(120, 220, 255, 0.45);
  background: rgba(10, 6, 30, 0.85);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(40, 110, 255, 0.2);
  position: relative;
}

.upgrade-key-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(120, 220, 255, 0.6);
  background: rgba(18, 12, 40, 0.85);
  color: rgba(200, 235, 255, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.upgrade-card h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--hud-text);
}

.upgrade-card p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 230, 200, 0.78);
}

.level-indicator {
  font-size: 0.75rem;
  color: var(--hud-shadow);
}

.cost-row {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
}

.cost-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cost-row .badge {
  width: 14px;
  height: 14px;
  border-width: 1px;
}

.purchase {
  margin-top: auto;
  font-family: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 90, 0, 0.9),
    rgba(120, 12, 0, 0.9)
  );
  color: #ffe5ad;
  border: 2px solid var(--hud-border);
  padding: 10px;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.purchase:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255, 100, 0, 0.6);
}

.purchase:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.mission-log ul,
.mission-log li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mission-log ul {
  flex: 1;
  min-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 0, 0.7) rgba(40, 12, 12, 0.75);
}

.mission-log li {
  font-size: 0.72rem;
  background: rgba(40, 15, 15, 0.85);
  border: 2px solid rgba(255, 80, 0, 0.4);
  padding: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mission-log ul::-webkit-scrollbar {
  width: 10px;
}

.mission-log ul::-webkit-scrollbar-track {
  background: rgba(25, 8, 8, 0.65);
  border: 1px solid rgba(255, 80, 0, 0.4);
  border-radius: 99px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.55);
}

.mission-log ul::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(255, 120, 0, 0.85),
    rgba(255, 40, 0, 0.92)
  );
  border-radius: 99px;
  border: 1px solid rgba(255, 160, 0, 0.65);
  box-shadow: 0 0 12px rgba(255, 80, 0, 0.45);
}

.mission-log ul::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 150, 0, 0.92),
    rgba(255, 60, 0, 0.98)
  );
}

.log-base-row {
  display: block;
}

.space-base {
  border: 4px solid var(--hud-border);
  border-radius: 12px;
  padding: 20px;
  background: rgba(18, 8, 20, 0.9);
  box-shadow: 0 0 24px rgba(110, 60, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.space-base-locked {
  border: 2px dashed rgba(255, 120, 0, 0.55);
  border-radius: 10px;
  padding: 16px;
  background: rgba(40, 14, 8, 0.7);
  color: rgba(255, 220, 190, 0.9);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.space-base-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: scroll;
  height: 500px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 0, 0.7) rgba(40, 12, 12, 0.75);
}

.space-base-status {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--hud-blue);
  text-shadow: 0 0 12px rgba(110, 225, 255, 0.35);
}

.space-base-action {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.space-base-drone-button {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(120, 220, 255, 0.4);
  background: rgba(8, 12, 32, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(60, 120, 255, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease;
}

.space-base-drone-button:hover {
  transform: translateY(-2px);
  border-color: rgba(150, 240, 255, 0.6);
  box-shadow: 0 0 26px rgba(110, 220, 255, 0.4);
}

.space-base-drone-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.space-base-stats-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(240, 185, 110, 0.5);
  background: rgba(35, 18, 8, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 160, 90, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-stats-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 210, 140, 0.65);
  box-shadow: 0 0 26px rgba(255, 200, 140, 0.4);
}

.space-base-stats-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-marketplace-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(150, 240, 210, 0.45);
  background: rgba(10, 30, 32, 0.82);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(120, 255, 220, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-marketplace-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(170, 255, 235, 0.6);
  box-shadow: 0 0 26px rgba(150, 255, 240, 0.38);
}

.space-base-marketplace-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-marketplace-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(200, 255, 240, 0.92);
}

.space-base-marketplace-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(210, 255, 250, 0.7);
}

.space-base-bazaar-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(200, 120, 255, 0.45);
  background: rgba(38, 16, 62, 0.84);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(185, 120, 255, 0.26);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-bazaar-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(220, 160, 255, 0.65);
  box-shadow: 0 0 30px rgba(210, 160, 255, 0.45);
}

.space-base-bazaar-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-bazaar-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(225, 200, 255, 0.92);
}

.space-base-bazaar-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(225, 200, 255, 0.76);
}

.space-base-fabrication-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(140, 230, 255, 0.45);
  background: rgba(12, 30, 46, 0.84);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(140, 230, 255, 0.26);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-fabrication-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(170, 245, 255, 0.65);
  box-shadow: 0 0 30px rgba(160, 240, 255, 0.45);
}

.space-base-fabrication-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-fabrication-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(190, 235, 255, 0.92);
}

.space-base-fabrication-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(180, 230, 255, 0.76);
}

.space-base-mining-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(255, 205, 120, 0.45);
  background: rgba(46, 28, 10, 0.84);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 205, 120, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-mining-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 220, 160, 0.65);
  box-shadow: 0 0 30px rgba(255, 220, 160, 0.4);
}

.space-base-mining-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-mining-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 225, 185, 0.9);
}

.space-base-mining-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255, 220, 170, 0.76);
}

.space-base-stock-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(150, 210, 255, 0.45);
  background: rgba(18, 34, 62, 0.86);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(110, 200, 255, 0.26);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-stock-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(170, 230, 255, 0.65);
  box-shadow: 0 0 34px rgba(140, 220, 255, 0.4);
}

.space-base-stock-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-stock-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(190, 235, 255, 0.92);
}

.space-base-stock-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(180, 225, 255, 0.78);
}
.space-base-remote-operations-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(160, 255, 210, 0.4);
  background: rgba(14, 34, 24, 0.86);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(110, 255, 180, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}
.space-base-remote-operations-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(190, 255, 225, 0.6);
  box-shadow: 0 0 30px rgba(140, 255, 200, 0.38);
}
.space-base-remote-operations-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}
.space-base-remote-operations-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(210, 255, 230, 0.92);
}
.space-base-remote-operations-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(185, 235, 205, 0.78);
}
.space-base-enter-void-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(210, 180, 255, 0.45);
  background: rgba(22, 10, 40, 0.88);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(200, 170, 255, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}
.space-base-enter-void-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(235, 205, 255, 0.6);
  box-shadow: 0 0 30px rgba(225, 195, 255, 0.38);
}
.space-base-enter-void-button[hidden] {
  display: none !important;
}
.space-base-enter-void-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 215, 255, 0.92);
}
.space-base-enter-void-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(215, 195, 255, 0.78);
}

.space-base-casino-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(220, 160, 255, 0.45);
  background: rgba(32, 10, 40, 0.84);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(210, 160, 255, 0.26);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-casino-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(235, 190, 255, 0.65);
  box-shadow: 0 0 28px rgba(230, 190, 255, 0.45);
}

.space-base-casino-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-casino-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 200, 255, 0.92);
}

.space-base-casino-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(235, 200, 255, 0.75);
}

.space-base-achievements-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(255, 205, 120, 0.45);
  background: rgba(48, 14, 8, 0.82);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 190, 110, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}

.space-base-achievements-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 220, 150, 0.65);
  box-shadow: 0 0 26px rgba(255, 210, 150, 0.42);
}

.space-base-achievements-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.space-base-achievements-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 235, 190, 0.92);
}

.space-base-achievements-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255, 220, 190, 0.7);
}

.space-base-progress-label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(180, 235, 255, 0.7);
}

.space-base-progress {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(40, 70, 105, 0.55);
  overflow: hidden;
}

.space-base-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.space-base-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(110, 220, 255, 0.85),
    rgba(255, 255, 255, 0.95)
  );
  box-shadow: 0 0 16px rgba(110, 220, 255, 0.45);
  transition: width 200ms ease-in-out;
}

.space-base-contracts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.space-base-card {
  border: 2px solid rgba(120, 220, 255, 0.45);
  background: rgba(10, 6, 30, 0.85);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(40, 110, 255, 0.2);
}

.space-base-card h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--hud-text);
  letter-spacing: 0.05em;
}

.space-base-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(200, 225, 255, 0.75);
}

.space-base-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.7rem;
  color: rgba(160, 220, 255, 0.85);
}

.space-base-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.space-base-card button {
  margin-top: auto;
  align-self: stretch;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border-radius: 8px;
  padding: 10px;
  text-transform: uppercase;
  border: 2px solid rgba(120, 220, 255, 0.55);
  background: linear-gradient(
    180deg,
    rgba(60, 130, 255, 0.85),
    rgba(20, 30, 110, 0.9)
  );
  color: #e5f5ff;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.space-base-card button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.space-base-card button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(110, 220, 255, 0.45);
}

.space-base-card button[data-action="claim"] {
  background: linear-gradient(
    180deg,
    rgba(255, 212, 0, 0.9),
    rgba(255, 120, 0, 0.9)
  );
  border-color: rgba(255, 220, 120, 0.8);
  color: #2c1400;
}

.space-base-card button[data-action="claim"]:hover {
  box-shadow: 0 0 18px rgba(255, 200, 0, 0.55);
}

.recon-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 20, 0.76);
  backdrop-filter: blur(2px);
  z-index: 24;
}

.recon-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 94%);
  max-height: min(95vh, 1000px);
  padding: 22px;
  background: rgba(10, 8, 28, 0.96);
  border: 3px solid rgba(120, 220, 255, 0.6);
  border-radius: 14px;
  box-shadow: 0 0 36px rgba(90, 150, 255, 0.4),
    inset 0 0 22px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden auto;
  z-index: 25;
}

.recon-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(20, 18, 40, 0.82);
  border: 1px solid rgba(160, 210, 255, 0.35);
  font-size: 0.78rem;
  color: rgba(200, 225, 255, 0.82);
}

.recon-modal-actions[hidden] {
  display: none !important;
}

.recon-active-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(200, 240, 255, 0.94);
}

.recon-cancel-button {
  align-self: flex-start;
  border-radius: 10px;
  border: 2px solid rgba(255, 145, 105, 0.7);
  background: linear-gradient(
    180deg,
    rgba(255, 120, 80, 0.92),
    rgba(180, 40, 25, 0.9)
  );
  color: #ffeae1;
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.recon-cancel-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(255, 150, 110, 0.5);
}

.recon-cancel-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.recon-cancel-note {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 210, 180, 0.7);
}

.recon-modal[hidden],
.recon-overlay[hidden] {
  display: none !important;
}

.recon-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recon-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--hud-accent);
}

.recon-modal-close {
  border: 2px solid rgba(120, 220, 255, 0.6);
  border-radius: 8px;
  background: rgba(14, 18, 40, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.recon-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(110, 220, 255, 0.45);
}

.recon-modal-close:active {
  transform: scale(0.94);
}

.recon-modal-description {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(200, 230, 255, 0.7);
}

.stats-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 4, 2, 0.72);
  backdrop-filter: blur(2px);
  z-index: 30;
}

.stats-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92%);
  max-height: min(80vh, 640px);
  padding: 24px;
  background: rgba(18, 10, 4, 0.95);
  border: 3px solid rgba(255, 190, 120, 0.55);
  border-radius: 14px;
  box-shadow: 0 0 34px rgba(255, 160, 90, 0.35),
    inset 0 0 22px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 31;
}

.stats-modal[hidden],
.stats-overlay[hidden] {
  display: none !important;
}

.stats-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 210, 150, 0.95);
}

.stats-modal-close {
  border: 2px solid rgba(255, 190, 140, 0.7);
  border-radius: 8px;
  background: rgba(40, 18, 10, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.stats-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 190, 140, 0.45);
}

.stats-modal-close:active {
  transform: scale(0.95);
}

.stats-modal-description {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(255, 225, 200, 0.72);
}

.stats-modal-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(255, 225, 200, 0.88);
}

.stats-modal-list dt {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 200, 160, 0.8);
}

.stats-modal-list dd {
  margin: 6px 0 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: rgba(255, 230, 210, 0.95);
}

.stats-resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.stats-resource-total {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 220, 190, 0.95);
  margin-bottom: 6px;
}

.stats-resource-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.achievements-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 6, 2, 0.72);
  backdrop-filter: blur(2px);
  z-index: 32;
}

.achievements-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1200px, 96%);
  max-height: min(90vh, 1000px);
  padding: 28px;
  background: rgba(20, 12, 6, 0.96);
  border: 3px solid rgba(255, 205, 140, 0.6);
  border-radius: 16px;
  box-shadow: 0 0 36px rgba(255, 200, 120, 0.38),
    inset 0 0 24px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden auto;
  z-index: 33;
}

.achievements-modal[hidden],
.achievements-overlay[hidden] {
  display: none !important;
}

.achievements-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.achievements-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 220, 170, 0.96);
}

.achievements-modal-close {
  border: 2px solid rgba(255, 205, 150, 0.7);
  border-radius: 8px;
  background: rgba(34, 14, 10, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.achievements-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 210, 160, 0.4);
}

.achievements-modal-close:active {
  transform: scale(0.95);
}

.achievements-modal-description {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(255, 230, 200, 0.78);
}

.marketplace-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 16, 18, 0.72);
  backdrop-filter: blur(2px);
  z-index: 32;
}

.marketplace-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1350px, 96%);
  max-height: min(85vh, 720px);
  padding: 32px;
  background: rgba(8, 24, 28, 0.96);
  border: 3px solid rgba(140, 255, 220, 0.55);
  border-radius: 16px;
  box-shadow: 0 0 38px rgba(110, 255, 220, 0.32),
    inset 0 0 28px rgba(0, 0, 0, 0.68);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden auto;
  z-index: 33;
}

.marketplace-modal[hidden],
.marketplace-overlay[hidden] {
  display: none !important;
}

.marketplace-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marketplace-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(210, 255, 245, 0.96);
}

.marketplace-modal-close {
  border: 2px solid rgba(150, 255, 240, 0.7);
  border-radius: 8px;
  background: rgba(8, 40, 42, 0.85);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.marketplace-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(150, 255, 240, 0.45);
}

.marketplace-modal-close:active {
  transform: scale(0.95);
}

.marketplace-modal-description {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(210, 255, 240, 0.78);
}

.marketplace-balance {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: rgba(195, 255, 245, 0.86);
}

.marketplace-balance span {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.marketplace-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid rgba(140, 255, 220, 0.35);
  background: rgba(6, 30, 35, 0.88);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(110, 255, 220, 0.28);
}

.marketplace-card h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(210, 255, 240, 0.92);
}

.marketplace-card p {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(200, 255, 240, 0.75);
}

.marketplace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.marketplace-actions .marketplace-exchange-button {
  flex: 1 1 160px;
  white-space: nowrap;
}

.marketplace-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketplace-form label {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: rgba(190, 255, 240, 0.72);
}

.marketplace-input-row {
  display: flex;
  gap: 10px;
}

.marketplace-input-row input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid rgba(120, 240, 220, 0.4);
  background: rgba(6, 24, 26, 0.9);
  color: var(--hud-text);
  font-family: inherit;
  font-size: 0.75rem;
}

.marketplace-input-row input:focus {
  outline: none;
  border-color: rgba(150, 255, 240, 0.75);
  box-shadow: 0 0 16px rgba(120, 255, 230, 0.35);
}

.marketplace-input-row button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 2px solid rgba(150, 255, 240, 0.6);
  background: linear-gradient(
    180deg,
    rgba(120, 255, 240, 0.9),
    rgba(12, 80, 90, 0.9)
  );
  color: rgba(6, 24, 26, 0.94);
  font-family: inherit;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.marketplace-input-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(120, 255, 230, 0.4);
}

.marketplace-input-row button:active {
  transform: scale(0.97);
}

.marketplace-note {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: rgba(185, 255, 240, 0.65);
}

.bazaar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 6, 26, 0.78);
  backdrop-filter: blur(3px);
  z-index: 36;
}

.bazaar-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1000px, 100%);
  max-height: min(110vh, 1110px);
  padding: 32px;
  background: rgba(26, 12, 46, 0.96);
  border: 3px solid rgba(215, 160, 255, 0.6);
  border-radius: 18px;
  box-shadow: 0 0 48px rgba(210, 160, 255, 0.32),
    inset 0 0 26px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden auto;
  z-index: 37;
}

.bazaar-overlay[hidden],
.bazaar-modal[hidden] {
  display: none !important;
}

.bazaar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bazaar-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(235, 210, 255, 0.95);
}

.bazaar-modal-close {
  border: 2px solid rgba(215, 160, 255, 0.7);
  border-radius: 8px;
  background: rgba(44, 18, 66, 0.85);
  color: rgba(250, 236, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.bazaar-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(215, 160, 255, 0.45);
}

.bazaar-modal-close:active {
  transform: scale(0.95);
}

.bazaar-modal-description {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(240, 220, 255, 0.8);
}

.bazaar-balance {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(220, 200, 255, 0.85);
}

.bazaar-balance span {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.bazaar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.bazaar-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  border: 2px solid rgba(215, 160, 255, 0.4);
  background: rgba(34, 14, 52, 0.88);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(200, 150, 255, 0.28);
}

.bazaar-card h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 210, 255, 0.92);
}

.bazaar-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(220, 205, 255, 0.78);
}
.bazaar-card--locked {
  display: none;
}
.bazaar-card--locked .bazaar-price {
  color: rgba(255, 120, 120, 0.75);
}

.bazaar-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 14px rgba(210, 160, 255, 0.35);
}

.bazaar-item-icon--chips {
  background: linear-gradient(135deg, #70e1ff, #1a53ff);
}

.bazaar-item-icon--spice {
  background: linear-gradient(135deg, #ff8a5c, #ab1fff);
}

.bazaar-item-icon--soda {
  background: linear-gradient(135deg, #5bffcc, #14a7ff);
}
.bazaar-item-icon--void-gem {
}

.bazaar-item-icon--space-time-dilator {
  background: linear-gradient(135deg, #00d4ff, #0066cc);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.5);
}

.bazaar-price {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(245, 225, 255, 0.82);
}

.bazaar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.bazaar-buy-button {
  padding: 8px 14px;
  width: 100%;
  border-radius: 8px;
  border: 2px solid rgba(215, 160, 255, 0.65);
  background: rgba(46, 20, 70, 0.9);
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.bazaar-buy-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(215, 160, 255, 0.42);
}

.bazaar-buy-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.bazaar-hold-button {
  background: linear-gradient(135deg, rgba(90, 170, 255, 0.25), rgba(120, 200, 255, 0.15));
  border-color: rgba(120, 200, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.bazaar-hold-button:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(90, 170, 255, 0.35), rgba(120, 200, 255, 0.25));
  border-color: rgba(120, 200, 255, 0.8);
  box-shadow: 0 0 20px rgba(120, 200, 255, 0.4);
}

.bazaar-hold-button.hold-active {
  background: linear-gradient(135deg, rgba(120, 200, 255, 0.4), rgba(150, 220, 255, 0.3));
  border-color: rgba(150, 220, 255, 0.9);
  box-shadow: 0 0 24px rgba(120, 200, 255, 0.6),
    inset 0 0 16px rgba(90, 170, 255, 0.3);
  animation: hold-pulse 1s ease-in-out infinite;
}

@keyframes hold-pulse {
  0%, 100% {
    box-shadow: 0 0 24px rgba(120, 200, 255, 0.6),
      inset 0 0 16px rgba(90, 170, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 32px rgba(120, 200, 255, 0.8),
      inset 0 0 20px rgba(90, 170, 255, 0.4);
  }
}

.fabrication-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 32, 0.78);
  backdrop-filter: blur(4px);
  z-index: 40;
}

.fabrication-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, 95%);
  max-height: min(86vh, 760px);
  padding: 32px;
  background: rgba(10, 26, 40, 0.96);
  border: 3px solid rgba(140, 230, 255, 0.55);
  border-radius: 20px;
  box-shadow: 0 0 48px rgba(140, 230, 255, 0.32),
    inset 0 0 26px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden auto;
  z-index: 41;
}

.fabrication-overlay[hidden],
.fabrication-modal[hidden] {
  display: none !important;
}

.fabrication-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.fabrication-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(210, 245, 255, 0.95);
}

.fabrication-modal-close {
  border: 2px solid rgba(140, 230, 255, 0.7);
  border-radius: 8px;
  background: rgba(12, 30, 46, 0.9);
  color: rgba(225, 245, 255, 0.92);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.fabrication-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(140, 230, 255, 0.45);
}

.fabrication-modal-close:active {
  transform: scale(0.95);
}

.fabrication-modal-description {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(200, 235, 255, 0.78);
}

.fabrication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.fabrication-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  border: 2px solid rgba(140, 230, 255, 0.4);
  background: rgba(14, 32, 48, 0.9);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(140, 230, 255, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.fabrication-card--locked {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.fabrication-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fabrication-output-icon {
  display: inline-block;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px rgba(140, 230, 255, 0.35);
}

.fabrication-card-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fabrication-card-title h3 {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(215, 245, 255, 0.92);
}

.fabrication-card-owned {
  font-size: 0.7rem;
  color: rgba(170, 220, 240, 0.78);
}

.fabrication-card-description {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(195, 230, 255, 0.78);
}

.fabrication-costs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fabrication-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(18, 38, 54, 0.75);
}

.fabrication-cost--missing {
  color: rgba(255, 170, 150, 0.88);
  border: 1px solid rgba(255, 140, 120, 0.35);
}

.fabrication-cost--met {
  color: rgba(175, 245, 215, 0.9);
  border: 1px solid rgba(140, 230, 200, 0.35);
}

.fabrication-cost-name {
  text-transform: uppercase;
}

.fabrication-cost-count {
  font-weight: 600;
}

.fabrication-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.fabrication-craft-button {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid rgba(140, 230, 255, 0.65);
  background: rgba(20, 50, 70, 0.9);
  color: rgba(230, 245, 255, 0.94);
  font-family: inherit;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.fabrication-card--locked .fabrication-craft-button {
  border-color: rgba(140, 230, 255, 0.3);
  opacity: 0.6;
  cursor: not-allowed;
}

.fabrication-craft-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(140, 230, 255, 0.42);
}

.fabrication-craft-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.fabrication-hold-button {
  background: linear-gradient(135deg, rgba(90, 170, 255, 0.25), rgba(120, 200, 255, 0.15));
  border-color: rgba(120, 200, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.fabrication-hold-button:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(90, 170, 255, 0.35), rgba(120, 200, 255, 0.25));
  border-color: rgba(120, 200, 255, 0.8);
  box-shadow: 0 0 20px rgba(120, 200, 255, 0.4);
}

.fabrication-hold-button.hold-active {
  background: linear-gradient(135deg, rgba(120, 200, 255, 0.4), rgba(150, 220, 255, 0.3));
  border-color: rgba(150, 220, 255, 0.9);
  box-shadow: 0 0 24px rgba(120, 200, 255, 0.6),
    inset 0 0 16px rgba(90, 170, 255, 0.3);
  animation: hold-pulse 1s ease-in-out infinite;
}

.spacecoin-facility-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.78);
  backdrop-filter: blur(4px);
  z-index: 38;
  display: block;
}

.spacecoin-facility-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(840px, 92%);
  max-height: min(80vh, 640px);
  padding: 28px;
  background: rgba(10, 22, 30, 0.95);
  border: 3px solid rgba(255, 205, 120, 0.55);
  border-radius: 18px;
  box-shadow: 0 0 42px rgba(255, 200, 120, 0.28),
    inset 0 0 24px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden auto;
  z-index: 39;
}

.spacecoin-facility-overlay[hidden],
.spacecoin-facility-modal[hidden] {
  display: none !important;
}

.spacecoin-facility-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.spacecoin-facility-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 230, 185, 0.95);
}

.spacecoin-facility-modal-close {
  border: 2px solid rgba(255, 210, 150, 0.6);
  border-radius: 8px;
  background: rgba(38, 24, 10, 0.88);
  color: rgba(255, 225, 185, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.spacecoin-facility-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(255, 210, 150, 0.4);
}

.spacecoin-facility-modal-close:active {
  transform: scale(0.95);
}

.spacecoin-facility-description {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 230, 185, 0.78);
}

.spacecoin-facility-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255, 220, 170, 0.88);
}

.spacecoin-facility-available {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(255, 220, 170, 0.78);
}

.spacecoin-facility-actions {
  display: flex;
  gap: 10px;
  margin: 18px 0 12px;
}

.spacecoin-facility-actions button {
  flex: 1;
}

.spacecoin-facility-install,
.spacecoin-facility-install-all {
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid rgba(255, 205, 120, 0.6);
  background: rgba(46, 28, 10, 0.9);
  color: rgba(255, 225, 185, 0.94);
  font-family: inherit;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.spacecoin-facility-install:hover:not(:disabled),
.spacecoin-facility-install-all:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(255, 205, 120, 0.42);
}

.spacecoin-facility-install:disabled,
.spacecoin-facility-install-all:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.spacecoin-facility-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(255, 220, 170, 0.7);
}

.stock-exchange-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 22, 0.78);
  backdrop-filter: blur(4px);
  z-index: 38;
}

.stock-exchange-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1425px, 94%);
  max-height: min(100vh, 1100px);
  padding: 30px;
  background: rgba(10, 24, 42, 0.95);
  border: 3px solid rgba(140, 220, 255, 0.55);
  border-radius: 20px;
  box-shadow: 0 0 44px rgba(120, 210, 255, 0.28),
    inset 0 0 26px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden auto;
  z-index: 39;
}

.stock-exchange-overlay[hidden],
.stock-exchange-modal[hidden] {
  display: none !important;
}

.stock-exchange-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stock-exchange-modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(195, 240, 255, 0.94);
}

.stock-exchange-modal-close {
  border: 2px solid rgba(140, 220, 255, 0.6);
  border-radius: 8px;
  background: rgba(14, 28, 44, 0.86);
  color: rgba(200, 245, 255, 0.92);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.stock-exchange-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(140, 220, 255, 0.4);
}

.stock-exchange-modal-close:active {
  transform: scale(0.95);
}

.stock-exchange-description {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(195, 235, 255, 0.78);
}

.stock-exchange-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 18px;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: rgba(190, 235, 255, 0.86);
}

.stock-exchange-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(12, 30, 52, 0.74);
  border-radius: 10px;
  border: 1px solid rgba(140, 220, 255, 0.24);
}

.stock-exchange-summary-label {
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(170, 220, 255, 0.7);
}

.stock-exchange-summary-value {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: rgba(210, 245, 255, 0.94);
}

.stock-exchange-net[data-state="gain"] {
  color: rgba(120, 255, 190, 0.92);
}

.stock-exchange-net[data-state="loss"] {
  color: rgba(255, 140, 140, 0.92);
}

.stock-exchange-net[data-state="even"] {
  color: rgba(210, 245, 255, 0.9);
}

.stock-exchange-updated {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(175, 220, 255, 0.68);
}

.stock-exchange-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stock-exchange-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1.2fr));
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(140, 220, 255, 0.28);
  background: rgba(12, 30, 52, 0.78);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.stock-exchange-company h3 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(200, 240, 255, 0.95);
}

.stock-exchange-market-cap {
  margin: 6px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(175, 220, 255, 0.7);
}

.stock-exchange-price,
.stock-exchange-holdings {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-exchange-price-value {
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: rgba(220, 245, 255, 0.95);
}

.stock-exchange-price-change {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: rgba(200, 235, 255, 0.8);
}

.stock-exchange-price-change[data-state="up"] {
  color: rgba(120, 255, 190, 0.85);
}

.stock-exchange-price-change[data-state="down"] {
  color: rgba(255, 150, 150, 0.85);
}

.stock-exchange-owned,
.stock-exchange-worth {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(180, 225, 255, 0.78);
}

.stock-exchange-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stock-exchange-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 24, 42, 0.72);
  border: 1px solid rgba(140, 220, 255, 0.2);
}

.stock-exchange-action-title {
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(175, 225, 255, 0.72);
}

.stock-exchange-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-exchange-action-button {
  padding: 6px 12px;
  border-radius: 7px;
  border: 2px solid transparent;
  background: rgba(12, 30, 52, 0.95);
  color: rgba(215, 245, 255, 0.96);
  font-family: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease,
    border-color 120ms ease;
}

.stock-exchange-action-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(140, 220, 255, 0.35);
}

.stock-exchange-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.stock-exchange-action-button--buy {
  border-color: rgba(120, 220, 255, 0.45);
}

.stock-exchange-action-button--buy:hover:not(:disabled) {
  border-color: rgba(150, 235, 255, 0.7);
}

.stock-exchange-action-button--sell {
  border-color: rgba(255, 180, 150, 0.45);
}

.stock-exchange-action-button--sell:hover:not(:disabled) {
  border-color: rgba(255, 205, 180, 0.7);
}

.stock-exchange-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stock-exchange-input-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: rgba(170, 220, 255, 0.78);
}

.stock-exchange-input-label input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(140, 220, 255, 0.4);
  background: rgba(8, 20, 36, 0.9);
  color: rgba(220, 245, 255, 0.94);
  font-family: inherit;
  font-size: 0.8rem;
}

.stock-exchange-buy-button {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 8px;
  border: 2px solid rgba(140, 220, 255, 0.55);
  background: rgba(12, 30, 52, 0.92);
  color: rgba(215, 245, 255, 0.96);
  font-family: inherit;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.stock-exchange-buy-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(140, 220, 255, 0.42);
}

.stock-exchange-buy-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.stock-exchange-cost {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(165, 210, 255, 0.62);
}
.remote-operations-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 9, 0.72);
  backdrop-filter: blur(3px);
  z-index: 38;
}
.remote-operations-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92%);
  max-height: calc(100vh);
  padding: 26px;
  background: rgba(8, 26, 18, 0.94);
  border: 2px solid rgba(150, 245, 205, 0.48);
  border-radius: 18px;
  box-shadow: 0 0 34px rgba(120, 255, 195, 0.28),
    inset 0 0 20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden auto;
  color: #e8fff5;
  z-index: 39;
}
.remote-operations-overlay[hidden],
.remote-operations-modal[hidden] {
  display: none !important;
}
.remote-operations-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.remote-operations-modal-header h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(210, 255, 235, 0.92);
}
.remote-operations-modal-close {
  border: 2px solid rgba(150, 245, 205, 0.6);
  border-radius: 50%;
  background: rgba(12, 36, 26, 0.82);
  color: rgba(200, 255, 225, 0.92);
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.remote-operations-modal-close:hover {
  transform: rotate(90deg);
  box-shadow: 0 0 18px rgba(150, 245, 205, 0.35);
}
.remote-operations-modal-close:active {
  transform: scale(0.95);
}
.remote-operations-summary {
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(205, 245, 225, 0.82);
}
.remote-operations-summary strong {
  font-size: 1rem;
  color: rgba(235, 255, 245, 0.94);
  letter-spacing: 0.04em;
}
.remote-operations-play-button {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(150, 245, 205, 0.5);
  background: linear-gradient(
    140deg,
    rgba(12, 50, 34, 0.95),
    rgba(16, 68, 44, 0.92)
  );
  color: #e9fff5;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(12, 50, 34, 0.38);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}
.remote-operations-play-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(185, 255, 225, 0.7);
  box-shadow: 0 18px 32px rgba(16, 68, 44, 0.44);
}
.remote-operations-play-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}
.enter-void-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 2, 14, 0.78);
  backdrop-filter: blur(3px);
  z-index: 38;
}
.enter-void-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 92%);
  padding: 32px;
  background: linear-gradient(
    160deg,
    rgba(20, 8, 40, 0.96),
    rgba(6, 2, 18, 0.94)
  );
  border: 2px solid rgba(210, 180, 255, 0.38);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(120, 80, 255, 0.32),
    inset 0 0 24px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: #f3efff;
  z-index: 39;
}
.enter-void-overlay[hidden],
.enter-void-modal[hidden] {
  display: none !important;
}
.enter-void-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.enter-void-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(235, 220, 255, 0.94);
}
.enter-void-modal-close {
  border: 2px solid rgba(210, 180, 255, 0.5);
  border-radius: 50%;
  background: rgba(28, 12, 60, 0.8);
  color: rgba(255, 245, 255, 0.92);
  width: 38px;
  height: 38px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.enter-void-modal-close:hover {
  transform: rotate(90deg);
  box-shadow: 0 0 22px rgba(210, 180, 255, 0.45);
}
.enter-void-modal-close:active {
  transform: scale(0.96);
}
.enter-void-description {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(230, 220, 255, 0.75);
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px dashed rgba(210, 180, 255, 0.4);
  background: rgba(10, 4, 22, 0.72);
}
.enter-void-action {
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(200, 170, 255, 0.55);
  background: linear-gradient(
    145deg,
    rgba(40, 18, 70, 0.95),
    rgba(22, 10, 40, 0.92)
  );
  color: #f5edff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(30, 8, 60, 0.45);
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}
.enter-void-action:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(220, 200, 255, 0.75);
  box-shadow: 0 22px 36px rgba(35, 12, 70, 0.55);
}
.enter-void-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}
.enter-void-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 18, 0.78);
  z-index: 2100;
}
.enter-void-confirm-modal[hidden],
.enter-void-confirm-overlay[hidden] {
  display: none;
}
.enter-void-confirm-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1000px, 92vw);
  height: 315px;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgba(160, 140, 255, 0.4);
  background: radial-gradient(
    circle at top,
    rgba(18, 12, 38, 0.95),
    rgba(8, 6, 20, 0.96)
  );
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.55);
  color: rgba(235, 228, 255, 0.92);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 2110;
}
.enter-void-confirm-header h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.enter-void-confirm-description {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(225, 215, 255, 0.86);
}
.enter-void-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.enter-void-confirm-actions button {
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid rgba(210, 185, 255, 0.35);
  background: rgba(32, 18, 60, 0.82);
  color: #f2e8ff;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, opacity 140ms ease;
}
.enter-void-confirm-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(230, 210, 255, 0.65);
  box-shadow: 0 12px 26px rgba(40, 16, 70, 0.45);
}
.enter-void-confirm-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}
.enter-void-confirm-cancel {
  background: rgba(12, 8, 22, 0.78);
}
.enter-void-confirm-accept {
  background: linear-gradient(
    160deg,
    rgba(80, 255, 202, 0.92),
    rgba(64, 185, 255, 0.9)
  );
  color: rgba(7, 22, 28, 0.95);
  border-color: rgba(90, 240, 220, 0.55);
}
.enter-void-note {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: rgba(210, 195, 255, 0.7);
}
.remote-operations-minigame {
  margin-top: 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(130, 225, 190, 0.38);
  background: rgba(6, 24, 16, 0.72);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}
.remote-operations-description {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(200, 245, 220, 0.78);
}
.miney-ship-ui {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.miney-ship-ui[data-state="hidden"] {
  display: none;
}
.miney-ship-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.miney-ship-metrics {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(220, 255, 240, 0.9);
}
.miney-ship-metrics strong {
  font-size: 1rem;
  color: #ffffff;
  letter-spacing: 0.05em;
}
.miney-ship-canvas {
  width: 100%;
  max-width: 360px;
  align-self: center;
  border-radius: 16px;
  border: 1px solid rgba(120, 220, 185, 0.45);
  background: radial-gradient(
    circle at 30% 30%,
    rgba(45, 95, 75, 0.55),
    #051713
  );
  box-shadow: 0 20px 36px rgba(6, 18, 12, 0.55),
    inset 0 0 24px rgba(0, 0, 0, 0.55);
}
.miney-ship-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(3, 12, 8, 0.75);
  text-align: center;
  padding: 1.5rem;
}
.miney-ship-overlay[hidden] {
  display: none;
}
.miney-ship-overlay h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: rgba(220, 255, 240, 0.94);
  text-transform: uppercase;
}
.miney-ship-overlay p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(200, 245, 225, 0.78);
}

@media (max-width: 900px) {
  .stock-exchange-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-exchange-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stock-exchange-form {
    flex-direction: column;
  }
}

.inventory-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.75);
  backdrop-filter: blur(3px);
  z-index: 38;
}

.inventory-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, 96%);
  max-height: min(85vh, 620px);
  padding: 30px;
  background: rgba(14, 20, 30, 0.95);
  border: 3px solid rgba(255, 200, 120, 0.6);
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(255, 160, 60, 0.28),
    inset 0 0 24px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden auto;
  z-index: 39;
}

.inventory-overlay[hidden],
.inventory-modal[hidden] {
  display: none !important;
}

.inventory-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inventory-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 220, 170, 0.95);
}

.inventory-modal-close {
  border: 2px solid rgba(255, 200, 120, 0.7);
  border-radius: 8px;
  background: rgba(40, 20, 10, 0.85);
  color: rgba(255, 235, 200, 0.92);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.inventory-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(255, 200, 120, 0.45);
}

.inventory-modal-close:active {
  transform: scale(0.95);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.inventory-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 12px;
  border: 2px solid rgba(255, 200, 120, 0.35);
  background: rgba(34, 18, 12, 0.82);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55),
    0 0 16px rgba(255, 180, 90, 0.18);
}

.inventory-status {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(255, 220, 170, 0.78);
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
}

.inventory-use-button {
  padding: 8px 14px;
  width: 100%;
  border-radius: 8px;
  border: 2px solid rgba(255, 200, 120, 0.55);
  background: linear-gradient(
    180deg,
    rgba(60, 34, 18, 0.95),
    rgba(120, 60, 24, 0.9)
  );
  color: rgba(255, 235, 210, 0.92);
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.inventory-use-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 200, 120, 0.35);
}

.inventory-use-button:active:not(:disabled) {
  transform: scale(0.97);
}

.inventory-use-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.devtools-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 80;
}

.devtools-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92%);
  padding: 20px 22px 24px;
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.95);
  border: 1px solid rgba(160, 200, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  z-index: 81;
}

.devtools-overlay[hidden],
.devtools-modal[hidden] {
  display: none !important;
}

.devtools-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / span 2;
}

.devtools-modal-title {
  margin: 0;
}

.devtools-modal-header h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(200, 230, 255, 0.9);
}

.devtools-modal-close {
  border: 1px solid rgba(160, 200, 255, 0.6);
  border-radius: 6px;
  background: rgba(20, 26, 38, 0.85);
  color: rgba(200, 225, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.devtools-modal-close:hover {
  background: rgba(34, 46, 68, 0.9);
  box-shadow: 0 0 12px rgba(160, 200, 255, 0.35);
}

.devtools-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.devtools-button {
  border: 1px solid rgba(160, 200, 255, 0.6);
  background: rgba(34, 46, 68, 0.85);
  color: rgba(220, 235, 255, 0.92);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.devtools-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(160, 200, 255, 0.35);
}

.devtools-button:active {
  transform: translateY(0);
  opacity: 0.85;
}

.devtools-note {
  grid-column: 1 / span 2;
  margin: 0;
  font-size: 0.72rem;
  color: rgba(180, 210, 240, 0.65);
  text-align: center;
}

.devtools-note {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(180, 210, 240, 0.65);
  text-align: center;
}

/* Save Generator Modal */
.save-generator-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  z-index: 90;
}

.save-generator-overlay[hidden],
.save-generator-modal[hidden] {
  display: none !important;
}

.save-generator-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 94%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.96);
  border: 2px solid rgba(160, 200, 255, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 91;
}

.save-generator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.save-generator-header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(200, 230, 255, 0.95);
}

.save-generator-close {
  border: 1px solid rgba(160, 200, 255, 0.6);
  border-radius: 6px;
  background: rgba(20, 26, 38, 0.85);
  color: rgba(200, 225, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.save-generator-close:hover {
  background: rgba(34, 46, 68, 0.9);
  box-shadow: 0 0 12px rgba(160, 200, 255, 0.35);
}

.save-generator-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.save-generator-description {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(180, 200, 220, 0.85);
  line-height: 1.5;
}

.save-generator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.save-generator-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.save-generator-field label {
  font-size: 0.8rem;
  color: rgba(180, 200, 220, 0.9);
  letter-spacing: 0.03em;
}

.save-generator-field input {
  padding: 8px 10px;
  border: 1px solid rgba(160, 200, 255, 0.4);
  border-radius: 6px;
  background: rgba(20, 26, 38, 0.8);
  color: rgba(220, 235, 255, 0.95);
  font-family: inherit;
  font-size: 0.85rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.save-generator-field input:focus {
  outline: none;
  border-color: rgba(160, 200, 255, 0.7);
  box-shadow: 0 0 8px rgba(160, 200, 255, 0.25);
}

.save-generator-actions {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.save-generator-button {
  border: 1px solid rgba(160, 200, 255, 0.6);
  background: rgba(34, 46, 68, 0.85);
  color: rgba(220, 235, 255, 0.92);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.save-generator-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(160, 200, 255, 0.3);
}

.save-generator-button:active {
  transform: translateY(0);
}

.save-generator-output {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(160, 200, 255, 0.2);
}

.save-generator-output label {
  font-size: 0.85rem;
  color: rgba(180, 200, 220, 0.9);
  letter-spacing: 0.03em;
}

.save-generator-textarea {
  padding: 12px;
  border: 1px solid rgba(160, 200, 255, 0.4);
  border-radius: 6px;
  background: rgba(20, 26, 38, 0.9);
  color: rgba(220, 235, 255, 0.95);
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  resize: vertical;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.save-generator-textarea:hover,
.save-generator-textarea:focus {
  outline: none;
  border-color: rgba(160, 200, 255, 0.7);
  box-shadow: 0 0 8px rgba(160, 200, 255, 0.25);
}

.save-generator-instructions {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(180, 200, 220, 0.7);
  line-height: 1.5;
}

.inventory-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 12px rgba(255, 200, 120, 0.35);
}

.inventory-icon--blue {
  background: linear-gradient(135deg, #50c7ff, #0b1dff);
}

.inventory-icon--red {
  background: linear-gradient(135deg, #ff6f3c, #cc0202);
}

.inventory-icon--green {
  background: linear-gradient(135deg, #65ff90, #09a25f);
}

.inventory-icon--chips {
  background: linear-gradient(135deg, #70e1ff, #1a53ff);
}

.inventory-icon--spice {
  background: linear-gradient(135deg, #ff8a5c, #ab1fff);
}

.inventory-icon--soda {
  background: linear-gradient(135deg, #5bffcc, #14a7ff);
}

.inventory-icon--super-soda {
  background: linear-gradient(135deg, #ffef89, #ff5fb3);
}

.inventory-icon--spacecoin-rig {
  background: linear-gradient(135deg, #ffd480, #ff9330);
}
.inventory-icon--void-gem {
}

.inventory-icon--space-time-dilator {
  background: linear-gradient(135deg, #00b8d4, #004d99);
  box-shadow: 0 0 16px rgba(0, 184, 212, 0.6);
}
  background: linear-gradient(135deg, #7c4dff, #120033);
  box-shadow: 0 0 16px rgba(140, 90, 255, 0.6);
}

.inventory-name {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 220, 170, 0.9);
}

.inventory-count {
  font-size: 0.82rem;
  color: rgba(255, 245, 220, 0.9);
}

.achievement-desc {
  font-size: 0.7rem;
  color: rgba(255, 220, 190, 0.75);
  margin: 0;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.achievement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid rgba(255, 220, 160, 0.4);
  background: rgba(30, 16, 10, 0.88);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(255, 180, 120, 0.3);
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.achievement-card.locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.achievement-card.unlocked {
  border-color: rgba(120, 255, 190, 0.65);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(120, 255, 190, 0.35);
}

.achievement-title {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 235, 200, 0.9);
}

.achievement-reward {
  font-size: 0.72rem;
  color: rgba(200, 255, 220, 0.85);
}

.achievement-progress {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(255, 220, 200, 0.8);
}

.clear-save-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 2, 2, 0.78);
  backdrop-filter: blur(2px);
  z-index: 32;
}

.clear-save-overlay.is-open {
  display: block;
}

.clear-save-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92%);
  padding: 26px;
  background: rgba(30, 4, 6, 0.94);
  border: 3px solid rgba(255, 90, 60, 0.6);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(255, 70, 20, 0.45),
    inset 0 0 24px rgba(0, 0, 0, 0.7);
  flex-direction: column;
  gap: 18px;
  z-index: 33;
}

.clear-save-modal.is-open {
  display: flex;
}

.clear-save-modal[hidden],
.clear-save-overlay[hidden] {
  display: none !important;
}

.clear-save-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 140, 120, 0.95);
}

.clear-save-description {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 225, 220, 0.78);
}

.clear-save-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.clear-save-actions button {
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.clear-save-cancel {
  border: 2px solid rgba(255, 120, 0, 0.55);
  background: rgba(30, 12, 8, 0.85);
  color: rgba(255, 210, 190, 0.95);
  box-shadow: 0 0 18px rgba(255, 110, 30, 0.28);
}

.clear-save-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255, 150, 60, 0.38);
}

.clear-save-confirm {
  border: 2px solid rgba(255, 120, 90, 0.85);
  background: linear-gradient(
    180deg,
    rgba(255, 100, 60, 0.96),
    rgba(160, 30, 20, 0.94)
  );
  color: #ffeaea;
  box-shadow: 0 0 24px rgba(255, 80, 50, 0.4);
}

.clear-save-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(255, 120, 90, 0.5);
}

.clear-save-confirm:active,
.clear-save-cancel:active {
  transform: scale(0.97);
}

.clear-save-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.casino-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 6, 26, 0.78);
  backdrop-filter: blur(3px);
  z-index: 34;
}

.casino-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1300px, 100%);
  max-height: min(110vh, 1500px);
  padding: 28px;
  background: rgba(24, 12, 34, 0.96);
  border: 3px solid rgba(235, 200, 255, 0.6);
  border-radius: 18px;
  box-shadow: 0 0 42px rgba(210, 180, 255, 0.32),
    inset 0 0 28px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden auto;
  z-index: 35;
}

.casino-overlay[hidden],
.casino-modal[hidden] {
  display: none !important;
}

.casino-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.casino-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 215, 255, 0.95);
}

.casino-modal-close {
  border: 2px solid rgba(235, 200, 255, 0.7);
  border-radius: 8px;
  background: rgba(34, 12, 46, 0.85);
  color: rgba(250, 238, 255, 0.92);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(235, 200, 255, 0.45);
}

.casino-modal-close:active {
  transform: scale(0.95);
}

.casino-modal-description {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(240, 220, 255, 0.78);
}

.casino-balance {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(235, 210, 255, 0.82);
}

.casino-balance-value {
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(255, 245, 255, 0.95);
}

.casino-game-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.casino-game-selector button {
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid rgba(235, 200, 255, 0.55);
  background: linear-gradient(
    135deg,
    rgba(80, 32, 120, 0.95),
    rgba(36, 10, 68, 0.9)
  );
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.casino-game-selector button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(220, 190, 255, 0.4);
}

.casino-game-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.casino-game-view[hidden] {
  display: none !important;
}

.casino-back-button {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid rgba(235, 200, 255, 0.5);
  background: rgba(34, 12, 46, 0.85);
  color: rgba(250, 238, 255, 0.92);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-back-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(235, 200, 255, 0.35);
}

.casino-game {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  border: 2px solid rgba(235, 200, 255, 0.42);
  background: rgba(30, 12, 44, 0.88);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(210, 180, 255, 0.26);
}

.casino-game-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.casino-accordion-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.casino-accordion-toggle h3 {
  pointer-events: none;
}

.casino-accordion-toggle:focus-visible {
  outline: 2px solid rgba(235, 200, 255, 0.75);
  outline-offset: 4px;
}

.casino-toggle-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(235, 200, 255, 0.5);
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.casino-accordion-toggle[aria-expanded="true"] .casino-toggle-indicator {
  transform: rotate(45deg);
}

.casino-game-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.casino-game-panel[hidden] {
  display: none !important;
}

.casino-game-header h3 {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 215, 255, 0.92);
}

.casino-game-wager {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(245, 225, 255, 0.75);
}

.casino-game-description {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: rgba(235, 215, 255, 0.76);
}

.casino-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.casino-options button {
  flex: 1 1 130px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid rgba(235, 200, 255, 0.55);
  background: linear-gradient(
    135deg,
    rgba(70, 30, 110, 0.92),
    rgba(40, 12, 68, 0.9)
  );
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-options button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(230, 190, 255, 0.42);
}

.casino-options button:active:not(:disabled) {
  transform: translateY(0);
}

.casino-options button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.casino-blackjack-wagers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.casino-blackjack-wagers button {
  flex: 1 1 160px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid rgba(235, 200, 255, 0.55);
  background: linear-gradient(
    135deg,
    rgba(60, 25, 105, 0.92),
    rgba(28, 10, 54, 0.9)
  );
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-blackjack-wagers button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(230, 190, 255, 0.42);
}

.casino-blackjack-wagers button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.casino-blackjack-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(235, 200, 255, 0.3);
  background: rgba(42, 18, 60, 0.65);
}

.casino-blackjack-hand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.casino-blackjack-hand h4 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 215, 255, 0.88);
}

.casino-blackjack-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.casino-blackjack-card {
  min-width: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 245, 255, 0.95);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.casino-blackjack-card--hidden {
  background: rgba(20, 8, 30, 0.8);
  border-style: dashed;
  color: rgba(200, 180, 220, 0.6);
}

.casino-blackjack-total {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(230, 210, 255, 0.78);
}

.casino-blackjack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.casino-blackjack-actions button {
  flex: 1 1 120px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid rgba(235, 200, 255, 0.5);
  background: linear-gradient(
    135deg,
    rgba(54, 20, 84, 0.92),
    rgba(24, 6, 48, 0.9)
  );
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-blackjack-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(210, 180, 255, 0.38);
}

.casino-blackjack-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.casino-result,
.casino-loading {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: rgba(240, 220, 255, 0.8);
}

.casino-result--win {
  color: rgba(140, 255, 200, 0.88);
}

.casino-result--loss {
  color: rgba(255, 190, 160, 0.85);
}

.casino-result--error {
  color: rgba(255, 160, 160, 0.88);
}

.casino-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(220, 200, 255, 0.82);
}

.casino-loading[hidden],
.casino-result[hidden] {
  display: none !important;
}

.casino-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(220, 200, 255, 0.5);
  border-top-color: rgba(220, 200, 255, 0.95);
  animation: casino-spin 0.8s linear infinite;
}

@keyframes casino-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .doom-hud {
    grid-template-columns: 1fr;
  }

  .hud-segment.profile {
    justify-content: center;
  }

  .arena {
    grid-template-columns: 1fr;
  }

  .asteroid-orbit {
    min-height: 320px;
    padding-bottom: 160px;
  }

  .readout {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 30px;
  }

  .log-base-row {
    grid-template-columns: 1fr;
  }

  .space-base-stats-button {
    padding: 14px;
  }

  .space-base-marketplace-button {
    padding: 14px;
  }

  .space-base-achievements-button {
    padding: 14px;
  }

  .space-base-casino-button {
    padding: 14px;
  }

  .space-base-fabrication-button {
    padding: 14px;
  }

  .space-base-contracts {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    padding: 20px 10px;
  }

  #game-root {
    gap: 16px;
  }

  .asteroid-orbit {
    padding-bottom: 60px;
  }

  .readout {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .space-base-stats-button {
    padding: 12px;
    gap: 6px;
  }

  .space-base-marketplace-button {
    padding: 12px;
    gap: 6px;
  }

  .space-base-achievements-button {
    padding: 12px;
    gap: 6px;
  }

  .space-base-casino-button {
    padding: 12px;
    gap: 6px;
  }

  .space-base-fabrication-button {
    padding: 12px;
    gap: 6px;
  }

  .space-base-contracts {
    grid-template-columns: 1fr;
  }

  .casino-modal {
    padding: 22px;
    gap: 16px;
  }

  .casino-game {
    padding: 16px;
  }

  .casino-options {
    flex-direction: column;
  }

  .casino-options button {
    flex: 1 1 auto;
  }

  .upgrade-card {
    min-height: auto;
  }

  .integrity-panel {
    position: static;
    transform: none;
    margin-top: 12px;
    width: 100%;
  }
}

.marketplace-cost {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(190, 255, 240, 0.78);
}

.marketplace-exchange-button {
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid rgba(150, 255, 240, 0.6);
  background: linear-gradient(
    180deg,
    rgba(120, 255, 240, 0.92),
    rgba(10, 90, 100, 0.92)
  );
  color: rgba(6, 24, 26, 0.94);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.marketplace-exchange-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(120, 255, 230, 0.4);
}

.marketplace-exchange-button:active:not(:disabled) {
  transform: scale(0.97);
}

.marketplace-exchange-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.marketplace-note {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: rgba(185, 255, 240, 0.65);
}

.operations-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
  margin-top: 30px;
}

.upgrade-bay,
.space-base {
  height: 100%;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
}

.upgrade-card {
  border: 2px solid rgba(120, 220, 255, 0.45);
  background: rgba(10, 6, 30, 0.85);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(40, 110, 255, 0.2);
  position: relative;
}

.upgrade-key-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(120, 220, 255, 0.6);
  background: rgba(18, 12, 40, 0.85);
  color: rgba(200, 235, 255, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.warp-lines,
.warp-flecks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.22;
}

.warp-lines {
  opacity: 0.27;
  mix-blend-mode: screen;
}

.warp-flecks {
  opacity: 0.28;
  mix-blend-mode: lighten;
}

.info-toggle {
  position: absolute;
  top: 18px;
  right: 138px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(120, 220, 255, 0.6);
  background: rgba(14, 24, 36, 0.85);
  color: rgba(160, 230, 255, 0.92);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(80, 180, 255, 0.32);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  z-index: 18;
}

.help-toggle {
  position: absolute;
  top: 18px;
  right: 78px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(254, 240, 54, 0.6);
  background: rgba(16, 24, 36, 0.85);
  color: rgba(225, 214, 53, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(237, 255, 75, 0.357);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  z-index: 18;
}

.help-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(120, 220, 255, 0.45);
}

.help-toggle:active {
  transform: scale(0.95);
}

.info-toggle:hover {
  transform: scale(1.04);
  box-shadow: 0 0 22px rgba(120, 220, 255, 0.45);
}

.info-toggle:active {
  transform: scale(0.96);
}

.info-overlay,
.welcome-overlay,
.away-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 24, 0.78);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.info-panel,
.welcome-modal,
.away-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92%);
  background: rgba(20, 10, 24, 0.96);
  border: 3px solid rgba(110, 200, 255, 0.55);
  border-radius: 16px;
  box-shadow: 0 0 36px rgba(110, 210, 255, 0.35),
    inset 0 0 22px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  z-index: 41;
}

.welcome-modal {
  width: min(500px, 92%);
  border-color: rgba(140, 220, 255, 0.55);
  box-shadow: 0 0 44px rgba(110, 210, 255, 0.32),
    inset 0 0 22px rgba(0, 0, 0, 0.6);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.info-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(140, 220, 255, 0.95);
}

.info-close {
  border: 2px solid rgba(110, 200, 255, 0.5);
  border-radius: 8px;
  background: rgba(10, 24, 36, 0.85);
  color: rgba(200, 240, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.info-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(120, 220, 255, 0.42);
}

.info-close:active {
  transform: scale(0.95);
}

.info-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: rgba(215, 235, 255, 0.8);
  font-size: 0.78rem;
  line-height: 1.55;
}

.info-version div {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(160, 230, 255, 0.92);
}

.info-version dd {
  margin: 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.info-version dt {
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.info-credits h3,
.info-description h3 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(140, 220, 255, 0.92);
}

.credit-name {
  color: rgba(255, 215, 180, 0.88);
}

.info-overlay[hidden],
.info-panel[hidden],
.welcome-overlay[hidden],
.welcome-modal[hidden],
.away-modal-overlay[hidden],
.away-modal[hidden] {
  display: none !important;
}

.info-panel:focus {
  outline: none;
}

.welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.welcome-logo {
  height: auto;
  flex-shrink: 0;
  width: 100%;
  position: relative;
  border-radius: 14px;
  mask-image: radial-gradient(circle at 50% 20%, #000 60%, transparent 98%);
  -webkit-mask-image: radial-gradient(
    circle at 50% 20%,
    #000 60%,
    transparent 98%
  );
  overflow: hidden;
}

.welcome-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 230, 255, 0.95);
}

.welcome-close {
  border: 2px solid rgba(140, 220, 255, 0.5);
  border-radius: 8px;
  background: rgba(10, 24, 36, 0.85);
  color: rgba(215, 240, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.welcome-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(140, 220, 255, 0.42);
}

.welcome-close:active {
  transform: scale(0.95);
}

.welcome-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: rgba(215, 235, 255, 0.82);
  font-size: 0.8rem;
  line-height: 1.6;
}

.welcome-actions {
  display: flex;
  justify-content: flex-end;
}

.welcome-primary {
  border: 2px solid rgba(140, 220, 255, 0.55);
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(40, 80, 120, 0.95),
    rgba(14, 38, 56, 0.9)
  );
  color: rgba(220, 245, 255, 0.92);
  font-family: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 140ms ease, opacity 120ms ease;
}

.welcome-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(110, 210, 255, 0.45);
}

.welcome-primary:active {
  transform: translateY(0);
}

.away-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.away-modal-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 230, 255, 0.95);
}

.away-modal-close {
  border: 2px solid rgba(140, 220, 255, 0.5);
  border-radius: 8px;
  background: rgba(10, 24, 36, 0.85);
  color: rgba(215, 240, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.away-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(140, 220, 255, 0.42);
}

.away-modal-close:active {
  transform: scale(0.95);
}

.away-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: rgba(215, 235, 255, 0.82);
  font-size: 0.8rem;
  line-height: 1.55;
}

.away-modal-duration {
  margin: 0;
  font-weight: 600;
  color: rgba(160, 230, 255, 0.92);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.away-modal-events {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: disc;
}

.away-modal-events li {
  line-height: 1.5;
}

.away-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.away-modal-confirm {
  border: 2px solid rgba(140, 220, 255, 0.55);
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(40, 80, 120, 0.95),
    rgba(14, 38, 56, 0.9)
  );
  color: rgba(220, 245, 255, 0.92);
  font-family: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 140ms ease, opacity 120ms ease;
}

.away-modal-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(110, 210, 255, 0.45);
}

.away-modal-confirm:active {
  transform: translateY(0);
}

.casino-options button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.casino-game--derby {
  gap: 18px;
}

.casino-derby-odds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.casino-derby-odds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid rgba(235, 200, 255, 0.4);
  background: rgba(34, 12, 58, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(240, 225, 255, 0.85);
}

.casino-derby-selection,
.casino-derby-bets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.casino-derby-selection button,
.casino-derby-bets button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid rgba(235, 200, 255, 0.55);
  background: linear-gradient(
    135deg,
    rgba(70, 28, 110, 0.92),
    rgba(30, 10, 60, 0.9)
  );
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-derby-selection button::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--derby-color, rgba(220, 210, 255, 0.9));
  box-shadow: 0 0 10px var(--derby-color, rgba(220, 210, 255, 0.4));
}

.casino-derby-selection button.is-selected,
.casino-derby-bets button.is-selected {
  box-shadow: 0 0 20px rgba(225, 200, 255, 0.4);
  border-color: rgba(235, 200, 255, 0.8);
}

.casino-derby-selection button:hover:not(:disabled),
.casino-derby-bets button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(220, 190, 255, 0.42);
}

.casino-derby-selection button:disabled,
.casino-derby-bets button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.casino-derby-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 14px;
  border: 2px solid rgba(235, 200, 255, 0.38);
  background: rgba(20, 6, 32, 0.9);
  overflow: hidden;
}

.casino-derby-lane {
  position: relative;
  width: 100%;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.casino-derby-lane-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(225, 215, 255, 0.75);
}

.casino-derby-asteroid {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
  transition: left 120ms ease;
}

.casino-derby-actions {
  display: flex;
  justify-content: center;
}

.casino-derby-actions button {
  padding: 12px 24px;
  border-radius: 12px;
  border: 2px solid rgba(235, 200, 255, 0.6);
  background: linear-gradient(
    135deg,
    rgba(76, 30, 118, 0.95),
    rgba(36, 10, 60, 0.9)
  );
  color: rgba(250, 240, 255, 0.94);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.casino-derby-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(225, 200, 255, 0.4);
}

.casino-derby-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.achievements-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border: 2px solid rgba(235, 210, 255, 0.35);
  border-radius: 999px;
  padding: 6px;
  background: rgba(26, 12, 42, 0.85);
}

.achievements-filter-button {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(235, 225, 255, 0.7);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.achievements-filter-button:hover {
  color: rgba(245, 235, 255, 0.9);
}

.achievements-filter-button--active {
  background: linear-gradient(
    135deg,
    rgba(88, 44, 140, 0.92),
    rgba(48, 16, 84, 0.9)
  );
  color: rgba(255, 245, 255, 0.95);
  box-shadow: 0 0 16px rgba(220, 200, 255, 0.35);
}

.achievements-filter-button:focus-visible {
  outline: 2px solid rgba(235, 210, 255, 0.75);
  outline-offset: 2px;
}

.achievements-empty {
  margin: 12px 0;
  padding: 24px;
  border-radius: 14px;
  border: 2px dashed rgba(235, 210, 255, 0.35);
  background: rgba(24, 10, 38, 0.8);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: rgba(235, 225, 255, 0.75);
}

.save-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.save-import-actions button {
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.save-import-copy {
  border: 2px solid rgba(120, 200, 255, 0.6);
  background: rgba(10, 18, 32, 0.9);
  color: rgba(210, 235, 255, 0.92);
  box-shadow: 0 0 18px rgba(120, 200, 255, 0.24);
}

.save-import-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(140, 220, 255, 0.32);
}
