/* ==========================================================================
   VALKYRIE - VII // SECTOR - 9
   Theme: Interstellar Deep Space / Cold Ice-Blue & Pure High-Contrast White
   ========================================================================== */

:root {
  --ice-white: #f5fbff;
  --ice-blue: #94d6ff;
  --ice-blue-bright: #bde5ff;
  --ice-glow: rgba(148, 214, 255, 0.45);
  --ice-glow-subtle: rgba(148, 214, 255, 0.15);
  --deep-void: #02070d;
  --space-surface: #06111d;
  --panel-bg: rgba(7, 18, 30, 0.94);
  --panel-border: rgba(148, 214, 255, 0.4);
  --text-primary: #ffffff;
  --text-muted: #9dc4dc;
  --font-hud: 'Michroma', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--deep-void);
  font-family: var(--font-hud);
  color: var(--text-primary);
  text-transform: uppercase;
}

/* Ambient Scanlines & Vignette */
.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    rgba(10, 15, 22, 0) 50%, 
    rgba(0, 0, 0, 0.22) 50%
  ), linear-gradient(
    90deg,
    rgba(148, 214, 255, 0.015),
    rgba(0, 0, 0, 0),
    rgba(148, 214, 255, 0.015)
  );
  background-size: 100% 3px, 6px 100%;
  z-index: 999;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 38%, rgba(2, 7, 13, 0.88) 100%);
  z-index: 998;
}

/* Fluid Screen Transition */
.screen-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.screen-view.active {
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   SCREEN A: THE PLANET VIEWPORT (INTERSTELLAR ICE-BLUE)
   No boxed borders, seamless edge-to-edge space approach
   ========================================================================== */
#viewport-screen {
  background: #02070e;
}

.space-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.stars-layer {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 70px 110px, #bde5ff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 140px 60px, #94d6ff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 230px 180px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 340px 220px, #94d6ff, rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 480px 90px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 520px 520px;
  opacity: 0.85;
}

.space-nebula {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(148, 214, 255, 0.12) 0%, transparent 65%);
}

/* Massive planet curve bleeding into bottom */
.planet-assembly {
  position: absolute;
  bottom: -62vh;
  left: 50%;
  transform: translateX(-50%);
  width: 140vw;
  height: 140vw;
  max-width: 1950px;
  max-height: 1950px;
  border-radius: 50%;
  pointer-events: none;
}

.planet-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 10%, #0d283f 0%, #051422 40%, #010408 85%);
  box-shadow: 
    0 -12px 55px rgba(148, 214, 255, 0.5),
    0 -45px 140px rgba(148, 214, 255, 0.3),
    inset 0 25px 90px rgba(189, 229, 255, 0.4);
}

.planet-ice-rim {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 2%, rgba(245, 251, 255, 0.9) 0%, rgba(148, 214, 255, 0.5) 20%, transparent 55%);
  filter: blur(12px);
}

.planet-atmosphere-glow {
  position: absolute;
  inset: -38px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, rgba(148, 214, 255, 0.3) 0%, transparent 65%);
  filter: blur(35px);
}

.planet-surface-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 7, 13, 0.8) 35%, #02070d 90%);
}

.orbital-scan-mesh {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(148, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 214, 255, 0.035) 1px, transparent 1px);
  background-size: 75px 75px;
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 80%);
}

/* Viewport HUD Edge Overlays */
.viewport-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 3rem 4rem;
}

.hud-top-bar, .hud-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.hud-top-bar .accent {
  color: var(--ice-blue-bright);
}

.status-pulse {
  color: var(--ice-white);
  text-shadow: 0 0 10px var(--ice-glow);
  animation: pulse 2.5s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Center Lower Section: Planet Name, Sector, and Lower Dropped Button */
.hero-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2.2rem;
  margin-bottom: 2vh;
}

.planet-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.planet-title {
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: 0.38em;
  color: #ffffff;
  text-shadow: 
    0 0 25px rgba(189, 229, 255, 0.9),
    0 0 50px rgba(148, 214, 255, 0.4);
  margin-right: -0.38em;
}

