/* ======================
   BASE
   ====================== */

body{
  margin: 0;
  color: #9da3a0;
  font-family: monospace;
  overflow-x: hidden;
  background: transparent; /* PDA background handles the outside */
}

.hidden{ display:none !important; }

/* ======================
   PDA FRAME
   ====================== */

.pda{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 14px;
  background: #070807; /* outside device */
}

.pda-bezel{
  width: min(1040px, 96vw);
  border-radius: 18px;
  background: linear-gradient(180deg, #121413, #0a0c0b);
  border: 1px solid rgba(42,48,45,0.95);
  box-shadow:
    0 18px 60px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,0,0,0.7) inset;
  padding: 14px;
  position: relative;
}

.pda-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(42,48,45,0.7);
  background: rgba(10,12,11,0.55);
  border-radius: 12px;
  margin-bottom: 12px;
}

.pda-title{
  display: flex;
  gap: 10px;
  align-items: baseline;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.pda-brand{
  color: rgba(190,110,110,0.92);
  border: 2px dashed rgba(190,110,110,0.65);
  padding: 3px 7px;
  border-radius: 8px;
  opacity: 0.9;
  font-size: 12px;
}

.pda-model{
  opacity: 0.75;
  font-size: 12px;
}

.pda-icons{ display:flex; gap: 8px; opacity: 0.85; }

.pda-led{
  width: 9px;
  height: 9px;
  border-radius: 99px;
  border: 1px solid rgba(42,48,45,0.9);
  background: rgba(160,170,166,0.35);
}
.pda-led:nth-child(1){ background: rgba(190,110,110,0.55); }

.pda-screen{
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(42,48,45,0.9);
  background: #0f1110; /* your old body background */
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.65) inset,
    0 0 22px rgba(0,0,0,0.35) inset;
}

/* subtle glass */
.pda-screen::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  pointer-events:none;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.00) 35%,
    rgba(255,255,255,0.03) 70%,
    rgba(255,255,255,0.00)
  );
  opacity: 0.22;
  z-index: 5;
}

.pda-bottom{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  border: 1px solid rgba(42,48,45,0.7);
  background: rgba(10,12,11,0.55);
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  opacity: 0.75;
}

/* ======================
   CONTENT LAYOUT
   ====================== */

.intro{
  padding: 3vh 6vw 2vh;
}

.intro h1{ margin: 0 0 6px; }
.intro p{ margin: 0; opacity: 0.7; }

