:root {
  --bg-0: #14111b;
  --bg-1: #1a1621;
  --bg-2: #231f32;
  --bg-3: #2a2540;
  --ink: #eee9fc;
  --muted: #9a90b3;
  --line: #3f3951;
  --accent: #b3f4f3;
  --accent-2: #e192ef;
  --accent-3: #b1f2a7;
  --warn: #f0c27b;
  --danger: #e965a5;
  --shadow: rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  background: radial-gradient(1000px 600px at 10% -20%, #2b2436, transparent),
    radial-gradient(700px 500px at 90% -10%, #1c2a35, transparent),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 40%, var(--bg-0));
  color: var(--ink);
  min-height: 100vh;
  padding: 24px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(transparent 95%, rgba(255, 255, 255, 0.03)),
    linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.02));
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: screen;
}

.shell { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }

.hero { text-align: center; margin-bottom: 32px; }

.hero h1 {
  font-family: "Space Grotesk", "JetBrains Mono", sans-serif;
  font-size: 36px; font-weight: 600; color: var(--accent);
  text-transform: lowercase; margin-bottom: 8px;
}

.subtitle {
  font-size: 13px; color: var(--muted);
  text-transform: lowercase; margin-bottom: 16px;
}

.nav-tabs {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 16px;
  flex-wrap: wrap; padding: 0 8px;
}

.nav-btn {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  text-transform: lowercase; text-decoration: none; transition: all 0.15s;
}

.nav-btn:hover { border-color: var(--accent); color: var(--accent); }

.nav-btn.active {
  background: var(--accent); color: var(--bg-1);
  border-color: transparent; box-shadow: 0 10px 20px rgba(179, 244, 243, 0.2);
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--accent-3); font-size: 11px; text-transform: lowercase;
  background: rgba(34, 31, 50, 0.6);
}

.hero-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 12px currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Wheel */
.wheel-container {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; margin-bottom: 32px; position: relative;
}

.wheel-pointer {
  font-size: 32px; color: var(--accent); z-index: 2;
  filter: drop-shadow(0 0 8px rgba(179, 244, 243, 0.5));
  line-height: 1; margin-bottom: -12px;
}

#wheel { max-width: 100%; height: auto; }

.spin-button {
  background: var(--accent); color: var(--bg-1); border: none;
  padding: 14px 32px; border-radius: 12px; font-size: 16px;
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  cursor: pointer; text-transform: lowercase;
  box-shadow: 0 10px 30px rgba(179, 244, 243, 0.3);
  transition: all 0.15s;
}

.spin-button:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(179, 244, 243, 0.4); }
.spin-button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.result {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 10; width: 85%; max-width: 380px;
  text-align: center; padding: 28px; border-radius: 16px;
  background: rgba(26, 22, 33, 0.95); border: 1px solid var(--accent);
  box-shadow: 0 0 60px rgba(179, 244, 243, 0.2);
  backdrop-filter: blur(8px); animation: fadeIn 0.3s ease;
}

.result.hidden { display: none; }

.result-drink {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px; font-weight: 600; color: var(--accent);
  text-transform: lowercase; margin-bottom: 8px;
}

.result-meta {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 12px;
}

.result-notes { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }

.result-quote {
  font-size: 11px; color: var(--accent-2);
  font-style: italic; margin-top: 8px;
}

/* List page */
.filters {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  margin-bottom: 24px;
}

.filter-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.search-input {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  padding: 10px 16px; border-radius: 8px; font-size: 13px; font-family: inherit;
  width: 100%; max-width: 400px; text-transform: lowercase;
  transition: border-color 0.15s; outline: none;
}

.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }

.filter-btn {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); padding: 8px 14px; border-radius: 8px;
  font-size: 12px; font-family: inherit; cursor: pointer;
  text-transform: lowercase; transition: all 0.15s;
}

.filter-btn:hover { border-color: var(--accent); color: var(--accent); }

.filter-btn.active {
  background: var(--accent); color: var(--bg-1);
  border-color: transparent; box-shadow: 0 10px 20px rgba(179, 244, 243, 0.2);
}

#drinks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px; margin-bottom: 32px; align-items: start;
}

.drink-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
  box-shadow: 0 10px 30px var(--shadow);
  animation: rise 0.6s ease both; transition: border-color 0.15s, transform 0.15s;
}

