/* ============================================================
   NNN Live — Cyberpunk Worldwide Terminal
   Styles extracted from index.html
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg: #040408;
  --card: rgba(8, 10, 18, 0.85);
  --card-solid: #0b0d18;
  --tx: #f0f6fc;
  --mu: #6e768e;
  --g: #00ff66;
  --r: #ff0055;
  --y: #ffe600;
  --p: #9d00ff;
  --b: #00f3ff;
  --ln: rgba(0, 243, 255, 0.18);
  --ln-dim: rgba(255, 255, 255, 0.07);
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Base ───────────────────────────────────────────────────── */
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 0%, rgba(157, 0, 255, 0.18) 0%, rgba(4, 4, 8, 0.95) 75%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  background-attachment: fixed;
  color: var(--tx);
  font: 14px/1.55 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Centered layout wrapper for desktop & all viewports */
.terminal-container {
  width: 100%;
  max-width: 960px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 16px 14px 40px;
  position: relative;
}

/* Subtle scanline overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18) 0px, rgba(0, 0, 0, 0.18) 1px,
    transparent 1px, transparent 3px
  );
  z-index: 999;
  opacity: 0.6;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
  position: relative;
  padding: 4px 0 10px;
}

.hud-tag {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--b);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid rgba(0, 243, 255, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

h1 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  font-size: 32px;
  margin: 4px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #00f3ff 0%, #00ff66 30%, #ffe600 60%, #ff0055 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 243, 255, 0.45));
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 .icon {
  filter: drop-shadow(0 0 8px #ffe600);
}

.sub {
  color: var(--mu);
  font-size: 12px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sub span#day {
  color: var(--b);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
}

/* ── Live indicator ─────────────────────────────────────────── */
.live {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--r);
  box-shadow: 0 0 10px var(--r), 0 0 20px var(--r);
  animation: pl 1.1s infinite;
}

@keyframes pl {
  50% { opacity: 0.3; transform: scale(1.4); }
}

.live.reconnecting {
  background: var(--y) !important;
  box-shadow: 0 0 10px var(--y), 0 0 20px var(--y) !important;
  animation: pl 0.6s infinite !important;
}

.hud-tag.reconnecting {
  border-color: rgba(255, 230, 0, 0.5) !important;
  color: var(--y) !important;
  background: rgba(255, 230, 0, 0.12) !important;
}

/* ── Layout ─────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ln);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(0, 243, 255, 0.15),
    0 0 12px rgba(0, 243, 255, 0.06);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 14px;
  position: relative;
  clip-path: polygon(
    0 0, calc(100% - 10px) 0, 100% 10px,
    100% 100%, 10px 100%, 0 calc(100% - 10px)
  );
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--b);
  border-right: 2px solid var(--b);
  pointer-events: none;
}

.card h2 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.card h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 11px;
  background: var(--b);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--b);
}

/* ── Big stat boxes ─────────────────────────────────────────── */
.big { display: flex; gap: 12px; flex-wrap: wrap; }

.big div {
  flex: 1;
  min-width: 140px;
  text-align: center;
  border-radius: 4px;
  padding: 14px 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.big b {
  display: block;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.big span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 2px;
  display: block;
}

/* Colour variants */
.a {
  background: linear-gradient(180deg, rgba(0, 255, 102, 0.12), rgba(0, 255, 102, 0.03));
  border-color: rgba(0, 255, 102, 0.4) !important;
  box-shadow: inset 0 0 16px rgba(0, 255, 102, 0.15), 0 0 14px rgba(0, 255, 102, 0.1);
}
.a b    { color: var(--g); text-shadow: 0 0 12px rgba(0, 255, 102, 0.7); }
.a span { color: #66ffa3; }

.f {
  background: linear-gradient(180deg, rgba(255, 0, 85, 0.14), rgba(255, 0, 85, 0.03));
  border-color: rgba(255, 0, 85, 0.4) !important;
  box-shadow: inset 0 0 16px rgba(255, 0, 85, 0.15), 0 0 14px rgba(255, 0, 85, 0.1);
}
.f b    { color: var(--r); text-shadow: 0 0 12px rgba(255, 0, 85, 0.7); }
.f span { color: #ff6699; }

.d {
  background: linear-gradient(180deg, rgba(255, 230, 0, 0.12), rgba(255, 230, 0, 0.03));
  border-color: rgba(255, 230, 0, 0.4) !important;
  box-shadow: inset 0 0 16px rgba(255, 230, 0, 0.15), 0 0 14px rgba(255, 230, 0, 0.1);
}
.d b    { color: var(--y); text-shadow: 0 0 12px rgba(255, 230, 0, 0.7); }
.d span { color: #ffe866; }

/* ── SVG global ─────────────────────────────────────────────── */
svg { width: 100%; height: auto; display: block; }

/* ── Holographic 3D Globe Container & Cyber Reticles ────────── */
.globe-frame {
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(3, 8, 20, 0.9) 0%, rgba(2, 3, 8, 0.98) 80%);
  border: 1px solid rgba(0, 243, 255, 0.22);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 35px rgba(0, 243, 255, 0.05), 0 0 20px rgba(0, 243, 255, 0.08);
}

#threejs-container-ANIMATION_3 {
  width: 100%;
  height: 460px;
  display: block;
  position: relative;
  z-index: 10;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#threejs-container-ANIMATION_3 canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.globe-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 243, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

.globe-reticle-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--b);
  border-left: 2px solid var(--b);
  z-index: 20;
  pointer-events: none;
}

.globe-reticle-br {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border-bottom: 2px solid var(--b);
  border-right: 2px solid var(--b);
  z-index: 20;
  pointer-events: none;
}

.globe-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 243, 255, 0.06);
  border-bottom: 1px solid rgba(0, 243, 255, 0.15);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--b);
  position: relative;
  z-index: 20;
}

