/* ============ RESET & FONTS ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

@font-face {
  font-family: "Orbitron";
  src: url("https://fonts.gstatic.com/s/orbitron/v31/yMJRMIlzdpvBhQQL_Qq7dy0.woff2")
    format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Share Tech Mono";
  src: url("https://fonts.gstatic.com/s/sharetechmono/v15/J7aHnp1uDWRBEqV98dVQztYldFcLowEF.woff2")
    format("woff2");
  font-display: swap;
}

:root {
  /* Cockpit color palette */
  --hud-cyan: #00f0ff;
  --hud-blue: #4a90d9;
  --hud-orange: #ff7849;
  --hud-gold: #e8c547;
  --hud-green: #00ff41;
  --hud-red: #ff3333;
  --hud-purple: #9d4edd;
  --hud-magenta: #ff00ff;

  /* Panel colors */
  --panel-bg: rgba(8, 12, 20, 0.85);
  --panel-border: rgba(74, 144, 217, 0.4);
  --panel-glow: rgba(0, 240, 255, 0.15);

  /* Frame colors */
  --frame-dark: #0a0a0f;
  --frame-metal: #1a1a25;
  --frame-accent: #2a2a3a;

  /* Text */
  --text-primary: #e8e8ff;
  --text-dim: rgba(255, 255, 255, 0.5);
}

html {
  font-size: 16px;
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Share Tech Mono", "Courier New", monospace;
  color: var(--text-primary);
  background: #030308;
}

/* ============ THREE.JS CANVAS ============ */
#space-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

/* ============ COCKPIT GLASS OVERLAY ============ */
.cockpit-glass {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Subtle reflection streaks */
  background:
    linear-gradient(
      135deg,
      transparent 0%,
      rgba(255, 255, 255, 0.02) 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.01) 75%,
      transparent 100%
    ), /* Edge vignette */
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
}

/* Scanlines on glass */
.cockpit-glass::after {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 240, 255, 0.01) 2px,
    rgba(0, 240, 255, 0.01) 4px
  );
  animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 100px;
  }
}

/* ============ COCKPIT FRAME ============ */
.cockpit-frame {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.frame-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(
    180deg,
    var(--frame-dark) 0%,
    var(--frame-metal) 60%,
    transparent 100%
  );
  border-bottom: 2px solid var(--hud-blue);
  box-shadow:
    0 2px 20px rgba(74, 144, 217, 0.3),
    inset 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.frame-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(
    0deg,
    var(--frame-dark) 0%,
    var(--frame-metal) 70%,
    transparent 100%
  );
  border-top: 2px solid var(--hud-cyan);
  box-shadow:
    0 -2px 20px rgba(0, 240, 255, 0.3),
    inset 0 10px 30px rgba(0, 0, 0, 0.5);
}

.frame-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--frame-dark) 0%,
    var(--frame-metal) 60%,
    transparent 100%
  );
  border-right: 1px solid rgba(74, 144, 217, 0.2);
}

.frame-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(
    270deg,
    var(--frame-dark) 0%,
    var(--frame-metal) 60%,
    transparent 100%
  );
  border-left: 1px solid rgba(74, 144, 217, 0.2);
}

/* Corner accents */
.frame-corner {
  position: absolute;
  width: 100px;
  height: 100px;
}

.frame-corner-tl {
  top: 50px;
  left: 60px;
  border-top: 2px solid var(--hud-cyan);
  border-left: 2px solid var(--hud-cyan);
  box-shadow:
    inset 5px 5px 15px rgba(0, 240, 255, 0.1),
    -2px -2px 10px rgba(0, 240, 255, 0.2);
}

.frame-corner-tr {
  top: 50px;
  right: 60px;
  border-top: 2px solid var(--hud-cyan);
  border-right: 2px solid var(--hud-cyan);
  box-shadow:
    inset -5px 5px 15px rgba(0, 240, 255, 0.1),
    2px -2px 10px rgba(0, 240, 255, 0.2);
}

.frame-corner-bl {
  bottom: 80px;
  left: 60px;
  border-bottom: 2px solid var(--hud-orange);
  border-left: 2px solid var(--hud-orange);
  box-shadow:
    inset 5px -5px 15px rgba(255, 120, 73, 0.1),
    -2px 2px 10px rgba(255, 120, 73, 0.2);
}

