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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fafafa;
}

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

header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
}

header .updated {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #111;
}

p, li {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.75rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

li { margin-bottom: 0.4rem; }

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

th {
  background: #f5f5f5;
  font-weight: 600;
  color: #111;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.85rem;
  color: #666;
}

footer a { color: #666; }
footer a:hover { color: #111; }

/* ── Form styles ──────────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-card h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.35rem;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.15s;
}

input[type="email"]:focus,
input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 1rem;
}

.btn:hover { background: #1d4ed8; }
.btn:disabled { background: #93b4f5; cursor: not-allowed; }

.btn-secondary {
  background: #fff;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.btn-secondary:hover { background: #f0f6ff; }

.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.api-key-box {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.9rem;
  word-break: break-all;
  position: relative;
  margin: 0.75rem 0;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
}

.copy-btn:hover { background: #f5f5f5; }

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

.benefits li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: #333;
}

.benefits li::before {
  content: "\2713";
  color: #16a34a;
  font-weight: 700;
  margin-right: 0.5rem;
}

.meta {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-top: 1rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
