/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-border: #d2d2d7;
  --color-code-bg: #f5f5f7;
  --max-width: 980px;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #000000;
    --color-surface: #1c1c1e;
    --color-text: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-accent: #2997ff;
    --color-accent-hover: #40a9ff;
    --color-border: #38383a;
    --color-code-bg: #2c2c2e;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  }
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(0, 0, 0, 0.8);
  }
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.nav-links .github-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-text-secondary);
  transition: fill 0.2s;
  vertical-align: middle;
}

.nav-links .github-icon:hover svg {
  fill: var(--color-text);
}

.lang-switcher {
  position: relative;
}

.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 28px 4px 10px;
  font-size: 0.8rem;
  color: var(--color-text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236e6e73'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero .tagline {
  font-size: 1.3rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

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

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

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

.btn-sponsor {
  background: #fdeef3;
  color: #bf3989;
  border: 1px solid #f0c4d6;
}

.btn-sponsor:hover {
  background: #fce0eb;
}

.btn-sponsor svg {
  fill: #bf3989;
}

@media (prefers-color-scheme: dark) {
  .btn-sponsor {
    background: #2d1520;
    color: #f778ba;
    border-color: #5c2d42;
  }

  .btn-sponsor:hover {
    background: #3d1f2e;
  }

  .btn-sponsor svg {
    fill: #f778ba;
  }
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ===== Screenshot ===== */
.screenshot-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
  text-align: center;
}

.screenshot-window {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: inline-block;
  max-width: 960px;
  width: 100%;
}

.screenshot-window img {
  display: block;
  width: 100%;
}

.screenshot-caption {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 16px;
}

/* ===== Features ===== */
.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  text-align: center;
  padding: 32px 24px;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== How It Works ===== */
.how-it-works {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 60px 24px;
}

.how-it-works-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.how-it-works h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== Shortcut ===== */
.shortcut-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.shortcut-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.shortcut-section p {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.kbd-combo {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

kbd {
  display: inline-block;
  padding: 8px 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kbd-plus {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* ===== FAQ ===== */
.faq {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
}

.faq h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
}

.faq-item:first-of-type {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  font-size: 1rem;
  font-weight: 600;
}

.faq-item .faq-answer {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===== CTA ===== */
.cta {
  text-align: center;
  padding: 60px 24px 80px;
}

.cta h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta p {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .features-grid,
  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .nav-links {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 16px 40px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}