.frame-corner-br {
  right: 60px;
  bottom: 80px;
  border-right: 2px solid var(--hud-orange);
  border-bottom: 2px solid var(--hud-orange);
  box-shadow:
    inset -5px -5px 15px rgba(255, 120, 73, 0.1),
    2px 2px 10px rgba(255, 120, 73, 0.2);
}

/* ============ HUD CONNECTION BAR ============ */
.connection-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 80px;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--hud-gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  background: transparent;
}

.connection-status {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--hud-green);
  border-radius: 50%;
  box-shadow:
    0 0 10px var(--hud-green),
    0 0 20px var(--hud-green);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 10px var(--hud-green),
      0 0 20px var(--hud-green);
  }
  50% {
    opacity: 0.7;
    box-shadow:
      0 0 5px var(--hud-green),
      0 0 10px var(--hud-green);
  }
}

.player-info {
  color: var(--hud-orange);
  text-shadow: 0 0 10px rgba(255, 120, 73, 0.5);
}

.time-coords {
  color: var(--hud-cyan);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* ============ DASHBOARD CONTAINER ============ */
.dashboard {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  width: calc(100% - 240px);
  max-width: 1400px;
  height: calc(100vh - 200px);
  margin: 80px auto 100px;
  perspective: 1000px;
}

/* ============ HOLOGRAPHIC PANELS ============ */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 20, 0.75);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  animation: panel-appear 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(
    135deg,
    rgba(0, 240, 255, 0.05) 0%,
    transparent 50%,
    rgba(74, 144, 217, 0.03) 100%
  );
}

/* Panel glow effect */
.panel-glow {
  position: absolute;
  inset: -2px;
  z-index: -2;
  background: linear-gradient(
    135deg,
    var(--hud-cyan) 0%,
    var(--hud-blue) 50%,
    var(--hud-purple) 100%
  );
  opacity: 0;
  filter: blur(15px);
  transition: opacity 0.3s ease;
}

.panel:hover .panel-glow {
  opacity: 0.15;
}

/* Staggered animations - panels angle outward */
.panel-profile {
  transform: rotateY(3deg) rotateX(-1deg);
  animation-delay: 0.1s;
}

.panel-log {
  transform: rotateY(-3deg) rotateX(-1deg);
  animation-delay: 0.2s;
}

.panel-inventory {
  transform: rotateY(3deg) rotateX(1deg);
  animation-delay: 0.3s;
}

.panel-nav {
  transform: rotateY(-3deg) rotateX(1deg);
  animation-delay: 0.4s;
}

@keyframes panel-appear {
  0% {
    opacity: 0;
    filter: blur(20px) brightness(2);
    transform: scale(0.9) translateZ(-50px);
  }
  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
  }
}

/* Panel hover effects */
.panel:hover {
  border-color: var(--hud-cyan);
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.2),
    inset 0 0 30px rgba(0, 240, 255, 0.05);
}

/* ============ PANEL HEADER ============ */
.panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 15px;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--hud-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(
    90deg,
    rgba(74, 144, 217, 0.1) 0%,
    transparent 100%
  );
  border-bottom: 1px solid var(--panel-border);
}

.panel-indicator {
  width: 8px;
  height: 8px;
  background: var(--hud-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--hud-cyan);
}

.indicator-warning {
  background: var(--hud-orange);
  box-shadow: 0 0 8px var(--hud-orange);
  animation: blink-warning 1.5s ease-in-out infinite;
}

.indicator-active {
  background: var(--hud-green);
  box-shadow: 0 0 8px var(--hud-green);
}

.indicator-nav {
  background: var(--hud-purple);
  box-shadow: 0 0 8px var(--hud-purple);
}

@keyframes blink-warning {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.panel-title {
  flex: 1;
}

.panel-controls {
  display: flex;
  gap: 8px;
}

.panel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s ease;
}

.panel-btn:hover {
  color: var(--hud-cyan);
  border-color: var(--hud-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* ============ PANEL CONTENT ============ */
.panel-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
}

/* ============ PROFILE PANEL ============ */
.panel-profile .panel-content {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.profile-photo-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 2px solid var(--hud-cyan);
  border-radius: 50%;
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.3),
    0 0 40px rgba(0, 240, 255, 0.1);
  filter: saturate(1.1);
  transition: all 0.3s ease;
}

