/* =========================
   THEME TOKENS + RESET
   ========================= */
:root {
  --bg-1: #020811;
  --bg-2: #071a33;
  --neon: #33d9ff;
  --neon-strong: #00bfff;
  --text: #d9f7ff;
  --danger: #ff275c;
}

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

html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: "Rajdhani", Arial, sans-serif;
  color: var(--text);
  background: #010a14;
}

.landing-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(1.08) contrast(1.08) brightness(0.56);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(10, 47, 90, 0.62) 0%, rgba(7, 26, 51, 0.72) 30%, rgba(2, 8, 17, 0.82) 70%),
    repeating-linear-gradient(115deg, rgba(80, 180, 255, 0.06) 0 2px, transparent 2px 22px);
}

/* =========================
   FRAME LAYOUT
   ========================= */
.hud-frame {
  position: relative;
  width: min(1100px, 94vw);
  min-height: min(650px, 86vh);
  display: grid;
  place-items: center;
  border: 1px solid rgba(78, 205, 255, 0.35);
  box-shadow:
    0 0 20px rgba(0, 191, 255, 0.35),
    inset 0 0 20px rgba(0, 191, 255, 0.2);
}

.hud-frame::before,
.hud-frame::after {
  content: "";
  position: absolute;
  left: 3%;
  width: 94%;
  height: 12px;
  background: var(--neon);
  filter: blur(1px);
  box-shadow:
    0 0 12px var(--neon),
    0 0 30px var(--neon-strong);
}

.hud-frame::before {
  top: 20px;
}

.hud-frame::after {
  bottom: 20px;
}

.hud-side {
  position: absolute;
  top: 72px;
  bottom: 72px;
  width: 24px;
  pointer-events: none;
  border: 1px solid rgba(92, 208, 255, 0.28);
  background: var(--neon);
  box-shadow:
    0 0 12px var(--neon),
    0 0 30px var(--neon-strong);
  animation: sidePulse 3.1s ease-in-out infinite;
}



.hud-side-left {
  left: 20px;
}

.hud-side-right {
  right: 20px;
  transform: scaleX(-1);
}

/* =========================
   SYSTEM PANEL
   ========================= */
.systemBox {
  position: relative;
  overflow: hidden;
  width: min(700px, 88vw);
  min-height: 420px;
  padding: 42px 56px 34px;
  border: 2px solid rgba(162, 236, 255, 0.75);
  background:
    linear-gradient(rgba(4, 16, 30, 0.82), rgba(2, 12, 24, 0.9)),
    repeating-linear-gradient(130deg, rgba(80, 190, 255, 0.05) 0 2px, transparent 2px 24px);
  box-shadow:
    0 0 18px rgba(90, 210, 255, 0.45),
    inset 0 0 25px rgba(0, 160, 255, 0.18);
  backdrop-filter: blur(2px);
}

.systemBox > * {
  position: relative;
  z-index: 2;
}

.systemBox::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
  background:
    repeating-linear-gradient(
      128deg,
      transparent 0 18px,
      rgba(115, 210, 255, 0.09) 18px 20px,
      transparent 20px 42px
    ),
    repeating-linear-gradient(
      38deg,
      transparent 0 26px,
      rgba(88, 190, 255, 0.08) 26px 28px,
      transparent 28px 64px
    ),
    radial-gradient(circle at 22% 35%, rgba(118, 223, 255, 0.2), transparent 36%),
    radial-gradient(circle at 78% 68%, rgba(76, 181, 255, 0.16), transparent 40%);
  mix-blend-mode: screen;
  animation: crackFlicker 3.4s ease-in-out infinite;
}

.systemBox::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 43%, rgba(145, 231, 255, 0.09) 50%, transparent 58%),
    linear-gradient(20deg, transparent 0 65%, rgba(108, 205, 255, 0.08) 72%, transparent 80%);
  transform: translateX(-18%);
  animation: crackScan 4.2s linear infinite;
}

.systemHeader {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}

.alertIcon {
  position: relative;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(170, 240, 255, 0.7);
  display: grid;
  place-items: center;
  font-family: "Orbitron", sans-serif;
  font-size: 50px;
  color: #c7f6ff;
  box-shadow: 0 0 14px rgba(0, 195, 255, 0.35);
}

.alertIcon::before {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(170, 240, 255, 0.9);
  box-shadow: 0 0 10px rgba(120, 220, 255, 0.35);
}

.systemTitle {
  flex: 1;
  border: 2px solid rgba(170, 240, 255, 0.4);
  padding: 14px 18px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(26px, 3.2vw, 48px);
  letter-spacing: 2px;
  text-align: center;
  color: #e8fcff;
  text-shadow: 0 0 12px rgba(108, 223, 255, 0.75);
}

/* =========================
   TYPOGRAPHY + STATUS TEXT
   ========================= */
.systemText {
  font-size: clamp(24px, 2.1vw, 36px);
  line-height: 1.45;
  margin-bottom: 62px;
  min-height: 170px;
  white-space: pre-line;
  text-shadow: 0 0 8px rgba(150, 227, 255, 0.35);
}

