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

:root {
  --color-bg: #111111;
  --color-text: #e0e0e0;
  --color-accent: #8b5cf6;
  --color-accent-hover: #a78bfa;
  --color-muted: #999;
  --color-input-bg: rgba(255, 255, 255, 0.08);
  --color-input-border: rgba(255, 255, 255, 0.15);
}

html {
  background: #111111;
  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: difference;
  overflow: hidden;
}

#sim-canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: url(#metaball);
}

main {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 560px;
  width: 100%;
}

header {
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.tagline {
  color: var(--color-muted);
  font-size: 1.1rem;
}

.signup {
  margin-bottom: 3rem;
}

.form-row {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem 0.25rem 0.25rem 0;
  transition: border-color 0.2s;
}

.form-row:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
}

input[type="email"] {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  background: transparent;
  border: none;
  color: var(--color-text);
  outline: none;
  text-align: center;
}

input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

button[type="submit"] {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s;
}

button[type="submit"]:hover {
  color: rgba(255, 255, 255, 0.7);
}

button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  min-height: 1.25rem;
}

.form-message.success {
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  position: relative;
}

.checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid #4ade80;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  animation: checkPop 0.4s ease forwards;
}

.checkmark.drawn::after {
  transform: rotate(45deg) scale(1);
}

@keyframes checkPop {
  0% { transform: rotate(45deg) scale(0); }
  50% { transform: rotate(45deg) scale(1.3); }
  100% { transform: rotate(45deg) scale(1); }
}

.form-message.error {
  color: #f87171;
}

footer {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.social-links {
  margin-bottom: 0.75rem;
}

.social-links a {
  color: var(--color-muted);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--color-text);
}

.copyright {
  opacity: 0.7;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .form-row {
    padding: 0.15rem 0.15rem 0.15rem 0;
  }
}