.profile-photo:hover {
  border-color: var(--hud-gold);
  box-shadow:
    0 0 30px rgba(232, 197, 71, 0.4),
    0 0 60px rgba(232, 197, 71, 0.2);
  transform: scale(1.05);
}

/* Rotating ring around photo */
.photo-ring {
  position: absolute;
  inset: -10px;
  border: 1px dashed var(--hud-cyan);
  border-radius: 50%;
  opacity: 0.4;
  animation: rotate-ring 20s linear infinite;
}

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

/* Scanline over photo */
.photo-scanline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  border-radius: 50%;
}

.photo-scanline::after {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 10px;
  content: "";
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 240, 255, 0.3),
    transparent
  );
  animation: photo-scan 3s linear infinite;
}

@keyframes photo-scan {
  0% {
    top: -10%;
  }
  100% {
    top: 110%;
  }
}

.pilot-name {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--hud-gold);
  letter-spacing: 4px;
  text-shadow:
    0 0 20px rgba(232, 197, 71, 0.5),
    0 0 40px rgba(232, 197, 71, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pilot-name:hover {
  color: var(--hud-cyan);
  text-shadow:
    0 0 30px rgba(0, 240, 255, 0.8),
    0 0 60px rgba(0, 240, 255, 0.4);
  transform: scale(1.02);
}

/* Hyperdrive active state */
body.hyperdrive .pilot-name {
  color: #fff;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 1),
    0 0 80px rgba(0, 240, 255, 0.8),
    0 0 120px rgba(0, 240, 255, 0.6);
  animation: hyperdrive-text 0.1s ease-in-out infinite;
}

@keyframes hyperdrive-text {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}

/* Hyperdrive screen effects */
body.hyperdrive .cockpit-glass {
  background:
    linear-gradient(
      135deg,
      transparent 0%,
      rgba(0, 240, 255, 0.05) 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.03) 75%,
      transparent 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 30%,
      rgba(0, 100, 255, 0.15) 100%
    );
}

body.hyperdrive .panel {
  box-shadow:
    0 0 40px rgba(0, 240, 255, 0.3),
    inset 0 0 30px rgba(0, 240, 255, 0.1);
}

