:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --border: #e3e6ee;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --primary: #5b6cff;
  --primary-hover: #4856e6;
  --primary-soft: #eef0ff;
  --accent: #ff7a59;
  --success: #2bb673;
  --danger: #e5484d;
  --shadow-sm: 0 1px 2px rgba(15, 18, 30, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 18, 30, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 18, 30, 0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --note-yellow: #fff5b8;
  --note-pink: #ffd6e2;
  --note-blue: #d6e6ff;
  --note-green: #d6f5dc;
  --note-purple: #e7d6ff;
}

[data-theme="dark"] {
  --bg: #0f1117;
  --surface: #181b24;
  --surface-2: #20242f;
  --border: #2a2f3d;
  --text: #e8eaf2;
  --text-muted: #9aa0b4;
  --primary: #7c8aff;
  --primary-hover: #98a3ff;
  --primary-soft: #232847;
  --accent: #ff9978;
  --note-yellow: #4d4621;
  --note-pink: #4d2638;
  --note-blue: #1f3354;
  --note-green: #1f4a30;
  --note-purple: #3b2756;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

button { font-family: inherit; }
input, textarea {
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.muted { color: var(--text-muted); font-size: 13px; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 14px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, border-color 0.15s;
  background: transparent;
  color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--primary); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 12px 22px; font-size: 16px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
}
.btn-icon:hover { background: var(--primary-soft); }

/* Views */
.view { padding: 24px; max-width: 1400px; margin: 0 auto; }

/* Hero / Landing */
.hero {
  text-align: center;
  padding: 60px 24px 80px;
  max-width: 720px;
  margin: 0 auto;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0 0 40px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-bottom: 48px;
}
.join-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 460px;
}
.join-form input { flex: 1; }
.stage-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.stage-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.site-footer {
  text-align: center;
  padding: 20px 16px 28px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .hero { padding: 40px 16px 60px; }
  .topbar { padding: 10px 14px; }
  .brand-text { display: none; }
  .view { padding: 16px; }
}
