/* =========================================================
   CYBERPUNK 2045
   NIGHT CITY HOLOMAP UI — V0.1
   ========================================================= */


/* =========================================================
   01. ROOT / COLOR SYSTEM
   ========================================================= */

:root {
  --bg: #03070b;

  --panel: rgba(3, 10, 16, 0.86);
  --panel-2: rgba(5, 18, 26, 0.72);

  --cyan: #00f0ff;
  --cyan-2: #00a9c7;
  --pink: #ff2bd6;
  --yellow: #f7ff00;
  --red: #ff3155;

  --text: #dffcff;
  --muted: #6e9ca5;
  --line: rgba(0, 240, 255, 0.24);

  --header-height: 74px;
  --footer-height: 30px;
  --left-panel-width: 176px;
  --right-panel-width: 300px;
}


/* =========================================================
   02. RESET / BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(
      circle at 50% 20%,
      #09202a 0%,
      #03080d 38%,
      #010305 100%
    );

  color: var(--text);

  font-family:
    "Segoe UI",
    Arial,
    sans-serif;

  user-select: none;
}

button {
  font: inherit;
}


/* =========================================================
   03. APPLICATION
   ========================================================= */

#app {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100vh;

  background:
    linear-gradient(
      rgba(0, 240, 255, 0.015),
      rgba(255, 43, 214, 0.015)
    );
}


/* =========================================================
   04. TOP BAR
   ========================================================= */

.topbar {
  position: relative;
  z-index: 50;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  flex: 0 0 var(--header-height);
  height: var(--header-height);

  padding: 0 22px;

  border-bottom: 1px solid var(--line);

  background:
    linear-gradient(
      90deg,
      rgba(0, 240, 255, 0.07),
      rgba(3, 7, 11, 0.94) 28%,
      rgba(3, 7, 11, 0.94) 72%,
      rgba(255, 43, 214, 0.06)
    );

  box-shadow:
    0 0 24px rgba(0, 240, 255, 0.08);
}

.topbar::after {
  content: "";

  position: absolute;
  bottom: -1px;
  left: 0;

  width: 24%;
  height: 2px;

  background: var(--cyan);

  box-shadow:
    0 0 12px var(--cyan);
}


/* =========================================================
   05. BRAND
   ========================================================= */

.brand {
  display: flex;
  align-items: center;

  gap: 13px;
}

.brand-mark {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;

  border: 1px solid var(--cyan);

  background:
    rgba(0, 240, 255, 0.06);

  color: var(--yellow);

  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;

  clip-path:
    polygon(
      0 0,
      78% 0,
      100% 22%,
      100% 100%,
      22% 100%,
      0 78%
    );

  box-shadow:
    inset 0 0 18px rgba(0, 240, 255, 0.12);
}

.brand-copy {
  display: flex;
  flex-direction: column;

  line-height: 1;
}

.brand-copy strong {
  font-size: 20px;
  font-weight: 900;

  letter-spacing: 2px;
}

.brand-copy strong span {
  color: var(--yellow);

  text-shadow:
    0 0 10px rgba(247, 255, 0, 0.35);
}

.brand-copy small {
  margin-top: 7px;

  color: var(--cyan);

  font-size: 9px;
  letter-spacing: 3px;
}


/* =========================================================
   06. NETWORK STATUS
   ========================================================= */

.system-status {
  justify-self: center;

  display: flex;
  align-items: center;

  gap: 9px;

  color: #87bac3;

  font-size: 10px;
  letter-spacing: 2px;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--cyan);

  box-shadow:
    0 0 10px var(--cyan);

  animation:
    pulse 1.7s infinite;
}


/* =========================================================
   07. NIGHT CITY CLOCK
   ========================================================= */

.city-clock {
  justify-self: end;

  display: grid;
  grid-template-columns: auto auto;
  align-items: end;

  column-gap: 10px;

  text-align: right;
}

.city-clock small {
  grid-column: 1 / 3;

  color: var(--muted);

  font-size: 8px;
  letter-spacing: 2px;
}

.city-clock strong {
  color: var(--cyan);

  font-family:
    Consolas,
    monospace;

  font-size: 20px;
  letter-spacing: 2px;

  text-shadow:
    0 0 9px rgba(0, 240, 255, 0.35);
}

.city-clock span {
  margin-bottom: 3px;

  color: var(--yellow);

  font-size: 9px;
  letter-spacing: 1px;
}


/* =========================================================
   08. MAIN MAP LAYOUT
   ========================================================= */

.map-shell {
  position: relative;

  display: grid;

  grid-template-columns:
    var(--left-panel-width)
    minmax(0, 1fr)
    var(--right-panel-width);

  flex: 1;

  min-height: 0;
}


