:root {
  --bg-color: #1a1a1a;
  --bg-secondary: #252525;
  --text-color: #e0e0e0;
  --text-muted: #8a8a8a;
  --accent-color: #6c7bff;
  --accent-light: #8593ff;
  --border-color: #333;
  --link-color: #8593ff;
  --link-hover: #a3afff;
  --code-bg: #2d2d2d;
  --code-border: #444;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #fafafa;
    --bg-secondary: #f0f0f0;
    --text-color: #1a1a1a;
    --text-muted: #666;
    --border-color: #ddd;
    --code-bg: #eee;
    --code-border: #ccc;
    --accent-color: #5664f0;
    --accent-light: #6c7bff;
    --link-color: #4550cf;
    --link-hover: #3942a6;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

header.container {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 48px;
}

header a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}

header a:hover {
  color: var(--accent-color);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-color);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 64px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
  width: 100%;
  text-align: center;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 2.5rem; margin: 0 0 16px 0; }
h2 { font-size: 1.75rem; margin: 0 0 24px 0; }
h3 { font-size: 1.25rem; margin: 0 0 16px 0; }

p {
  margin: 0 0 16px 0;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* Layout helpers */
.section {
  margin-bottom: 64px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 24px;
  display: block;
  box-shadow: 0 12px 32px rgba(108,123,255,.35);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.hero .status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  background-color: var(--accent-color);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--accent-light);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  color: var(--text-color);
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.step {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.step p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
}

.feature h3 {
  margin-bottom: 12px;
}

.feature p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Privacy section */
.privacy-section {
  padding: 32px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
  text-align: center;
}

.privacy-section h2 {
  margin-bottom: 16px;
}

.privacy-section p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* FAQ */
.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  font-weight: 600;
  padding: 16px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  color: var(--accent-color);
}

.faq-question::after {
  content: ">";
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.faq-question[open]::after {
  transform: rotate(90deg);
}

.faq-answer {
  padding: 0 0 16px 0;
  color: var(--text-muted);
  display: none;
}

.faq-item[open] .faq-answer {
  display: block;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  display: block;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: ">";
  float: right;
  font-size: 1.2rem;
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(90deg);
}

/* Code blocks */
code {
  background-color: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--code-border);
}

pre {
  background-color: var(--code-bg);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--code-border);
  margin: 16px 0;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 0.9em;
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 64px 0;
}

.error-page h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1.1rem; }
  .steps, .features { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .container { padding: 0 16px; }
  body { overflow-x: hidden; }
}
