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

:root {
  --phosphor: #e8c87a;
  --phosphor-dim: #a08548;
  --phosphor-faint: #3d3220;
  --phosphor-glow: rgba(232, 200, 122, 0.12);
  --rust: #c45d3e;
  --rust-dim: #7a3a27;
  --jade: #5ab882;
  --jade-dim: #2d6644;
  --slate: #7a7680;
  --ink: #0a0a0d;
  --panel: #111114;
  --panel-edge: #222228;
}

body {
  font-family: 'DM Mono', 'Courier New', monospace;
  background: var(--ink);
  color: var(--phosphor);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

body.admitted { cursor: pointer; }

/* --- CRT scanlines + vignette --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.08) 2px,
      rgba(0,0,0,0.08) 4px
    );
  pointer-events: none;
  z-index: 100;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0,0,0,0.6) 100%
  );
  pointer-events: none;
  z-index: 99;
}

::selection { background: var(--phosphor); color: var(--ink); }

/* --- static noise canvas --- */
#noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  pointer-events: none;
}

/* --- main container --- */
.transmission {
  position: relative;
  z-index: 1;
  width: min(680px, 92vw);
}

/* --- frequency bar --- */
.freq-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  padding: 0 0.2rem;
}

.freq-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 8px var(--rust);
  animation: freqPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

body.admitted .freq-indicator {
  background: var(--jade);
  box-shadow: 0 0 8px var(--jade);
}

@keyframes freqPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.freq-label {
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--slate);
}

.freq-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--panel-edge), transparent);
}

/* --- main panel --- */
.panel {
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  position: relative;
  overflow: hidden;
}

/* Warm phosphor bleed on the edges */
.panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(180deg, var(--phosphor-glow) 0%, transparent 30%),
    linear-gradient(0deg, var(--phosphor-glow) 0%, transparent 20%);
  pointer-events: none;
  z-index: 0;
}

/* --- ASCII art zone --- */
.ascii-zone {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 1.2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(232,200,122,0.03) 0%, transparent 100%);
}

.ascii-art {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.45rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: pre;
  letter-spacing: 0.06em;
  color: var(--phosphor);
  text-shadow: 0 0 10px var(--phosphor-glow);
  animation: drift 12s linear infinite;
  opacity: 0.85;
}

@keyframes drift {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* --- content area --- */
.content {
  position: relative;
  z-index: 1;
  padding: 1.8rem 2rem;
}

/* --- featured site --- */
.site-name {
  font-family: 'Libre Baskerville', 'Georgia', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--phosphor);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 30px rgba(232, 200, 122, 0.2);
  animation: warmGlow 4s ease-in-out infinite;
}

@keyframes warmGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(232, 200, 122, 0.15); }
  50% { text-shadow: 0 0 40px rgba(232, 200, 122, 0.3), 0 0 80px rgba(232, 200, 122, 0.08); }
}

.blurb {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.75;
  max-width: 480px;
  font-style: italic;
}

.blurb-link {
  color: var(--phosphor-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--phosphor-faint);
  transition: all 0.3s ease;
  font-style: normal;
  font-weight: 400;
}

.blurb-link:hover {
  color: var(--phosphor);
  border-color: var(--phosphor-dim);
}

/* --- separator --- */
.sep {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.sep-dot {
  width: 3px;
  height: 3px;
  background: var(--phosphor-faint);
  border-radius: 50%;
  flex-shrink: 0;
}

.sep-line {
  flex: 1;
  height: 1px;
  background: var(--panel-edge);
}

/* --- queue readout --- */
.queue-readout {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.queue-glyph {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.4;
}

.queue-body {
  flex: 1;
}

.queue-label {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--phosphor-faint);
  margin-bottom: 0.35rem;
}

.queue-msg {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.5;
}

.eta-value {
  color: var(--phosphor);
  font-weight: 500;
}

.queue-enter {
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--jade);
  animation: enterFlicker 2s ease-in-out infinite;
}

@keyframes enterFlicker {
  0%, 100% { opacity: 0.6; }
  30% { opacity: 1; }
  32% { opacity: 0.7; }
  34% { opacity: 1; }
  70% { opacity: 0.9; }
}

/* --- bottom status bar --- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 2rem;
  border-top: 1px solid var(--panel-edge);
  background: rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.status-item {
  font-size: 0.5rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--phosphor-faint);
}

.status-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
  background: var(--rust-dim);
  animation: statusBlink 3s ease-in-out infinite;
}

body.admitted .status-dot {
  background: var(--jade-dim);
}

@keyframes statusBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- page load animation --- */
.transmission {
  animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.content {
  animation: contentReveal 0.8s ease-out 0.4s both;
}

@keyframes contentReveal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* --- responsive --- */
@media (min-width: 600px) {
  .ascii-art { font-size: 0.58rem; }
  .site-name { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .content { padding: 1.2rem 1rem; }
  .status-bar { padding: 0.5rem 1rem; }
  .site-name { font-size: 1.2rem; }
}
