
/* ============================================================
   ANOTHER STATION // MIDNIGHT CITY
   Entry + runtime system shell V1.0
   ============================================================ */

:root {
  --station-cyan: #63ecf3;
  --station-cyan-dim: rgba(99, 236, 243, 0.58);
  --station-cyan-soft: rgba(99, 236, 243, 0.12);
  --station-ink: #02070d;
  --station-panel: rgba(4, 12, 20, 0.78);
  --station-panel-strong: rgba(2, 8, 14, 0.94);
  --station-line: rgba(99, 236, 243, 0.24);
  --station-text: rgba(231, 252, 255, 0.94);
  --station-muted: rgba(186, 221, 226, 0.62);
  --station-ok: #70f5b2;
}

.station-legacy-entry {
  display: none !important;
}

.station-entry-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: clamp(18px, 4vw, 56px);
  font-family: "Share Tech Mono", monospace;
  color: var(--station-text);
  pointer-events: auto;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 20%, rgba(29, 183, 229, 0.12), transparent 34%),
    radial-gradient(circle at 80% 72%, rgba(116, 67, 255, 0.13), transparent 35%),
    linear-gradient(180deg, rgba(2, 7, 13, 0.42), rgba(2, 6, 12, 0.76));
  opacity: 1;
  transition: opacity 420ms ease, transform 520ms ease;
}

.station-entry-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      rgba(96, 236, 243, 0.035) 4px
    );
}

.station-entry-shell.is-leaving {
  opacity: 0;
  transform: scale(1.012);
  pointer-events: none;
}

.station-entry-shell.is-hidden {
  display: none;
}

.station-entry-frame {
  width: min(980px, 100%);
  border: 1px solid var(--station-line);
  background:
    linear-gradient(135deg, rgba(7, 22, 31, 0.94), rgba(4, 10, 17, 0.88));
  box-shadow:
    0 28px 100px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
}

.station-entry-topbar {
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--station-line);
  background: rgba(99, 236, 243, 0.035);
}

.station-entry-signal {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--station-cyan);
  letter-spacing: 0.11em;
  font-size: 12px;
}

.station-entry-dot,
.station-system-trigger-dot,
.station-status-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--station-ok);
  box-shadow: 0 0 14px rgba(112, 245, 178, 0.7);
}

.station-language-switch,
.station-system-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--station-line);
  background: rgba(0, 0, 0, 0.2);
}

.station-language-switch button,
.station-system-segmented button {
  border: 0;
  min-width: 42px;
  padding: 7px 10px;
  color: var(--station-muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.station-language-switch button.is-active,
.station-system-segmented button.is-active {
  color: #021014;
  background: var(--station-cyan);
  box-shadow: 0 0 18px rgba(99, 236, 243, 0.18);
}

.station-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
}

.station-entry-main {
  min-height: 390px;
  padding: clamp(28px, 5vw, 56px);
  border-right: 1px solid var(--station-line);
}

.station-entry-kicker,
.station-system-kicker {
  margin-bottom: 22px;
  color: var(--station-cyan-dim);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.station-entry-main h1 {
  margin: 0;
  color: #e9fdff;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-shadow: 0 0 34px rgba(99, 236, 243, 0.09);
}

.station-entry-lead {
  max-width: 650px;
  margin: 30px 0 8px;
  color: var(--station-cyan);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.35;
}

.station-entry-body {
  max-width: 650px;
  margin: 0;
  color: var(--station-muted);
  font-size: 14px;
  line-height: 1.65;
}

.station-entry-status-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.station-entry-status {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(99, 236, 243, 0.12);
  background: rgba(99, 236, 243, 0.025);
  color: var(--station-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.station-entry-status .station-status-led {
  grid-row: 1 / 3;
}

.station-entry-status strong {
  color: var(--station-ok);
  font-size: 11px;
  font-weight: 400;
}

.station-entry-side {
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(99, 236, 243, 0.035), transparent 62%);
}

.station-entry-side-title {
  color: var(--station-cyan);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.station-entry-side p {
  color: var(--station-muted);
  font-size: 12px;
  line-height: 1.65;
}

.station-entry-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--station-line);
}

.station-entry-side .station-entry-muted {
  color: rgba(186, 221, 226, 0.48);
}

.station-entry-meta {
  margin: auto 0 0;
  display: grid;
  gap: 9px;
}

.station-entry-meta div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 9px;
  border-top: 1px solid rgba(99, 236, 243, 0.08);
}

.station-entry-meta dt,
.station-entry-meta dd {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.09em;
}

.station-entry-meta dt {
  color: var(--station-muted);
}

.station-entry-meta dd {
  color: var(--station-cyan);
  text-align: right;
}

.station-entry-footer {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) 1fr;
  align-items: stretch;
  border-top: 1px solid var(--station-line);
}

#stationEntryLaunch {
  min-height: 66px;
  border: 0;
  border-right: 1px solid var(--station-line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  color: #021014;
  background: var(--station-cyan);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: filter 160ms ease, opacity 160ms ease;
}

#stationEntryLaunch:disabled {
  color: rgba(231, 252, 255, 0.44);
  background: rgba(99, 236, 243, 0.08);
  cursor: wait;
}

#stationEntryLaunch:not(:disabled):hover {
  filter: brightness(1.08);
}

.station-launch-icon {
  font-size: 11px;
}