.street{
  padding: 3vh 6vw;
  margin-top: 2vh;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Index camera tiles */
.camera-grid{
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: flex-start;
  align-items: flex-start;
}

.terminal{
  border: 1px solid #2a302d;
  background: #151a18;
  padding: 30px;
  color: #7f8a86;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* subtle terminal flicker */
.terminal::after{
  content:"";
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  animation: flicker 4.5s infinite;
  pointer-events: none;
}

@keyframes flicker{
  0%, 92%, 100% { opacity: 0; }
  93% { opacity: 0.12; }
  94% { opacity: 0.02; }
  95% { opacity: 0.16; }
  96% { opacity: 0.03; }
  97% { opacity: 0.10; }
}

.terminal:hover{ filter: contrast(1.05); }

/* cam tiles */
.cam-tile{ min-height: 170px; }

.cam-overlay{
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  opacity: 0.75;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
}

.cam-overlay b{
  display:block;
  color: rgba(190,110,110,0.95);
  margin-bottom: 6px;
}
.cam-overlay em{
  display:block;
  font-style: normal;
  opacity: 0.75;
  margin-bottom: 6px;
}
.cam-overlay i{
  display:block;
  font-style: normal;
  opacity: 0.55;
}

.cam-tile::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0; bottom:0; /* no inset */
  pointer-events:none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.22;
}

/* Map */
.map{
  margin-top: 6vh;
  padding: 3vh 6vw;
}

.map-box{
  border: 1px dashed rgba(42,48,45,0.9);
  padding: 40px;
  max-width: 420px;
  background: rgba(12,14,13,0.85);
  opacity: 0.86;
}

.about-zone{
  margin-top: 6vh;
  padding: 3vh 6vw;
  display: flex;
  justify-content: center;   /* centers the unit */
}
.about-box{
  border: 1px dashed rgba(42,48,45,0.9);
  padding: 28px 32px;
  width: min(560px, 90vw);   /* controlled width */
  background: rgba(12,14,13,0.85);
  opacity: 0.88;
}

.about-text{
  margin-top: 16px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 1px;
  opacity: 0.75;
  white-space: pre-wrap;
}

.about-links a{
  color: rgba(170,90,90,0.95);   /* PDA warning red */
  text-decoration: none;
  border-bottom: 1px dashed rgba(170,90,90,0.6);
  letter-spacing: 2px;
  font-size: 11px;
  opacity: 0.75;
}

.about-links a:hover{
  opacity: 1;
  border-color: rgba(190,110,110,0.95);
}


.label{
  display:inline-block;
  padding: 6px 10px;
  border: 1px solid #2a302d;
  background: rgba(20,24,22,0.8);
  letter-spacing: 1px;
  opacity: 0.85;
}

.map-links a{
  display:block;
  margin-top:10px;
  color:#7f8a86;
  text-decoration:none;
  opacity:0.75;
  transition: transform 120ms ease, opacity 200ms ease;
}
.map-links a:hover{
  opacity:1;
  animation: mapJitter 0.25s steps(2) 1;
}

@keyframes mapJitter{
  0%{ transform: translate(0,0); }
  40%{ transform: translate(-1px,1px); }
  70%{ transform: translate(1px,-1px); }
  100%{ transform: translate(0,0); }
}

.locked{
  display:block;
  margin-top:10px;
  opacity:0.35;
  letter-spacing:2px;
  border:1px dashed #2a302d;
  padding:6px 10px;
  cursor:not-allowed;
}

.stamp{
  display:inline-block;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px dashed rgba(160,80,80,0.9);
  color: rgba(170,90,90,0.95);
  text-transform: uppercase;
  letter-spacing: 2px;
  transform: rotate(-2deg);
  opacity: 0.75;
}

/* Logs */
.log{
  margin-top: 6vh;
  padding: 3vh 6vw;
  color: #8a8f8c;
  opacity: 0.6;
}

/* ======================
   VIEWERS (inside PDA screen)
   ====================== */

.viewer,
.static-viewer{
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; /* no inset */
  background: rgba(10,12,11,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.viewer::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  pointer-events:none;
  background: radial-gradient(circle, transparent 55%, rgba(0,0,0,0.65) 100%);
}

.viewer-close{
  position:absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: 1px solid #2a302d;
  color: #9da3a0;
  padding: 8px 10px;
  cursor: pointer;
  opacity: 0.75;
  z-index: 70;
}
.viewer-close:hover{ opacity: 1; }

.viewer img{
  max-width: 80vw;
  max-height: 70vh;
  background: #0b0d0c;
  padding: 18px 22px;
  box-shadow: 0 0 0 1px rgba(42,48,45,0.9);
}

.viewer-text{
  margin-top: 20px;
  opacity: 0.5;
  z-index: 70;
}

/* ======================
   STATIC VIEWER “VIDEO”
   ====================== */

.static-screen{
  position: relative;

  width: 86vw;
  max-width: 900px;

  height: 62vh;
  max-height: 520px;

  border: 1px solid rgba(42,48,45,0.9);
  background: #0b0d0c;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(42,48,45,0.9);
}


/* Chunky TV static */
.static-noise{
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.35' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.18' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 380px 380px, 620px 620px;
  background-position: 0 0, 80px 40px;
  opacity: 0.85;
  mix-blend-mode: screen;
  filter: contrast(145%) brightness(130%);
  animation: tvSnowSlow 0.28s steps(3) infinite;
}

@keyframes tvSnowSlow{
  0%   { background-position: 0 0, 80px 40px; }
  25%  { background-position: -22px 10px, 120px 18px; }
  50%  { background-position: -12px 30px, 60px 60px; }
  75%  { background-position: -36px 18px, 140px 40px; }
  100% { background-position: 0 0, 80px 40px; }
}

/* HUD */
.hud{
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  padding: 18px;
  pointer-events:none;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(160,170,166,0.85);
}

.hud-top{
  display:flex;
  justify-content: space-between;
  opacity: 0.85;
}

.hud-tag{
  border: 1px solid rgba(42,48,45,0.9);
  padding: 4px 8px;
  background: rgba(10,12,11,0.35);
}

.hud-status{
  color: rgba(190,110,110,0.95);
  border: 1px dashed rgba(190,110,110,0.65);
  padding: 4px 8px;
  background: rgba(10,12,11,0.35);
}

.hud-mid{
  position:absolute;
  left: 18px;
  right: 18px;
  top: 48%;
  transform: translateY(-50%);
  text-align:center;
}

.hud-warn{
  display:inline-block;
  padding: 8px 12px;
  border: 2px dashed rgba(190,110,110,0.75);
  color: rgba(190,110,110,0.95);
  background: rgba(10,12,11,0.35);
}

.hud-bot{
  position:absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display:flex;
  justify-content: space-between;
  opacity: 0.72;
}

.hud-blink{
  color: rgba(190,110,110,0.95);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink{
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

/* ======================
   SCREEN AMBIENCE (inside PDA screen)
   ====================== */

/* fog + noise are absolute now */
.fog, .noise{
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  pointer-events:none;
  z-index: 12;
}

.fog{
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05), transparent 55%),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,0.04), transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.03), transparent 60%);
  filter: blur(12px);
  opacity: 0.75;
  animation: fogdrift 40s linear infinite;
}

