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

:root {
  --bg: #0a0a0b;
  --fg: #e8e6e3;
  --accent: #22d3ee;
  --muted: #71717a;
  --border: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(255, 255, 255, 0.04);
  --btn-fg: #0a0a0b;
}

[data-theme="light"] {
  --bg: #f8f7f5;
  --fg: #1a1918;
  --accent: #0891b2;
  --muted: #52525b;
  --border: rgba(0, 0, 0, 0.08);
  --input-bg: rgba(0, 0, 0, 0.04);
  --btn-fg: #fff;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Syne', sans-serif;
  padding: 2rem;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: var(--border);
}

.theme-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.theme-icon.light-icon {
  display: none;
}

.theme-icon.dark-icon {
  display: inline;
}

[data-theme="light"] .theme-icon.light-icon {
  display: inline;
}

[data-theme="light"] .theme-icon.dark-icon {
  display: none;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}

main {
  text-align: center;
  max-width: 36rem;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.logo {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.accent {
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 1.125rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 2.5rem;
}

.signup {
  display: flex;
  gap: 0.5rem;
  max-width: 22rem;
  margin: 0 auto 0.75rem;
}

.signup input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: 'JetBrains Mono', monospace;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.signup input::placeholder {
  color: var(--muted);
}

.signup input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.signup button {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  background: var(--accent);
  color: var(--btn-fg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.signup button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.3);
}

.signup button:active {
  transform: translateY(0);
}

.success-message {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0 auto 0.75rem;
  max-width: 22rem;
}

.success-message.visible {
  display: flex;
  animation: successIn 0.35s ease-out;
}

@keyframes successIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent);
  color: var(--btn-fg);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.signup.hidden {
  display: none;
}

.footnote {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.8;
}

@media (max-width: 480px) {
  .signup {
    flex-direction: column;
    max-width: 100%;
  }
}
