* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #eaf4ff;
  font-family: "Press Start 2P", "Courier New", monospace;
  color: #0a1f3b;
}

#crt {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(93, 169, 255, 0.16), transparent 45%),
    radial-gradient(circle at 80% 85%, rgba(163, 196, 255, 0.18), transparent 50%),
    linear-gradient(160deg, #eaf4ff, #f7fbff 55%, #e6f2ff);
}

#scanlines {
  position: absolute;
  inset: -2px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.4;
  background: repeating-linear-gradient(
    0deg,
    rgba(10, 31, 59, 0.12) 0px,
    rgba(10, 31, 59, 0.12) 3px,
    transparent 3px,
    transparent 7px
  );
  mix-blend-mode: multiply;
}

#scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  background-size: 100% 240px;
  animation: sweep 5s linear infinite;
}

@keyframes sweep {
  0% { background-position: 0 -240px; }
  100% { background-position: 0 100vh; }
}

#glow-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  box-shadow: inset 0 0 100px rgba(10, 31, 59, 0.1), inset 0 0 340px rgba(10, 31, 59, 0.22);
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(10, 31, 59, 0.12) 100%);
}

#menu-screen {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 24px;
}

#title-block {
  text-align: center;
}

#title {
  font-size: clamp(24px, 5vw, 40px);
  color: #5da9ff;
  text-shadow: 0 0 6px #5da9ff, 0 0 22px rgba(93, 169, 255, 0.6);
  letter-spacing: 4px;
  animation: flicker 3.2s infinite;
}

#subtitle {
  margin-top: 14px;
  font-size: 10px;
  color: #5da9ff;
  opacity: 0.9;
  letter-spacing: 2px;
}

@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.85; }
  98% { opacity: 1; }
  99% { opacity: 0.7; }
}

#menu-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  width: min(760px, 92vw);
}

/* ===== menu list ===== */

#menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 260px;
}

#menu-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #5c76a8;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
  outline: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

#menu-list li .cursor {
  opacity: 0;
  color: #5da9ff;
  transition: opacity 0.15s;
}

#menu-list li.active {
  color: #0a1f3b;
  background: rgba(93, 169, 255, 0.12);
  border-color: rgba(93, 169, 255, 0.45);
  text-shadow: 0 0 8px rgba(93, 169, 255, 0.4);
}

#menu-list li.active .cursor {
  opacity: 1;
  animation: blink 0.9s steps(1) infinite;
}

#menu-home {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(93, 169, 255, 0.3);
  color: #7f96c4;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== preview panel ===== */

#preview-panel {
  width: min(300px, 90vw);
  padding: 22px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(163, 196, 255, 0.5);
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(93, 169, 255, 0.15), inset 0 0 20px rgba(93, 169, 255, 0.06);
  text-align: center;
}

#preview-chat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  margin-bottom: 16px;
}

#preview-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(93, 169, 255, 0.4);
}

#preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#preview-bubble {
  --bubble-color: #5da9ff;
  position: relative;
  flex: 1;
  background: rgba(93, 169, 255, 0.06);
  border: 1px solid var(--bubble-color);
  border-radius: 3px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

#preview-bubble:hover {
  background: rgba(93, 169, 255, 0.14);
}

#preview-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 14px;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 7px solid var(--bubble-color);
}

#preview-name {
  font-size: 11px;
  color: #0a1f3b;
  letter-spacing: 1px;
  margin-bottom: 8px;
  transition: color 0.2s;
}

#preview-quote {
  font-size: 9px;
  color: #24406b;
  line-height: 1.9;
  font-family: "Courier New", monospace;
  letter-spacing: 0.3px;
}

#preview-more {
  margin-top: 8px;
  font-size: 7px;
  color: #7f96c4;
  letter-spacing: 0.5px;
}

#preview-tagline {
  font-size: 9px;
  color: #5da9ff;
  line-height: 1.8;
  letter-spacing: 0.5px;
}

/* ===== control hints ===== */

#control-hints {
  display: flex;
  gap: 24px;
  font-size: 9px;
  color: #7f96c4;
  letter-spacing: 1px;
}

@media (max-width: 640px) {
  #menu-layout { flex-direction: column; }
  #menu-list { width: 100%; }
  #preview-panel { width: 100%; }
  #control-hints { flex-wrap: wrap; justify-content: center; gap: 12px; }
}