.drink-card:hover { border-color: var(--accent); transform: translateY(-2px); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drink-name {
  font-size: 16px; font-weight: 600; color: var(--accent);
  margin-bottom: 8px; text-transform: lowercase;
}

.drink-meta { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }

.badge {
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line);
  font-size: 10px; color: var(--muted); text-transform: lowercase;
}

.badge.season { color: var(--accent-2); border-color: var(--accent-2); }

.badge.unconfirmed { color: var(--warn); border-color: var(--warn); }

.badge.source-badge { color: var(--danger); border-color: var(--danger); }

.drink-card.community { opacity: 0.7; border-style: dashed; }
.drink-card.community:hover { opacity: 1; }

.drink-notes { font-size: 12px; color: #b8b0cc; line-height: 1.5; }

.drink-recipe { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.drink-recipe.hidden { display: none; }
.recipe-title { font-size: 11px; color: var(--accent); text-transform: lowercase; margin-bottom: 6px; font-weight: 600; }
.recipe-step { font-size: 11px; color: var(--muted); padding: 2px 0; }
.recipe-step::before { content: '• '; color: var(--accent); }

.footer { margin-top: 24px; text-align: center; font-size: 11px; color: var(--muted); }
.footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: var(--accent); }

/* About */
.about-content { max-width: 640px; margin: 0 auto; }

.about-section { margin-bottom: 32px; }

.about-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px; font-weight: 600; color: var(--accent);
  text-transform: lowercase; margin-bottom: 12px;
}

.about-content p {
  font-size: 13px; color: #b8b0cc; line-height: 1.7; margin-bottom: 10px;
}

.about-content em { color: var(--ink); font-style: normal; }

.about-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }

.about-list-item {
  font-size: 12px; color: #b8b0cc; line-height: 1.6;
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-3);
}

.about-list-item .badge {
  color: var(--accent); border-color: var(--accent); margin-right: 4px;
}

.about-list-item .badge.unconfirmed {
  color: var(--warn); border-color: var(--warn);
}

.about-link { color: var(--accent); text-decoration: none; }
.about-link:hover { text-decoration: underline; }

a.about-list-link {
  text-decoration: none; display: block; cursor: pointer;
  transition: border-color 0.15s;
}
a.about-list-link:hover { border-color: var(--accent); }

/* Timeline */
#timeline { max-width: 640px; margin: 0 auto; position: relative; padding-left: 40px; }
#timeline::before {
  content: ''; position: absolute; left: 18px; top: 0; bottom: 0;
  width: 2px; background: var(--line);
}

.tl-year { position: relative; margin-bottom: 28px; }

.tl-marker {
  position: absolute; left: -30px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--accent); background: var(--accent);
  box-shadow: 0 0 8px rgba(179, 244, 243, 0.3);
}

.tl-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px;
}

.tl-drinks { display: flex; flex-direction: column; gap: 6px; }

.tl-drink {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); display: flex; justify-content: space-between;
  align-items: center; gap: 8px; text-decoration: none; transition: border-color 0.15s;
}

.tl-drink:hover { border-color: var(--accent); }

.tl-name { font-size: 13px; color: var(--accent); font-weight: 600; text-transform: lowercase; }
.tl-ep { font-size: 11px; color: var(--muted); text-align: right; }

/* Generator */
.generator-container {
  display: flex; flex-direction: column; align-items: center; gap: 24px; margin-bottom: 32px;
}

.gen-card {
  text-align: center; padding: 32px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: 0 10px 30px var(--shadow); width: 100%; max-width: 520px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.gen-card.gen-active { border-color: var(--accent); box-shadow: 0 0 40px rgba(179, 244, 243, 0.15); }

.gen-drink {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px; font-weight: 600; color: var(--accent);
  text-transform: lowercase; margin-bottom: 12px; line-height: 1.3;
}

.gen-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }

.gen-quote { font-size: 12px; color: var(--accent-2); font-style: italic; }

.gen-history { max-width: 520px; margin: 0 auto; text-align: center; }

.gen-history-title {
  font-size: 11px; color: var(--muted); text-transform: lowercase;
  margin-bottom: 8px; text-align: center;
}

.gen-history-item {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
  text-transform: lowercase; background: var(--bg-2);
}

@media (max-width: 640px) {
  body { padding: 16px; }
  .hero h1 { font-size: 28px; }
  #drinks-grid { grid-template-columns: 1fr; }
  #wheel { width: 300px; height: 300px; }
  .result-drink { font-size: 22px; }
}