.danger {
  color: var(--danger);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 45, 101, 0.5);
}

.accent {
  color: #8fffd6;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(140, 255, 208, 0.45);
}

.typing-cursor {
  display: inline-block;
  margin-left: 4px;
  opacity: 1;
  animation: blink 0.7s steps(1) infinite;
}

/* =========================
   ACTIONS + LOADING
   ========================= */
.actions {
  display: flex;
  justify-content: center;
  gap: min(16vw, 120px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.actions.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.actions button {
  min-width: 160px;
  padding: 12px 24px;
  border: 2px solid rgba(170, 240, 255, 0.45);
  background: rgba(2, 14, 28, 0.72);
  color: #e0fbff;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(28px, 2.3vw, 38px);
  cursor: pointer;
  transition: 0.25s ease;
}

.actions button:hover {
  border-color: #b9f8ff;
  box-shadow:
    0 0 10px rgba(64, 218, 255, 0.65),
    inset 0 0 10px rgba(64, 218, 255, 0.25);
  transform: translateY(-2px);
}

.choiceStatus {
  margin-top: 18px;
  text-align: center;
  min-height: 28px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
  font-size: clamp(16px, 1.4vw, 22px);
  color: #8ed6ff;
  text-shadow: 0 0 8px rgba(85, 196, 255, 0.4);
}

.loadingLine {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
}

.loadingDots::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.2s steps(4, end) infinite;
}

.loadingBar {
  width: min(450px, 76vw);
  height: 12px;
  margin-top: 18px;
  border: 1px solid rgba(170, 240, 255, 0.45);
  box-shadow: inset 0 0 10px rgba(62, 193, 255, 0.2);
}

.loadingBar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4ccfff, #a7f3ff);
  box-shadow: 0 0 12px rgba(76, 207, 255, 0.75);
  animation: loadingProgress 2.6s linear forwards;
}

/* =========================
   TRANSIENT STATE CLASSES
   ========================= */
.fade-out {
  animation: fadeOut 0.45s ease forwards;
}

.systemBox.accepted {
  box-shadow:
    0 0 18px rgba(90, 255, 180, 0.45),
    inset 0 0 25px rgba(90, 255, 180, 0.15);
}

.systemBox.rejected {
  box-shadow:
    0 0 18px rgba(255, 95, 140, 0.45),
    inset 0 0 25px rgba(255, 95, 140, 0.15);
}

/* =========================
   KEYFRAMES
   ========================= */
@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes dots {
  0% {
    width: 0;
  }
  100% {
    width: 3ch;
  }
}

@keyframes loadingProgress {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes crackFlicker {
  0%,
  100% {
    opacity: 0.34;
    filter: brightness(0.9);
  }
  40% {
    opacity: 0.48;
    filter: brightness(1.05);
  }
  52% {
    opacity: 0.6;
    filter: brightness(1.22);
  }
  70% {
    opacity: 0.42;
    filter: brightness(0.95);
  }
}

@keyframes crackScan {
  0% {
    transform: translateX(-22%);
    opacity: 0.18;
  }
  50% {
    transform: translateX(10%);
    opacity: 0.3;
  }
  100% {
    transform: translateX(26%);
    opacity: 0.14;
  }
}

@keyframes sidePulse {
  0%,
  100% {
    opacity: 0.52;
    filter: brightness(0.92);
  }
  50% {
    opacity: 0.82;
    filter: brightness(1.18);
  }
}

/* =========================
   RESPONSIVE - TABLET
   ========================= */
@media (max-width: 720px) {
  .hud-side {
    width: 14px;
    top: 56px;
    bottom: 56px;
    opacity: 0.45;
  }

  .hud-side-left {
    left: 8px;
  }

  .hud-side-right {
    right: 8px;
  }

  .systemBox {
    padding: 24px 20px;
    min-height: 360px;
  }

  .systemHeader {
    margin-bottom: 28px;
  }

  .alertIcon {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  .actions {
    gap: 20px;
  }

  .actions button {
    min-width: 120px;
  }
}

/* =========================
   RESPONSIVE - MOBILE
   ========================= */
@media (max-width: 480px) {
  body {
    overflow: hidden;
  }

  .hud-frame {
    width: 98vw;
    min-height: 96vh;
  }

  .hud-frame::before,
  .hud-frame::after {
    width: 92%;
    left: 4%;
    height: 8px;
  }

  .systemBox {
    width: 92vw;
    min-height: 320px;
    padding: 16px 12px 18px;
  }

  .systemHeader {
    gap: 8px;
    margin-bottom: 16px;
  }

  .alertIcon {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .alertIcon::before {
    width: 36px;
    height: 36px;
  }

  .systemText {
    min-height: 124px;
    margin-bottom: 22px;
    font-size: clamp(18px, 6vw, 26px);
  }

  .actions {
    gap: 10px;
  }

  .actions button {
    min-width: 100px;
    padding: 8px 10px;
    font-size: clamp(18px, 6vw, 26px);
  }
}