.globe-hud-bar .coords {
  color: #66ffa3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.globe-hud-bar .hint {
  color: var(--y);
  animation: pulse-hint 2s infinite ease-in-out;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1; text-shadow: 0 0 8px rgba(255, 230, 0, 0.7); }
}

/* ── Globe Zoom HUD Controls ────────────────────────────────── */
.globe-zoom-controls {
  position: absolute;
  top: 48px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 25;
}

.globe-zoom-controls button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 10, 24, 0.88);
  border: 1px solid rgba(0, 243, 255, 0.38);
  color: var(--b);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.15);
  transition: all 0.15s ease-in-out;
  touch-action: manipulation;
  user-select: none;
}

.globe-zoom-controls button:hover,
.globe-zoom-controls button:active {
  background: rgba(0, 243, 255, 0.25);
  border-color: #00ffcc;
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.5);
  transform: scale(1.08);
}

/* ── Info bar ───────────────────────────────────────────────── */
#info {
  font-size: 12px;
  color: var(--b);
  margin-top: 8px;
  min-height: 22px;
  padding: 4px 8px;
  background: rgba(0, 243, 255, 0.06);
  border-left: 2px solid var(--b);
  text-shadow: 0 0 6px rgba(0, 243, 255, 0.5);
}

/* ── Breach Feed ────────────────────────────────────────────── */
.feed { max-height: 240px; overflow: hidden; }

.feed div {
  padding: 7px 4px;
  border-bottom: 1px solid rgba(255, 0, 85, 0.18);
  font-size: 12px;
  animation: in 0.4s ease-out;
  color: rgba(240, 246, 252, 0.88);
}

.feed div b {
  color: var(--b);
  text-shadow: 0 0 6px rgba(0, 243, 255, 0.4);
}

@keyframes in {
  from { opacity: 0; transform: translateX(-10px); background: rgba(255, 0, 85, 0.25); }
  to   { opacity: 1; transform: translateX(0);      background: transparent; }
}

/* ── Bar rows ───────────────────────────────────────────────── */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 12px;
}

.row i {
  flex: 0 0 105px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ccd6f6;
}

.row s {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.row s u {
  display: block;
  height: 100%;
  border-radius: 1px;
  text-decoration: none;
  box-shadow: 0 0 8px currentColor;
}

.row em {
  flex: 0 0 42px;
  text-align: right;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--y);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* ── Buttons ────────────────────────────────────────────────── */
button {
  font: inherit;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 9px 16px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  margin: 6px 6px 0 0;
  transition: all 0.15s ease;
  clip-path: polygon(
    0 0, calc(100% - 6px) 0, 100% 6px,
    100% 100%, 6px 100%, 0 calc(100% - 6px)
  );
}

button:hover  { filter: brightness(1.25); transform: translateY(-1px); }
button:active { transform: translateY(0); }

.bg {
  background: linear-gradient(135deg, #00b047, #00ff66);
  color: #000;
  border-color: #00ff66;
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.45);
}

.br {
  background: linear-gradient(135deg, #b3003b, #ff0055);
  color: #fff;
  border-color: #ff0055;
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.45);
}

.bp {
  background: linear-gradient(135deg, #6d00b3, #00f3ff);
  color: #fff;
  border-color: var(--b);
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.4);
}

.bx {
  background: rgba(255, 255, 255, 0.08);
  color: var(--tx);
  border-color: rgba(255, 255, 255, 0.25);
}

.bx:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ── Operative status ───────────────────────────────────────── */
#me { margin-bottom: 8px; font-size: 13px; }
#me b { color: var(--y); text-shadow: 0 0 8px rgba(255, 230, 0, 0.6); }

/* ── Badges ─────────────────────────────────────────────────── */
#badges { margin-top: 10px; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 4px 4px 0 0;
  font-size: 11px;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  letter-spacing: 0.03em;
  color: var(--mu);
}