@keyframes fogdrift{
  from{ transform: translateX(0); }
  to{ transform: translateX(-120px); }
}

.noise{
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  animation: noiseframe 0.25s steps(2) infinite;
}

@keyframes noiseframe{
  from{ transform: translate(0,0); }
  to{ transform: translate(-12px, 8px); }
}

.radio{
  position:absolute;
  left: 16px;
  bottom: 14px;
  z-index: 20;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid #2a302d;
  background: rgba(15,17,16,0.65);
  color: rgba(160,170,166,0.75);
  font-size: 12px;
  letter-spacing: 1px;
  pointer-events: none;
  opacity: 0.85;
}

/* warning light */
.warning-light{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(190,70,70,0.9);
  box-shadow: 0 0 12px rgba(190,70,70,0.35);
  z-index: 20;
  opacity: 0.0;
  animation: redFlicker 9s infinite;
}

@keyframes redFlicker{
  0%, 70%, 100% { opacity: 0.0; }
  72% { opacity: 0.45; }
  73% { opacity: 0.12; }
  74% { opacity: 0.55; }
  75% { opacity: 0.08; }
  76% { opacity: 0.35; }
}

/* anomaly ping */
.anomaly-ping{
  position:absolute;
  left: 16px;
  bottom: 58px;
  z-index: 22;
  padding: 8px 10px;
  border: 1px dashed rgba(190,110,110,0.75);
  background: rgba(10,12,11,0.75);
  color: rgba(190,110,110,0.95);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
}

.anomaly-ping a{
  margin-left: 10px;
  color: rgba(190,110,110,0.95);
  text-decoration:none;
  border-bottom: 1px dotted rgba(190,110,110,0.6);
  opacity: 0.8;
}
.anomaly-ping a:hover{ opacity: 1; }

/* floating anomaly blobs (inside screen) */
.anomaly{
  position:absolute;
  left:0;
  top:0;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 18;
  opacity: 0.22;
  background: radial-gradient(circle,
    rgba(220,255,245,0.35),
    rgba(10,12,11,0.0) 65%);
  filter: blur(1px);
  mix-blend-mode: screen;
}

