:root {
  /* 深色模式（默认） */
  --bg: #0f0f10;
  --surface: #18181a;
  --surface-2: #212124;
  --text: #f2f2f0;
  --text-muted: #a6a39b;
  --accent: #a3b59a;
  --accent-dark: #7a8f70;
  --accent-text: #0f0f10;
  --border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(15, 15, 16, 0.85);
  --shadow: rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1080px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #f0f0f2;
    --text: #1a1a1a;
    --text-muted: #6e6e73;
    --accent: #7a8f70;
    --accent-dark: #5f7356;
    --accent-text: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(245, 245, 247, 0.85);
    --shadow: rgba(0, 0, 0, 0.12);
  }
}

:root[data-theme="dark"] {
  --bg: #0f0f10;
  --surface: #18181a;
  --surface-2: #212124;
  --text: #f2f2f0;
  --text-muted: #a6a39b;
  --accent: #a3b59a;
  --accent-dark: #7a8f70;
  --accent-text: #0f0f10;
  --border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(15, 15, 16, 0.85);
  --shadow: rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --text: #1a1a1a;
  --text-muted: #6e6e73;
  --accent: #7a8f70;
  --accent-dark: #5f7356;
  --accent-text: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --header-bg: rgba(245, 245, 247, 0.85);
  --shadow: rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: url("../images/logo.svg") no-repeat center / contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--text);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-switch {
  position: relative;
}

.theme-switch summary {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-switch[open] summary,
.theme-switch summary:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface);
}

.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 140px;
  box-shadow: 0 12px 32px var(--shadow);
  z-index: 110;
}

.theme-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.theme-menu button:hover {
  background: var(--surface);
}

.theme-menu button.active {
  color: var(--accent);
}

.lang-switch {
  position: relative;
}

.lang-switch summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switch[open] summary,
.lang-switch summary:hover {
  color: var(--text);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 160px;
  box-shadow: 0 12px 32px var(--shadow);
}

.lang-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.9rem;
}

.lang-menu a:hover {
  background: var(--surface);
  text-decoration: none;
}

.lang-menu a.active {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 110px 0 90px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero p.tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.hero .cta:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.hero .meta {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sections */
section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: 2rem;
  margin: 0 0 16px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
}

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Shortcuts */
.shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}

.shortcut span:first-child {
  color: var(--text-muted);
}

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.9rem;
  color: var(--text);
}

/* Download */
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.download-card .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.download-card .cta:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Privacy */
.privacy {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
}

.privacy strong {
  color: var(--text);
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer .links {
  margin-bottom: 12px;
}

footer .links a {
  margin: 0 12px;
}

/* Legal pages */
.legal-page {
  padding: 48px 0 72px;
}

.legal-page .container {
  max-width: 860px;
}

.legal-page h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
  text-align: left;
}

.legal-effective {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 10px;
}

.legal-section {
  padding: 24px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.legal-effective + .legal-section {
  margin-top: 28px;
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-size: 1.08rem;
  line-height: 1.35;
  text-align: left;
  margin: 0 0 10px;
}

.legal-section h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px;
  color: var(--text);
}

.legal-section p,
.legal-section ul {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 10px;
}

.legal-section p:last-child,
.legal-section ul:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  padding-left: 20px;
}

.legal-section li {
  margin-bottom: 6px;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
}

.cookie-banner-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-banner-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 720px;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: background 0.15s ease;
}

.cookie-btn:hover {
  background: var(--surface-2);
}

.cookie-btn-accept {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}

.cookie-btn-accept:hover {
  background: var(--accent-dark);
}

@media (max-width: 640px) {
  .legal-page {
    padding: 36px 0 64px;
  }

  .legal-section {
    padding: 22px 0;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Cookie consent reset button (用于 cookies / privacy 页) */
.cookie-reset-section {
  display: flex;
  justify-content: flex-start;
  padding: 18px 0 8px;
}

.cookie-reset-section .cookie-btn {
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
  nav {
    display: none;
  }

  .hero {
    padding: 70px 0 60px;
  }

  .download-card {
    padding: 32px 24px;
  }

  .header-controls {
    gap: 8px;
  }
}

/* Screenshots */
.screenshots {
  padding: 60px 0 80px;
  text-align: center;
}

.screenshot-hero {
  max-width: 900px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px var(--shadow);
}

/* Screenshot gallery */
.screenshot-gallery {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.screenshot-gallery h2 {
  margin-bottom: 48px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px var(--shadow);
}

.gallery-grid figcaption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Download 页面专属：超大主 CTA */
.cta-large {
  display: inline-block;
  padding: 18px 36px;
  font-size: 1.2em;
  margin: 24px 0 12px;
}

.download-hero {
  text-align: center;
  padding: 64px 0 48px;
}

.download-hero h1 {
  font-size: 2.4em;
  margin-bottom: 12px;
}

.download-hero .lede {
  font-size: 1.15em;
  color: var(--text-muted, #666);
  max-width: 560px;
  margin: 0 auto 32px;
}

.download-meta {
  color: var(--text-muted, #666);
  font-size: 0.95em;
  margin: 12px 0 28px;
}

.download-alt {
  font-size: 0.95em;
  color: var(--text-muted, #666);
}