/* =========================================================
   09. LEFT HUD
   ========================================================= */

.left-hud {
  position: relative;
  z-index: 30;

  display: flex;
  flex-direction: column;

  gap: 8px;

  padding: 18px 12px 12px;

  border-right:
    1px solid var(--line);

  background:
    linear-gradient(
      180deg,
      rgba(2, 8, 13, 0.96),
      rgba(2, 6, 10, 0.88)
    );

  box-shadow:
    10px 0 35px rgba(0, 0, 0, 0.3);
}

.hud-title {
  margin-bottom: 5px;
  padding: 0 8px 13px;

  border-bottom:
    1px solid rgba(0, 240, 255, 0.14);

  color: var(--cyan);

  font-size: 9px;
  letter-spacing: 3px;
}


/* =========================================================
   10. HUD BUTTONS
   ========================================================= */

.hud-button {
  position: relative;

  display: flex;
  align-items: center;

  width: 100%;
  height: 48px;

  gap: 12px;

  padding: 0 12px;

  border:
    1px solid transparent;

  background:
    transparent;

  color: #789aa1;

  cursor: pointer;

  text-align: left;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.hud-button::before {
  content: "";

  position: absolute;

  top: 9px;
  bottom: 9px;
  left: -1px;

  width: 2px;

  background:
    transparent;
}

.hud-button:hover,
.hud-button.active {
  border-color:
    rgba(0, 240, 255, 0.18);

  background:
    linear-gradient(
      90deg,
      rgba(0, 240, 255, 0.12),
      transparent
    );

  color: #eaffff;
}

.hud-button:hover::before,
.hud-button.active::before {
  background:
    var(--cyan);

  box-shadow:
    0 0 10px var(--cyan);
}

.hud-button.active .hud-icon {
  color:
    var(--yellow);
}

.hud-icon {
  width: 20px;

  color:
    var(--cyan);

  font-size: 16px;
  text-align: center;

  text-shadow:
    0 0 8px currentColor;
}

.hud-spacer {
  flex: 1;
}


/* =========================================================
   11. MAP READOUT
   ========================================================= */

.map-readout {
  display: flex;
  flex-direction: column;

  gap: 6px;

  padding:
    12px 7px 0;

  border-top:
    1px solid rgba(0, 240, 255, 0.14);

  color:
    #557d85;

  font-family:
    Consolas,
    monospace;

  font-size:
    8px;

  letter-spacing:
    1px;
}

.map-readout span:last-child {
  color:
    var(--cyan);
}


/* =========================================================
   12. MAP VIEWPORT
   ========================================================= */

#map-viewport {
  position: relative;

  overflow: hidden;

  background:
    #02070b;

  cursor:
    grab;

  isolation:
    isolate;
}

#map-viewport.dragging {
  cursor:
    grabbing;
}


/* =========================================================
   13. HOLOGRAPHIC GRID
   ========================================================= */

.map-grid {
  position: absolute;

  inset: 0;

  z-index: 0;

  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(0, 240, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(0, 240, 255, 0.035) 1px,
      transparent 1px
    );

  background-size:
    44px 44px;
}

.map-grid::after {
  content: "";

  position: absolute;

  inset: 0;

  background:
    radial-gradient(
      circle at center,
      transparent 35%,
      rgba(0, 0, 0, 0.58) 100%
    );
}


/* =========================================================
   14. MAP STAGE
   ========================================================= */

#map-stage {
  position: absolute;

  top: 50%;
  left: 50%;

  z-index: 2;

  width:
    min(92%, 1500px);

  aspect-ratio:
    16 / 9;

  transform:
    translate(-50%, -50%);

 transform-origin:
  center center;

  will-change:
    transform;

  background:
    #031019;

  box-shadow:
    0 0 55px rgba(0, 240, 255, 0.12);
}


/* =========================================================
   15. DAY / NIGHT MAP LAYERS
   ========================================================= */

.city-map {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit:
    contain;

  pointer-events:
    none;

  filter:
    saturate(1.08)
    contrast(1.05);

  transition:
    opacity 2.8s ease;
}

#map-day {
  opacity: 1;
}

#map-night {
  opacity: 0;
}

body.night-mode #map-day {
  opacity: 0;
}

body.night-mode #map-night {
  opacity: 1;
}

body.night-mode #map-stage {
  box-shadow:
    0 0 65px rgba(0, 240, 255, 0.18),
    0 0 110px rgba(255, 43, 214, 0.05);
}


/* =========================================================
   16. DISTRICT / LOCATION OVERLAYS
   ========================================================= */

#district-layer,
#location-layer {
  position: absolute;

  inset: 0;

  z-index: 5;

  width: 100%;
  height: 100%;

  pointer-events:
    none;
}