.tagline-jp {
  margin-top: 10px;
  font-family: "MS Gothic", "Yu Gothic", sans-serif;
  font-size: 13px;
  color: var(--hud-magenta);
  letter-spacing: 6px;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

.tagline {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* ============ LOG PANEL ============ */
.log-content {
  justify-content: center;
  font-size: 13px;
  line-height: 1.8;
}

.log-entry {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.log-prefix {
  flex-shrink: 0;
  color: var(--hud-green);
  text-shadow: 0 0 5px var(--hud-green);
}

.log-entry p {
  color: var(--text-primary);
}

.log-entry strong {
  color: var(--hud-gold);
  text-shadow: 0 0 8px rgba(232, 197, 71, 0.3);
}

.log-cursor {
  display: inline-block;
  margin-left: 20px;
  font-size: 16px;
  color: var(--hud-cyan);
  animation: cursor-blink 1s step-end infinite;
}

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

/* ============ INVENTORY PANEL ============ */
.projects-grid {
  gap: 10px;
}

.cargo-item {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 12px 15px;
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(74, 144, 217, 0.2);
  transition: all 0.2s ease;
}

.cargo-item:hover {
  background: rgba(0, 240, 255, 0.05);
  border-color: var(--hud-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
  transform: translateX(5px);
}

.cargo-icon {
  font-size: 28px;
  transition: transform 0.2s ease;
}

.cargo-item:hover .cargo-icon {
  transform: scale(1.15);
}

.cargo-info {
  flex: 1;
}

.cargo-name {
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--hud-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cargo-desc {
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-dim);
}

.cargo-status {
  padding: 4px 10px;
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: var(--hud-green);
  letter-spacing: 1px;
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid var(--hud-green);
}

/* Panel footer */
.panel-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--panel-border);
}

.footer-stat {
  color: var(--text-dim);
}

.power-level {
  color: var(--hud-red);
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

/* ============ NAVIGATION PANEL ============ */
.nav-links {
  gap: 12px;
  justify-content: center;
}

.nav-link {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 14px 20px;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--hud-cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--hud-cyan);
  transition: all 0.2s ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-link span {
  flex: 1;
}

.nav-arrow {
  font-size: 16px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
}

.nav-link:hover .nav-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Different link colors */
.nav-linkedin {
  color: var(--hud-blue);
  border-color: var(--hud-blue);
}

.nav-linkedin:hover {
  color: var(--frame-dark);
  background: var(--hud-blue);
  box-shadow: 0 0 30px rgba(74, 144, 217, 0.5);
}

.nav-github {
  color: var(--hud-purple);
  border-color: var(--hud-purple);
}

.nav-github:hover {
  color: var(--frame-dark);
  background: var(--hud-purple);
  box-shadow: 0 0 30px rgba(157, 78, 221, 0.5);
}

.nav-twitter {
  color: var(--hud-orange);
  border-color: var(--hud-orange);
}

.nav-twitter:hover {
  color: var(--frame-dark);
  background: var(--hud-orange);
  box-shadow: 0 0 30px rgba(255, 120, 73, 0.5);
}

/* ============ RADAR WIDGET ============ */
.radar-widget {
  position: fixed;
  right: 80px;
  bottom: 100px;
  z-index: 50;
  width: 100px;
  height: 100px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--hud-cyan);
  border-radius: 50%;
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.radar-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle,
      transparent 30%,
      rgba(0, 240, 255, 0.1) 31%,
      transparent 32%
    ),
    radial-gradient(
      circle,
      transparent 60%,
      rgba(0, 240, 255, 0.1) 61%,
      transparent 62%
    ),
    linear-gradient(
      0deg,
      transparent 49%,
      rgba(0, 240, 255, 0.1) 50%,
      transparent 51%
    ),
    linear-gradient(
      90deg,
      transparent 49%,
      rgba(0, 240, 255, 0.1) 50%,
      transparent 51%
    );
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--hud-cyan), transparent);
  box-shadow: 0 0 10px var(--hud-cyan);
  transform-origin: left center;
  animation: radar-rotate 3s linear infinite;
}

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

.radar-blips {
  position: absolute;
  inset: 0;
}

.radar-blip {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--hud-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--hud-green);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.radar-blip.active {
  opacity: 1;
  animation: blip-pulse 1.5s ease-out forwards;
}

.radar-blip.hostile {
  background: var(--hud-red);
  box-shadow: 0 0 6px var(--hud-red);
}

.radar-blip.friendly {
  background: var(--hud-cyan);
  box-shadow: 0 0 6px var(--hud-cyan);
}

.radar-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--hud-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--hud-gold);
  transform: translate(-50%, -50%);
}

@keyframes blip-pulse {
  0% {
    opacity: 1;
    transform: scale(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* ============ VELOCITY WIDGET ============ */
.velocity-widget {
  position: fixed;
  bottom: 100px;
  left: 80px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 15px;
  font-family: "Orbitron", sans-serif;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--hud-orange);
  box-shadow: 0 0 20px rgba(255, 120, 73, 0.2);
}

.velocity-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--hud-orange);
  letter-spacing: 2px;
}

.velocity-bar {
  width: 80px;
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.velocity-fill {
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, var(--hud-green), var(--hud-cyan));
  box-shadow: 0 0 10px var(--hud-cyan);
  animation: velocity-pulse 2s ease-in-out infinite;
}

@keyframes velocity-pulse {
  0%,
  100% {
    width: 65%;
  }
  50% {
    width: 75%;
  }
}

.velocity-value {
  font-size: 14px;
  font-weight: 900;
  color: var(--hud-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  transition: all 0.3s ease;
}

.velocity-value.hyperspeed {
  color: #fff;
  text-shadow:
    0 0 15px rgba(255, 255, 255, 0.8),
    0 0 30px rgba(0, 240, 255, 0.6);
}

/* ============ HUD TOGGLE BUTTON ============ */
.hud-toggle {
  position: fixed;
  bottom: 100px;
  left: 50%;
  z-index: 100;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 18px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--hud-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--hud-cyan);
  transform: translateX(-50%);
  transition: all 0.2s ease;
}

