:root {
  --bg: #0f0f14;
  --surface: #1a1a22;
  --text: #e4e4e7;
  --muted: #71717a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--surface);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.header nav a,
.header nav button {
  margin-left: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.header nav a:hover,
.header nav button:hover {
  color: var(--text);
}

.hidden { display: none !important; }

#user-info { margin-left: 1rem; }
#user-email { color: var(--muted); margin-right: 0.5rem; }

.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--muted);
}
.btn-secondary:hover {
  background: var(--muted);
  border-color: var(--text);
}

.features {
  padding: 3rem 0;
}

.features h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
}

.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 0; }

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--surface);
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Forms */
.form-card {
  max-width: 400px;
  margin: 4rem auto;
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
}

.form-card h1 { margin-top: 0; text-align: center; }

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  color: #f87171;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-card .btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
}

.form-card .link {
  text-align: center;
  margin-top: 1rem;
}

.form-card .link a { color: var(--accent); }

/* Download page */
.download-section {
  max-width: 560px;
  margin: 3rem auto;
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
}

.download-section h2 { margin-top: 0; }

.download-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.download-list li {
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.download-list a.btn { margin: 0; }

.ios-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.subscription-url-wrap #subscription-url-box {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.subscription-url-wrap #subscription-url-box.hidden { display: none !important; }
.subscription-url-wrap #subscription-url-input {
  width: 280px;
  max-width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: 6px;
  color: var(--text);
}

.steps {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg);
}

.steps h3 { font-size: 1rem; }
.steps ol { padding-left: 1.25rem; color: var(--muted); }
.steps li { margin-bottom: 0.5rem; }