#district-layer {
  overflow:
    visible;
}


/* =========================================================
   17. SCANLINE EFFECT
   ========================================================= */

.scanline {
  position: absolute;

  inset: 0;

  z-index: 12;

  pointer-events:
    none;

  opacity:
    0.13;

  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      rgba(0, 240, 255, 0.11) 4px
    );

  mix-blend-mode:
    screen;
}

.scanline::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;

  height:
    14%;

  background:
    linear-gradient(
      transparent,
      rgba(0, 240, 255, 0.035),
      transparent
    );

  animation:
    scan 8s linear infinite;
}


/* =========================================================
   18. VIEWPORT CORNERS
   ========================================================= */

.map-corner {
  position: absolute;

  z-index: 15;

  width: 36px;
  height: 36px;

  pointer-events:
    none;
}

.map-corner.top-left {
  top: 16px;
  left: 16px;

  border-top:
    2px solid var(--cyan);

  border-left:
    2px solid var(--cyan);
}

.map-corner.top-right {
  top: 16px;
  right: 16px;

  border-top:
    2px solid var(--pink);

  border-right:
    2px solid var(--pink);
}

.map-corner.bottom-left {
  bottom: 16px;
  left: 16px;

  border-bottom:
    2px solid var(--cyan);

  border-left:
    2px solid var(--cyan);
}

.map-corner.bottom-right {
  right: 16px;
  bottom: 16px;

  border-right:
    2px solid var(--yellow);

  border-bottom:
    2px solid var(--yellow);
}


/* =========================================================
   19. MAP CONTROLS HELP
   ========================================================= */

.map-help {
  position: absolute;

  bottom: 22px;
  left: 24px;

  z-index: 16;

  display: flex;

  gap: 18px;

  padding:
    7px 10px;

  border-left:
    2px solid var(--cyan);

  background:
    rgba(0, 6, 10, 0.62);

  color:
    #6d989f;

  font-family:
    Consolas,
    monospace;

  font-size:
    8px;

  letter-spacing:
    1px;

  pointer-events:
    none;
}


/* =========================================================
   20. DAY / NIGHT INDICATOR
   ========================================================= */

.time-indicator {
  position: absolute;

  top: 22px;
  right: 23px;

  z-index: 16;

  display: flex;
  align-items: center;

  gap: 10px;

  padding:
    9px 12px;

  border:
    1px solid rgba(0, 240, 255, 0.17);

  background:
    rgba(1, 8, 13, 0.72);

  clip-path:
    polygon(
      0 0,
      90% 0,
      100% 25%,
      100% 100%,
      10% 100%,
      0 75%
    );

  pointer-events:
    none;
}

.time-indicator > span {
  color:
    var(--yellow);

  font-size:
    22px;

  text-shadow:
    0 0 10px rgba(247, 255, 0, 0.5);
}

.time-indicator div {
  display:
    flex;

  flex-direction:
    column;
}

.time-indicator small {
  color:
    #638991;

  font-size:
    7px;

  letter-spacing:
    2px;
}

.time-indicator strong {
  margin-top:
    3px;

  color:
    var(--cyan);

  font-size:
    10px;

  letter-spacing:
    1.5px;
}


/* =========================================================
   21. INTELLIGENCE PANEL
   ========================================================= */

.intel-panel {
  position: relative;

  z-index: 30;

  padding:
    16px;

  border-left:
    1px solid rgba(255, 43, 214, 0.24);

  background:
    linear-gradient(
      180deg,
      rgba(3, 10, 16, 0.97),
      rgba(4, 8, 13, 0.90)
    );

  box-shadow:
    -12px 0 35px rgba(0, 0, 0, 0.32);
}

.intel-panel::before {
  content: "";

  position: absolute;

  top: 0;
  left: -1px;

  width: 1px;
  height: 120px;

  background:
    var(--pink);

  box-shadow:
    0 0 11px var(--pink);
}

.intel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  height: 36px;

  border-bottom:
    1px solid rgba(255, 43, 214, 0.17);
}

.intel-header small {
  color:
    #9a718f;

  font-size:
    8px;

  letter-spacing:
    1.5px;
}

.intel-header span {
  padding:
    3px 6px;

  border:
    1px solid rgba(255, 43, 214, 0.35);

  color:
    var(--pink);

  font-size:
    7px;

  letter-spacing:
    1px;
}


/* =========================================================
   22. EMPTY INTEL STATE
   ========================================================= */

.intel-empty {
  display:
    flex;

  flex-direction:
    column;

  align-items:
    center;

  justify-content:
    center;

  height:
    calc(100% - 36px);

  padding:
    20px;

  color:
    #4d7178;

  text-align:
    center;
}

