:root {
  --bg: #06010f;
  --bg-soft: #110825;
  --panel: rgba(16, 7, 36, 0.72);
  --line: rgba(102, 227, 255, 0.3);
  --neon-pink: #ff2fb3;
  --neon-cyan: #59f3ff;
  --neon-purple: #b56dff;
  --text-main: #ecf7ff;
  --text-soft: #9bc7de;
  --grid-line: rgba(89, 243, 255, 0.18);
  --btn-bg: linear-gradient(120deg, rgba(181, 109, 255, 0.18), rgba(89, 243, 255, 0.14));
  --btn-border: rgba(181, 109, 255, 0.55);
}

body.day-neon {
  --bg: #f4fbff;
  --bg-soft: #d6e6ff;
  --panel: rgba(241, 248, 255, 0.72);
  --line: rgba(32, 130, 177, 0.35);
  --text-main: #102338;
  --text-soft: #345c78;
  --grid-line: rgba(34, 122, 172, 0.2);
  --btn-bg: linear-gradient(120deg, rgba(32, 130, 177, 0.16), rgba(181, 109, 255, 0.14));
  --btn-border: rgba(32, 130, 177, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: radial-gradient(circle at 20% 20%, #28104f 0%, transparent 40%),
    radial-gradient(circle at 80% 0%, #00334d 0%, transparent 35%),
    linear-gradient(130deg, var(--bg), var(--bg-soft));
  font-family: "Share Tech Mono", monospace;
  overflow-x: hidden;
}

.shell {
  width: min(920px, 92vw);
  margin: 0 auto;
  padding: 4rem 0 3rem;
  display: grid;
  gap: 1.2rem;
  position: relative;
  z-index: 3;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 14px 40px rgba(0, 0, 0, 0.35), 0 0 32px rgba(89, 243, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 1.2rem 1.25rem;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(89, 243, 255, 0.35) 50%,
    transparent 100%
  );
  opacity: 0.2;
}

.hero h1 {
  margin: 0.4rem 0 0.8rem;
  line-height: 1.06;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px rgba(89, 243, 255, 0.42), 0 0 28px rgba(255, 47, 179, 0.24);
}

.status,
.label {
  margin: 0;
  text-transform: uppercase;
  color: var(--neon-cyan);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.sub {
  margin: 0;
  min-height: 1.4em;
  color: var(--text-soft);
  font-size: clamp(1rem, 2.6vw, 1.15rem);
}

.theme-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.quote blockquote {
  margin: 0.8rem 0 1rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--neon-pink);
  color: #ffe5fa;
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
}

.meme-meta {
  margin: 0.7rem 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

#meme-image {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

#new-quote-btn,
#theme-toggle-btn {
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

#new-quote-btn,
#theme-toggle-btn {
  padding: 0.62rem 1rem;
}

#new-quote-btn:hover,
#theme-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(89, 243, 255, 0.7);
  box-shadow: 0 8px 24px rgba(89, 243, 255, 0.24);
}

.chips ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  color: #d7f5ff;
}

.noise,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.grid-floor {
  position: fixed;
  inset: auto 0 0 0;
  height: 42vh;
  pointer-events: none;
  z-index: 1;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to top, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  transform-origin: bottom;
  transform: perspective(380px) rotateX(62deg) translateY(18%);
  opacity: 0.65;
  animation: drift 10s linear infinite;
}

.noise {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.5px, transparent 0.5px);
  background-size: 2px 2px;
  mix-blend-mode: soft-light;
  opacity: 0.14;
}

.scanline {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(89, 243, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 100% 4px;
  animation: sweep 8s linear infinite;
  opacity: 0.45;
}

body.day-neon .scanline {
  opacity: 0.2;
}

@keyframes sweep {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@keyframes drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 42px 0, 0 42px;
  }
}

@media (max-width: 700px) {
  .shell {
    padding-top: 2.4rem;
  }

  .panel {
    padding: 1rem;
  }

  .theme-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
