:root {
  --bg-1: #070b14;
  --bg-2: #0d1526;
  --ink: #e8eefc;
  --dim: #7d8bab;
  --accent: #6ee7ff;
  --accent-2: #ff7ac6;
  --line: rgba(110, 231, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 700px at 50% -10%, #142138 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-2), var(--bg-1) 70%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  overflow: hidden;
}

/* Full working-area marquee viewport */
#marquee {
  position: fixed;
  inset: 0;
  overflow: hidden;
  padding: 0 clamp(16px, 4vw, 72px);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 7%,
    #000 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 7%,
    #000 93%,
    transparent 100%
  );
}

.track {
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.line {
  padding: clamp(10px, 1.4vh, 20px) 0;
  line-height: 1.25;
  font-size: clamp(20px, 4.4vh, 56px);
  letter-spacing: 0.005em;
  text-wrap: pretty;
  animation: pop 0.5s ease both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.line .author {
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 18px rgba(110, 231, 255, 0.35);
}

.line .sep {
  color: var(--dim);
  padding: 0 0.15em;
}

.line .text {
  color: var(--ink);
}

.line.new .text {
  color: #fff;
}

.empty {
  color: var(--dim);
  font-size: clamp(20px, 4.4vh, 56px);
  padding: 6vh 0;
}

.badge {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 5;
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--accent);
  opacity: 0.5;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.5);
  backdrop-filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .line {
    animation: none;
  }
}