/* ======================
   BOOT OVERLAY (inside screen)
   ====================== */

.boot-overlay{
  position:absolute;
  top:0; left:0; right:0; bottom:0; /* no inset */
  display:flex;
  align-items:center;
  justify-content:center;
  background: #0f1110;
  color: #9da3a0;
  z-index: 80;

  opacity: 0;
  animation: bootFade 6s ease forwards;
}

.boot-overlay pre{
  font-family: monospace;
  letter-spacing: 2px;
  opacity: 0.85;
  text-align: center;
}

@keyframes bootFade{
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

.boot-box{
  width: 86vw;
  max-width: 520px;
  text-align: center;
}


.boot-meter{
  margin: 18px auto 10px;
  height: 12px;
  border: 1px solid rgba(42,48,45,0.9);
  background: rgba(10,12,11,0.35);
  overflow: hidden;
  position: relative;
}

.boot-fill{
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    rgba(190,110,110,0.55),
    rgba(190,110,110,0.55) 10px,
    rgba(10,12,11,0.0) 10px,
    rgba(10,12,11,0.0) 18px
  );
  animation: bootLoad 5.2s steps(18) forwards, bootFlicker 0.9s steps(2) infinite;
  opacity: 0.85;
}

@keyframes bootLoad{
  0%   { width: 0%; }
  80%  { width: 92%; }
  100% { width: 97%; }
}

@keyframes bootFlicker{
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.2); }
}

.boot-pct{
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.75;
}

/* RETURN button — bold authorization stamp */
.back.back-stamp{
  display: inline-block;
  margin-top: 18px;
  padding: 10px 16px;

  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;

  color: rgba(170, 90, 90, 0.95);
  background: rgba(12,14,13,0.6);

  border: 2px solid rgba(170, 90, 90, 0.85);   /* thicker than AUTHORIZED */
  box-shadow:
    inset 0 0 0 1px rgba(170, 90, 90, 0.25),
    0 0 0 1px rgba(0,0,0,0.4);

  opacity: 0.8;

  transition:
    opacity 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

/* Hover: subtle red pressure glow */
.back.back-stamp:hover{
  opacity: 1;
  color: rgba(200, 110, 110, 0.98);
  border-color: rgba(200, 110, 110, 0.95);

  box-shadow:
    inset 0 0 0 1px rgba(200, 110, 110, 0.35),
    0 0 8px rgba(180, 80, 80, 0.25);

  filter: contrast(1.05);
}

/* Optional: tiny jitter on hover (PDA instability) */
.back.back-stamp:hover{
  animation: stampJitter 0.25s steps(2) 1;
}

@keyframes stampJitter{
  0%   { transform: translate(0,0); }
  40%  { transform: translate(-1px, 1px); }
  70%  { transform: translate(1px, -1px); }
  100% { transform: translate(0,0); }
}

/* Military: two terminals side-by-side (systematic) */
.two-up{
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 22px 34px;
  align-items: flex-start;
}

@media (max-width: 820px){
  .two-up{
    grid-template-columns: 1fr;
  }
}


/* === FORCE ABOUT CENTER + PDA LINKS (OVERRIDE) === */
.about-zone{
  margin-top: 6vh;
  padding: 3vh 6vw;
  display: flex !important;
  justify-content: center !important;
}

.about-zone .about-box{
  width: 560px;
  max-width: 90vw;
  margin: 0 auto !important;
}

/* Kill default blue links only inside the About block */
.about-zone .about-links a:link,
.about-zone .about-links a:visited{
  color: rgba(170,90,90,0.95) !important;
  text-decoration: none !important;
  border-bottom: 1px dashed rgba(170,90,90,0.6) !important;
}

.about-zone .about-links a:hover{
  color: rgba(190,110,110,0.98) !important;
  border-bottom-color: rgba(190,110,110,0.95) !important;
  opacity: 1 !important;
}