.badge.on {
  background: linear-gradient(90deg, rgba(255, 230, 0, 0.15), rgba(255, 0, 85, 0.25));
  border-color: var(--y);
  color: var(--tx);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.3);
  text-shadow: 0 0 6px rgba(255, 230, 0, 0.6);
}

/* ── CRT Effects ────────────────────────────────────────────── */
@keyframes crt-scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes crt-flicker {
  0%   { opacity: 0.985; }
  25%  { opacity: 0.995; }
  50%  { opacity: 0.978; }
  75%  { opacity: 1;     }
  100% { opacity: 0.982; }
}

.crt-overlay-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 255, 0, 0.03));
  background-size: 100% 3px, 4px 100%;
  pointer-events: none;
}

.crt-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 243, 255, 0.04) 50%,
    rgba(0, 255, 102, 0.02) 80%,
    transparent 100%
  );
  opacity: 0.7;
  pointer-events: none;
  animation: crt-scanline 8s linear infinite;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(4, 4, 8, 0.6) 88%, rgba(2, 2, 5, 0.92) 100%);
  pointer-events: none;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 243, 255, 0.1);
}

.crt-flicker-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 243, 255, 0.012);
  animation: crt-flicker 0.12s infinite;
  pointer-events: none;
}

/* ── Globe country tooltip ──────────────────────────────────── */
#globe-tooltip {
  position: fixed;
  display: none;
  pointer-events: none;
  z-index: 500;
  background: rgba(4, 8, 22, 0.92);
  border: 1px solid rgba(0, 243, 255, 0.45);
  border-radius: 4px;
  padding: 7px 12px;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--b);
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.25);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

#globe-tooltip .tt-flag { font-size: 18px; margin-right: 5px; }
#globe-tooltip .tt-name { color: #fff; font-weight: 700; }
#globe-tooltip .tt-stat { color: var(--g); margin-top: 3px; font-size: 10px; }
#globe-tooltip .tt-fall { color: var(--r); font-size: 10px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  h1       { font-size: 24px; }
  .big div { min-width: 100%; }
  #threejs-container-ANIMATION_3 { height: 380px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .crt-beam,
  .crt-flicker-layer { animation: none !important; }
}

/* ── Minimal Utilities (Tailwind CDN replacement) ────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.mb-2 { margin-bottom: 8px; }

/* ── Cyber Form Controls ─────────────────────────────────── */
.cyber-select {
  background: rgba(8, 10, 18, 0.95);
  color: var(--tx);
  border: 1px solid rgba(0, 243, 255, 0.35);
  border-radius: 3px;
  padding: 8px 12px;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 13px;
  outline: none;
  margin: 6px 0;
  width: 100%;
  max-width: 320px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
.cyber-select:focus {
  border-color: var(--b);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

/* ── Terminal Footer & Privacy Protocol ─────────────────────── */
.terminal-footer {
  margin-top: 24px;
  padding: 16px 4px 10px;
  border-top: 1px solid var(--ln-dim);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(8, 10, 18, 0.6);
  border: 1px solid rgba(0, 243, 255, 0.15);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--mu);
  letter-spacing: 0.02em;
}

.privacy-note .icon {
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.footer-meta {
  margin-top: 12px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(110, 118, 142, 0.6);
  text-transform: uppercase;
}

/* ── Stats Broadcast Bar ────────────────────────────────────── */
.stats-broadcast-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 243, 255, 0.2);
}

.stats-broadcast-bar button {
  flex: 1 1 200px;
  margin: 0;
  font-size: 12px;
  padding: 9px 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}