.station-entry-credit {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: rgba(186, 221, 226, 0.42);
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

/* Runtime system --------------------------------------------------- */

.station-system-trigger {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 3500;
  min-height: 34px;
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(99, 236, 243, 0.24);
  padding: 0 10px;
  color: rgba(220, 250, 253, 0.78);
  background: rgba(3, 11, 18, 0.64);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.2);
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0.78;
}

.station-system-trigger.is-ready {
  display: inline-flex;
}

.station-system-trigger:hover {
  opacity: 1;
  border-color: rgba(99, 236, 243, 0.52);
}

.station-system-trigger kbd {
  margin-left: 3px;
  border: 1px solid rgba(99, 236, 243, 0.18);
  padding: 2px 5px;
  color: var(--station-cyan);
  background: rgba(99, 236, 243, 0.05);
  font: inherit;
  font-size: 9px;
}

.station-system-panel {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(1, 5, 10, 0.48);
  backdrop-filter: blur(8px);
  font-family: "Share Tech Mono", monospace;
  color: var(--station-text);
  pointer-events: auto;
}

.station-system-panel.is-open {
  display: flex;
}

.station-system-card {
  width: min(470px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--station-line);
  background: var(--station-panel-strong);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.58);
}

.station-system-header {
  padding: 22px 22px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--station-line);
}

.station-system-header h2 {
  margin: 0;
  color: #e9fdff;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.station-system-header p {
  margin: 5px 0 0;
  color: var(--station-muted);
  font-size: 11px;
}

.station-system-header .station-system-kicker {
  margin: 0 0 8px;
}

.station-system-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--station-line);
  color: var(--station-cyan);
  background: rgba(99, 236, 243, 0.04);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.station-system-section {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(99, 236, 243, 0.11);
}

.station-system-section-head {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--station-cyan);
  font-size: 10px;
  letter-spacing: 0.13em;
}

.station-system-section-head output {
  color: var(--station-ok);
}

.station-system-grid {
  display: grid;
  gap: 6px;
}

.station-system-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.station-system-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.station-system-grid button {
  min-height: 58px;
  border: 1px solid rgba(99, 236, 243, 0.13);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 9px 10px;
  color: var(--station-muted);
  background: rgba(99, 236, 243, 0.025);
  font: inherit;
  cursor: pointer;
}

.station-system-grid button strong {
  color: inherit;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.station-system-grid button small {
  color: rgba(186, 221, 226, 0.42);
  font-size: 9px;
}

.station-system-grid button.is-active {
  border-color: rgba(99, 236, 243, 0.58);
  color: #eafcff;
  background: rgba(99, 236, 243, 0.1);
  box-shadow: inset 0 0 0 1px rgba(99, 236, 243, 0.05);
}

.station-system-grid button.is-active small {
  color: var(--station-ok);
}

.station-system-note,
.station-system-controls p {
  margin: 10px 0 0;
  color: rgba(186, 221, 226, 0.5);
  font-size: 10px;
  line-height: 1.55;
}

.station-system-footer {
  padding: 16px 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.station-system-footer button {
  min-height: 38px;
  border: 1px solid var(--station-line);
  padding: 0 14px;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.station-system-reset {
  color: var(--station-muted);
  background: transparent;
}

.station-system-done {
  color: #031116;
  background: var(--station-cyan);
}

/* Keep the shell practical on smaller displays. */
@media (max-width: 820px) {
  .station-entry-shell {
    padding: 12px;
    align-items: start;
  }

  .station-entry-frame {
    margin: 10px 0;
  }

  .station-entry-grid {
    grid-template-columns: 1fr;
  }

  .station-entry-main {
    min-height: auto;
    padding: 32px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--station-line);
  }

  .station-entry-side {
    padding: 22px 24px;
  }

  .station-entry-status-grid {
    grid-template-columns: 1fr;
  }

  .station-entry-footer {
    grid-template-columns: 1fr;
  }

  #stationEntryLaunch {
    border-right: 0;
    border-bottom: 1px solid var(--station-line);
  }

  .station-system-panel {
    align-items: flex-end;
    padding: 0;
  }

  .station-system-card {
    width: 100%;
    max-height: min(86vh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .station-system-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .station-entry-topbar {
    padding: 0 12px;
  }

  .station-entry-signal {
    font-size: 9px;
  }

  .station-entry-main h1 {
    font-size: clamp(38px, 16vw, 62px);
  }

  .station-system-trigger {
    top: 10px;
    left: 10px;
  }
}


/* Pause / resume layer after pointer lock is released. */
.station-resume-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(1, 5, 10, 0.58);
  backdrop-filter: blur(12px);
  font-family: "Share Tech Mono", monospace;
  color: var(--station-text);
  pointer-events: auto;
}

.station-world-started #blocker:not(.hide) .station-resume-overlay {
  display: grid;
}

.station-resume-card {
  width: min(440px, 100%);
  border: 1px solid var(--station-line);
  padding: 26px;
  background: rgba(3, 10, 17, 0.94);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.52);
}

.station-resume-card h2 {
  margin: 0;
  color: #e9fdff;
  font-size: 24px;
  font-weight: 400;
}

.station-resume-card p {
  margin: 9px 0 22px;
  color: var(--station-muted);
  font-size: 11px;
  line-height: 1.55;
}

.station-resume-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.station-resume-actions button {
  min-height: 42px;
  border: 1px solid var(--station-line);
  color: var(--station-cyan);
  background: rgba(99, 236, 243, 0.05);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.station-resume-actions button:first-child {
  color: #031116;
  background: var(--station-cyan);
}

.station-system-open #stationResumeOverlay {
  display: none !important;
}