.hud-toggle:hover {
  color: var(--frame-dark);
  background: var(--hud-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.hud-toggle-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.hud-toggle.hidden .hud-toggle-icon {
  transform: rotate(180deg);
}

/* Hidden HUD state */
body.hud-hidden .dashboard {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95);
}

body.hud-hidden .cockpit-frame {
  opacity: 0.3;
}

body.hud-hidden .radar-widget,
body.hud-hidden .velocity-widget {
  opacity: 0.5;
}

.dashboard {
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* ============ CONTROLS HINT ============ */
.controls-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200;
  padding: 25px 35px;
  font-family: "Orbitron", sans-serif;
  text-align: center;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--hud-cyan);
  box-shadow:
    0 0 40px rgba(0, 240, 255, 0.3),
    inset 0 0 20px rgba(0, 240, 255, 0.1);
  transform: translate(-50%, -50%);
  animation: hint-appear 0.5s ease-out;
}

.controls-hint.hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 0.3s ease;
}

@keyframes hint-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.controls-title {
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--hud-gold);
  letter-spacing: 4px;
  text-shadow: 0 0 10px rgba(232, 197, 71, 0.5);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 30px;
}

.control-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.control-item:last-child {
  grid-column: span 2;
  justify-content: center;
}

.control-key {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hud-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--hud-cyan);
}

.control-action {
  font-size: 11px;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.controls-dismiss {
  margin-top: 20px;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
  animation: blink-dim 2s ease-in-out infinite;
}

@keyframes blink-dim {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ============ CONTROLS HINT ============ */
.controls-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  padding: 25px 35px;
  font-family: "Orbitron", sans-serif;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--hud-cyan);
  box-shadow:
    0 0 40px rgba(0, 240, 255, 0.3),
    inset 0 0 30px rgba(0, 240, 255, 0.1);
  transform: translate(-50%, -50%);
  animation: hint-appear 0.5s ease-out;
}

.controls-hint.hidden {
  display: none;
}

@keyframes hint-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.controls-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--hud-gold);
  letter-spacing: 3px;
}

.controls-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 15px;
  align-items: center;
  font-size: 11px;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.controls-grid .key {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--hud-cyan);
  text-align: center;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--hud-cyan);
}

.controls-dismiss {
  margin-top: 5px;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1px;
  animation: blink-slow 2s ease-in-out infinite;
}

@keyframes blink-slow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============ FOCUS STYLES ============ */
a:focus-visible {
  outline: 2px solid var(--hud-cyan);
  outline-offset: 4px;
}

::selection {
  color: var(--frame-dark);
  background: var(--hud-cyan);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  body {
    display: block;
    overflow-y: auto;
  }

  .dashboard {
    grid-template-rows: auto auto auto auto;
    grid-template-columns: 1fr;
    gap: 30px;
    width: calc(100% - 80px);
    height: auto;
    min-height: auto;
    padding-bottom: 20px;
    margin: 70px auto 80px;
  }

  .panel {
    min-height: 200px;
    transform: none;
  }

  .pilot-name {
    font-size: 1.4rem;
  }

  .radar-widget,
  .velocity-widget,
  .hud-toggle,
  .controls-hint {
    display: none;
  }

  .frame-left,
  .frame-right {
    width: 30px;
  }

  .frame-bottom {
    position: relative;
    height: 60px;
    margin-top: auto;
  }

  .connection-bar {
    padding: 10px 40px;
  }
}

@media (max-width: 700px) {
  body {
    display: block;
    overflow-y: auto;
  }

  .dashboard {
    gap: 20px;
    width: calc(100% - 30px);
    margin: 55px auto 60px;
  }

  .panel {
    min-height: 180px;
  }

  .panel-content {
    padding: 15px;
  }

  .pilot-name {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .profile-photo {
    width: 90px;
    height: 90px;
  }

  .connection-bar {
    position: sticky;
    top: 0;
    flex-direction: column;
    gap: 5px;
    padding: 8px 20px;
    font-size: 9px;
    text-align: center;
  }

  .frame-top {
    height: 35px;
  }

  .frame-bottom {
    position: relative;
    height: 50px;
  }

  .frame-left,
  .frame-right {
    display: none;
  }

  .frame-corner {
    display: none;
  }

  .nav-link span {
    display: none;
  }

  .nav-link {
    justify-content: center;
    padding: 12px;
  }

  .cargo-status {
    display: none;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