.planet-subtitle {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.45em;
  color: var(--ice-blue-bright);
  text-shadow: 0 0 10px var(--ice-glow);
  margin-right: -0.45em;
}

/* Tactical Buttons (Ice-Blue / Near-White Accent) */
.tactical-btn {
  position: relative;
  background: rgba(8, 22, 36, 0.75);
  border: 1px solid var(--ice-blue);
  color: var(--ice-white);
  font-family: var(--font-hud);
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  padding: 1.1rem 2.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: 0 0 18px var(--ice-glow-subtle), inset 0 0 10px rgba(148, 214, 255, 0.12);
}

.tactical-btn:hover {
  background: var(--ice-white);
  color: var(--deep-void);
  border-color: #ffffff;
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.9);
}

.tactical-btn.init-btn {
  padding: 1.15rem 3.2rem;
  font-size: 0.95rem;
  background: rgba(6, 20, 34, 0.85);
  border: 1px solid var(--ice-blue-bright);
}

.tactical-btn.compact {
  padding: 0.65rem 1.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

.tactical-btn.full-width {
  width: 100%;
  padding: 1.05rem;
  text-decoration: none;
}

.subtle-btn {
  background: none;
  border: 1px solid rgba(148, 214, 255, 0.4);
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subtle-btn:hover {
  color: var(--ice-white);
  border-color: var(--ice-blue);
}

/* ==========================================================================
   SCREEN B: MISSION CONTROL & OPERATIONS (HIGH CONTRAST & LEGIBILITY)
   ========================================================================== */
#operations-screen {
  background: radial-gradient(circle at 50% 0%, #0c2032 0%, #02070e 90%);
}

.ops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 3.5rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(4, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ops-title-group h2 {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: #fff;
  text-shadow: 0 0 12px var(--ice-glow);
}

.sub-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--ice-blue);
}

.controls-zone {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.counter-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  border: 1px solid var(--panel-border);
  padding: 0.55rem 1.15rem;
  background: rgba(148, 214, 255, 0.08);
}

.counter-badge .badge-label {
  color: var(--text-muted);
  margin-right: 0.4rem;
}

#requisition-count {
  color: var(--ice-white);
  font-weight: bold;
}

.ops-main {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 3.5rem;
  position: relative;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52vh;
  text-align: center;
  gap: 1.3rem;
  max-width: 700px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  border: 1px dashed var(--panel-border);
  background: rgba(7, 20, 32, 0.6);
}

.empty-state h3 {
  font-size: 1.15rem;
  letter-spacing: 0.24em;
  color: var(--ice-white);
  text-shadow: 0 0 10px var(--ice-glow);
}

.empty-state p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  letter-spacing: 0.08em;
  text-transform: none;
}

/* Missions Grid */
.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 2.2rem;
}

.mission-card {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 1.3rem;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--ice-blue-bright);
  border-left: 2px solid var(--ice-blue-bright);
}

.mission-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-bottom: 2px solid var(--ice-blue-bright);
  border-right: 2px solid var(--ice-blue-bright);
}

.mission-card:hover {
  transform: translateY(-4px);
  border-color: var(--ice-white);
  box-shadow: 0 0 28px rgba(148, 214, 255, 0.35);
}

.card-top-id {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ice-blue-bright);
  letter-spacing: 0.16em;
}

.card-image-wrap {
  position: relative;
  width: 100%;
  height: 215px;
  overflow: hidden;
  background: #02070e;
  border: 1px solid rgba(148, 214, 255, 0.25);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.98);
  transition: transform 0.3s ease;
}

.mission-card:hover .card-image-wrap img {
  transform: scale(1.04);
}

.card-details h4 {
  font-size: 0.98rem;
  letter-spacing: 0.16em;
  color: #fff;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
}

.card-price-row .price-val {
  color: var(--ice-white);
  font-size: 1.15rem;
  font-weight: bold;
  text-shadow: 0 0 8px var(--ice-glow);
}