.intel-crosshair {
  display:
    grid;

  place-items:
    center;

  width:
    55px;

  height:
    55px;

  margin-bottom:
    18px;

  border:
    1px solid rgba(0, 240, 255, 0.2);

  color:
    var(--cyan);

  font-family:
    Consolas,
    monospace;

  font-size:
    24px;

  transform:
    rotate(45deg);

  box-shadow:
    inset 0 0 20px rgba(0, 240, 255, 0.04);
}

.intel-empty strong {
  color:
    #83adb5;

  font-size:
    10px;

  letter-spacing:
    2px;
}

.intel-empty p {
  max-width:
    210px;

  color:
    #55777e;

  font-size:
    10px;

  line-height:
    1.6;
}


/* =========================================================
   23. BOTTOM STATUS BAR
   ========================================================= */

.bottom-status {
  position: relative;

  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;

  flex: 0 0 var(--footer-height);

  height:
    var(--footer-height);

  padding:
    0 20px;

  border-top:
    1px solid rgba(0, 240, 255, 0.15);

  background:
    #020609;

  color:
    #52777d;

  font-family:
    Consolas,
    monospace;

  font-size:
    7px;

  letter-spacing:
    1.4px;
}

.bottom-status span:nth-child(2) {
  color:
    #5c9aa4;
}

.bottom-status span:last-child {
  color:
    #987c2d;
}


/* =========================================================
   24. BOOT SCREEN
   ========================================================= */

#boot-screen {
  position:
    fixed;

  inset:
    0;

  z-index:
    9999;

  display:
    grid;

  place-items:
    center;

  background:
    #010305;

  transition:
    opacity 0.65s ease,
    visibility 0.65s ease;
}

#boot-screen.hidden {
  opacity:
    0;

  visibility:
    hidden;
}

.boot-content {
  position:
    relative;

  width:
    min(440px, 80vw);
}

.boot-kicker {
  margin-bottom:
    12px;

  color:
    var(--cyan);

  font-family:
    Consolas,
    monospace;

  font-size:
    9px;

  letter-spacing:
    4px;
}

.boot-content h1 {
  margin:
    0;

  font-size:
    42px;

  font-style:
    italic;

  letter-spacing:
    3px;
}

.boot-content h1 span {
  color:
    var(--yellow);

  text-shadow:
    0 0 15px rgba(247, 255, 0, 0.3);
}

.boot-line {
  width:
    100%;

  height:
    2px;

  margin:
    15px 0;

  background:
    linear-gradient(
      90deg,
      var(--cyan),
      var(--pink),
      transparent
    );

  animation:
    bootline 1.1s ease both;
}

.boot-content p {
  color:
    #5d858d;

  font-family:
    Consolas,
    monospace;

  font-size:
    9px;

  letter-spacing:
    2px;
}


/* =========================================================
   25. ANIMATIONS
   ========================================================= */

@keyframes pulse {
  0%,
  100% {
    opacity:
      0.35;

    box-shadow:
      0 0 4px var(--cyan);
  }

  50% {
    opacity:
      1;

    box-shadow:
      0 0 14px var(--cyan);
  }
}

@keyframes scan {
  from {
    top:
      -25%;
  }

  to {
    top:
      110%;
  }
}

@keyframes bootline {
  from {
    width:
      0;
  }

  to {
    width:
      100%;
  }
}


/* =========================================================
   26. RESPONSIVE — MEDIUM
   ========================================================= */

@media (max-width: 1050px) {

  :root {
    --right-panel-width: 230px;
    --left-panel-width: 150px;
  }

  .hud-button {
    font-size:
      8px;
  }

  .brand-copy strong {
    font-size:
      16px;
  }
}


/* =========================================================
   27. RESPONSIVE — MOBILE / SMALL
   ========================================================= */

@media (max-width: 800px) {

  :root {
    --left-panel-width: 60px;
    --right-panel-width: 0px;
  }

  .left-hud {
    padding-left:
      6px;

    padding-right:
      6px;
  }

  .hud-title,
  .hud-button span:last-child,
  .map-readout {
    display:
      none;
  }

  .hud-button {
    justify-content:
      center;

    padding:
      0;
  }

  .hud-icon {
    font-size:
      18px;
  }

  .intel-panel {
    display:
      none;
  }

  .brand-copy small,
  .system-status {
    display:
      none;
  }

  .topbar {
    grid-template-columns:
      1fr auto;
  }

  .city-clock {
    grid-column:
      2;
  }

  .map-help {
    display:
      none;
  }

  #map-stage {
    width:
      min(90vw, 700px);
  }
}
