/* ── Font: TopazPlus ───────────────────── */
@font-face {
  font-family: 'TopazPlus-a1200';
  src: url('TopazPlus.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── Reset ──────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: #0b0d14;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 21px;
  color: #e8e8e8;
  overflow: hidden;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: none;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

/* ── CRT Container ──────────────────────── */
#crt {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#crt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.8) 100%);
  z-index: 10;
  pointer-events: none;
}

/* ── Screen ─────────────────────────────── */
#screen {
  position: relative;
  z-index: 1;
  animation: boot-up 0.5s ease-out;
}

/* ── Centered Box ───────────────────────── */
#box {
  border: 4px double #e8e8e8;
  padding: 36px 60px;
  text-align: center;
  box-shadow:
    0 0 16px rgba(255, 255, 255, 0.25),
    0 0 40px rgba(255, 255, 255, 0.15),
    inset 0 0 16px rgba(255, 255, 255, 0.1);
  text-shadow:
    0 0 6px #ffffff,
    0 0 16px rgba(255, 255, 255, 0.3);
}

#box-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#title {
  font-family: 'TopazPlus-a1200', 'Courier New', monospace;
  font-size: 30px;
  letter-spacing: 2px;
  text-shadow:
    0 0 8px #ffffff,
    0 0 20px rgba(255, 255, 255, 0.4);
}

#subtitle {
  font-family: 'TopazPlus-a1200', 'Courier New', monospace;
  font-size: 21px;
  letter-spacing: 2px;
  text-shadow:
    0 0 6px #ffffff,
    0 0 16px rgba(255, 255, 255, 0.3);
}

/* ── Pixel Grid ─────────────────────────── */
#scanlines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px);
  background-size: 2px 2px;
  z-index: 5;
  pointer-events: none;
}

/* ── Flicker ────────────────────────────── */
#flicker {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  animation: flicker 0.15s infinite;
  opacity: 0;
}

/* ── Animations ─────────────────────────── */
@keyframes boot-up {
  0%   { opacity: 0; filter: brightness(4) contrast(2); }
  25%  { opacity: 1; filter: brightness(4) contrast(2); }
  60%  { filter: brightness(1.5) contrast(1.5); }
  100% { filter: brightness(1) contrast(1); }
}

@keyframes flicker {
  0%   { opacity: 0.02; }
  5%   { opacity: 0; }
  10%  { opacity: 0.02; }
  100% { opacity: 0; }
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 500px) {
  body { font-size: 12px; }
  #title { font-size: 16px; }
  #subtitle { font-size: 12px; }
}