.card-view-tag {
  font-size: 0.74rem;
  color: var(--ice-blue);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   ELEMENT ZERO HUD DOSSIER MODAL (ICE-BLUE OVERLAY)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 11, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.dossier-card {
  position: relative;
  width: 100%;
  max-width: 930px;
  background: rgba(6, 18, 30, 0.98);
  border: 1px solid var(--ice-blue);
  box-shadow: 0 0 55px rgba(148, 214, 255, 0.35), inset 0 0 20px rgba(148, 214, 255, 0.1);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1rem;
}

.tag-alert {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ice-blue-bright);
  letter-spacing: 0.22em;
}

.dossier-header h3 {
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  color: #fff;
  margin: 0.3rem 0;
}

.tag-sub {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.close-hud-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--ice-white);
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-hud-btn:hover {
  background: var(--ice-white);
  color: var(--deep-void);
}

.dossier-body {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
}

.dossier-visual {
  position: relative;
  width: 100%;
  height: 330px;
  border: 1px solid rgba(148, 214, 255, 0.4);
  background: #02070e;
  overflow: hidden;
}

.dossier-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.98);
}

/* Reticle Brackets */
.reticle-tl, .reticle-tr, .reticle-bl, .reticle-br {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--ice-blue-bright);
  z-index: 5;
}
.reticle-tl { top: 6px; left: 6px; border-top: 2px solid; border-left: 2px solid; }
.reticle-tr { top: 6px; right: 6px; border-top: 2px solid; border-right: 2px solid; }
.reticle-bl { bottom: 6px; left: 6px; border-bottom: 2px solid; border-left: 2px solid; }
.reticle-br { bottom: 6px; right: 6px; border-bottom: 2px solid; border-right: 2px solid; }

.scan-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ice-blue-bright);
  box-shadow: 0 0 12px var(--ice-blue);
  animation: scanSweep 3s infinite linear;
  z-index: 4;
}

@keyframes scanSweep {
  0% { top: 0%; opacity: 0.9; }
  50% { top: 100%; opacity: 0.9; }
  100% { top: 0%; opacity: 0.9; }
}

.visual-status-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  background: rgba(4, 12, 20, 0.9);
  border: 1px solid var(--ice-blue);
  padding: 0.25rem 0.6rem;
  color: var(--ice-white);
}

.dossier-specs {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
}

.spec-panel {
  border: 1px solid var(--panel-border);
  background: rgba(5, 16, 26, 0.7);
  padding: 1.15rem;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.spec-value.highlight {
  font-size: 1.7rem;
  color: var(--ice-white);
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px var(--ice-glow);
}

.spec-desc {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #e5f3fd;
  letter-spacing: 0.05em;
  text-transform: none;
}

.action-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  border-color: rgba(148, 214, 255, 0.45);
}

.outbound-notice {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.dossier-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  border-top: 1px solid var(--panel-border);
  padding-top: 0.8rem;
  letter-spacing: 0.16em;
}

/* ==========================================================================
   LAUNCH CODE AUTH MODAL
   ========================================================================== */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: rgba(5, 17, 28, 0.98);
  border: 1px solid var(--ice-blue);
  box-shadow: 0 0 35px rgba(148, 214, 255, 0.3);
  padding: 2.2rem;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
}

.auth-header h3 {
  font-size: 1.15rem;
  letter-spacing: 0.2em;
  color: var(--ice-white);
}

.auth-instruction {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: none;
}

.input-group {
  margin-bottom: 1rem;
}

input, textarea {
  width: 100%;
  background: rgba(2, 8, 14, 0.9);
  border: 1px solid var(--panel-border);
  color: var(--ice-white);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  border-color: var(--ice-white);
  box-shadow: 0 0 12px rgba(148, 214, 255, 0.4);
}

.auth-error {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #ff6e6e;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.12em;
}

.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 820px) {
  .viewport-content {
    padding: 1.8rem;
  }
  .hud-top-bar .coordinates {
    display: none;
  }
  .ops-header {
    padding: 1.2rem 1.8rem;
    flex-direction: column;
    gap: 1.2rem;
    align-items: flex-start;
  }
  .controls-zone {
    width: 100%;
    justify-content: space-between;
  }
  .ops-main {
    padding: 1.8rem;
  }
  .dossier-body {
    grid-template-columns: 1fr;
  }
  .dossier-visual {
    height: 230px;
  }
}
