:root {
  --bg: #f4f4f5;
  --text: #222222;
  --muted: #6b6b6b;
  --line: #d9d9dc;
  --accent: #333333;

  --neon-purple: #a78bfa;
  --neon-green: #34d399;
  --neon-blue: #3b82f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 2rem 1.5rem;
  max-width: 40rem;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

h2 {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
}

p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

a {
  color: var(--text);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4rem;
}

header h1 {
  margin: 0;
}

nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

main section {
  padding: 3rem 0;
}

button {
  font: inherit;
  font-size: 1.1rem;
  padding: 0.9rem 2rem;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  opacity: 0.85;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  background: #fff;
}

input:focus {
  outline: none;
  border-color: var(--text);
}

form button {
  font-size: 1rem;
  padding: 0.7rem 1rem;
}

/* ---------- Draw page layout ---------- */
.draw {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 700px) {
  body:has(.draw) {
    max-width: 56rem;
  }

  .draw {
    grid-template-columns: 1fr 1fr;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.panel h2 {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}

textarea {
  font: inherit;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
  min-height: 14rem;
}

textarea:focus {
  outline: none;
  border-color: var(--text);
}

ol {
  margin: 0;
  padding: 0.8rem 0.8rem 0.8rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 14rem;
}

ol li {
  padding: 0.2rem 0;
}

ol .empty {
  list-style: none;
  margin-left: -1.4rem;
  color: var(--muted);
}

button.secondary {
  color: var(--text);
  background: transparent;
}

/* ---------- Landing page: neon noir ---------- */
body.landing {
  max-width: 68rem;
  color: #eceaf5;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(167, 139, 250, 0.22), transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgba(52, 211, 153, 0.18), transparent 55%),
    #07070d;
  position: relative;
}

/* faint rain streaks */
body.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 14px
  );
}

body.landing > * {
  position: relative;
}

body.landing header {
  border-bottom-color: rgba(167, 139, 250, 0.3);
  margin-bottom: 2rem;
}

body.landing h1 {
  color: var(--neon-purple);
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.7);
}

body.landing nav a {
  color: #9a97b0;
}

body.landing nav a:hover {
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  margin-bottom: 1rem;
}

body.landing h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(167, 139, 250, 0.55),
    0 0 32px rgba(167, 139, 250, 0.35);
}

body.landing p {
  color: #a9a6c0;
  font-size: 1.1rem;
}

body.landing button {
  color: #fff;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid var(--neon-purple);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.5), inset 0 0 10px rgba(167, 139, 250, 0.25);
}

body.landing button:hover {
  opacity: 1;
  border-color: var(--neon-green);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.7), inset 0 0 14px rgba(52, 211, 153, 0.3);
  transform: translateY(-2px);
}

.hero-art-wrap {
  display: flex;
  justify-content: center;
}

.hero-art {
  width: 100%;
  max-width: 28rem;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow:
    0 0 28px rgba(167, 139, 250, 0.45),
    0 0 70px rgba(52, 211, 153, 0.2);
}

/* ---------- Draw page: dark, bold colored names ---------- */
body.draw-page {
  color: #e8e8f0;
  background: #0e1017;
}

body.draw-page h1 {
  color: #ffffff;
}

body.draw-page a {
  color: #9a9ab0;
}

body.draw-page a:hover {
  color: #ffffff;
}

body.draw-page .panel h2,
body.draw-page label {
  color: #8b8ba3;
}

body.draw-page textarea,
body.draw-page ol {
  background: #161925;
  border-color: #2a2e42;
  color: #e8e8f0;
}

body.draw-page textarea:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.35);
}

body.draw-page textarea::placeholder {
  color: #55586e;
}

body.draw-page ol li {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.3rem 0;
}

body.draw-page ol .empty {
  font-weight: 400;
  font-size: 1rem;
  color: #55586e;
}

body.draw-page #shuffle-btn {
  background: var(--neon-purple);
  border-color: var(--neon-purple);
  color: #14111f;
  font-weight: 600;
}

body.draw-page #shuffle-btn:hover {
  opacity: 1;
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.6);
  transform: translateY(-1px);
}

/* Blue export button */
body.draw-page #export-btn {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
}

body.draw-page #export-btn:hover {
  opacity: 1;
  background: #3b82f6;
  border-color: #60a5fa;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.75);
  transform: translateY(-2px);
}
