/* 官网/styles.css */

/* ===== CSS 变量（主题） ===== */
:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-sunken: #f0f0f0;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e0e0e0;
  --accent: #ff6b35;
  --accent-hover: #e85a25;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-elevated: #1a1d23;
  --bg-sunken: #0a0c10;
  --text: #e8e8e8;
  --text-muted: #999;
  --border: #2a2d33;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

main { padding: 48px 0; }

section + section { margin-top: 64px; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

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

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  /* 已禁用：nav 中间链接已去掉 */
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  /* 已禁用：nav 中间链接已去掉 */
  display: none;
}

.nav-toggle:hover { background: var(--bg-sunken); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background: var(--bg-sunken);
}

.btn-large {
  padding: 10px 20px;
  font-size: 14px;
}

/* Disabled state (占位常量留空时) */
.btn.disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 48px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Screenshot placeholder ===== */
.screenshot-placeholder {
  aspect-ratio: 1280 / 800;
  background: var(--bg-sunken);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-muted);
}

.screenshot-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.screenshot-placeholder.zoomable,
button.screenshot-placeholder.zoomable {
  cursor: zoom-in;
  transition: transform var(--transition), box-shadow var(--transition);
}

a.screenshot-placeholder.zoomable:hover,
button.screenshot-placeholder.zoomable:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}

.lightbox-stage.dragging { cursor: grabbing; }

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: none;
}

.lightbox-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 12px;
  user-select: none;
}

/* ===== Section heading ===== */
.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ===== Features grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Video 已禁用（CSS 保留以便恢复） ===== */

/* ===== Screenshots gallery ===== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 64px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

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

.footer-copyright {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Privacy page ===== */
.privacy-content h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.privacy-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--text);
}

.privacy-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
  max-width: 760px;
}

.privacy-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* ===== Changelog ===== */
.changelog-section {
  margin-top: 80px;
  padding-top: 64px;
  border-top: 1px solid var(--border);
}

.changelog {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.changelog-entry {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: box-shadow var(--transition);
}

.changelog-entry:hover {
  box-shadow: var(--shadow);
}

.changelog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.changelog-head h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.changelog-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-sunken);
  padding: 4px 10px;
  border-radius: 999px;
}

.changelog-entry ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.changelog-entry li {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.changelog-entry li::marker {
  color: var(--accent);
}

/* ===== Donate page ===== */
.donate-intro {
  text-align: center;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center;
  gap: 32px;
}

/* 两张卡片统一用 flex 布局，让 Ko-fi 按钮和微信 QR 图下沿对齐 */
.donate-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.donate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.donate-card .btn,
.donate-card .qr-placeholder {
  align-self: center;
}

.donate-card .qr-placeholder {
  aspect-ratio: 1;
  max-width: 200px;
  margin-top: auto;
  margin-bottom: 16px;
}

.donate-card .btn {
  width: 100%;
  max-width: 220px;
  margin-top: auto;
  margin-bottom: 23px;
  padding: 8px 20px;
  font-size: 13px;
}

.donate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.donate-card h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.donate-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.donate-card .qr-placeholder {
  aspect-ratio: 1;
  max-width: 200px;
  margin: 0 auto 16px;
}

.donate-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.donate-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 4px 0;
}

.donate-features .check {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.donate-card .donate-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  margin: 0;
  padding: 8px 0;
}

.donate-card #kofi-widget {
  max-width: 280px;
  margin: 0 auto;
}

.donate-card #kofi-widget iframe {
  display: block;
  margin: 0 auto;
}

/* ===== Theme toggle button ===== */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 18px;
  color: var(--text-muted);
}

.theme-toggle:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

[data-theme="dark"] .sun { display: inline; }
[data-theme="dark"] .moon { display: none; }
[data-theme="light"] .sun,
:root:not([data-theme]) .sun { display: none; }
[data-theme="light"] .moon,
:root:not([data-theme]) .moon { display: inline; }

/* ===== Lang switcher ===== */
.lang-switcher {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}

.lang-switcher:hover { background: var(--border); }

/* nav 里的 btn 高度对齐 lang-switcher（约 32px） */
.nav .btn {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
  /* 移动端折叠菜单已禁用（无中间链接） */
  .hero { padding: 48px 0 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 32px; }
  .hero .subtitle { font-size: 16px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }

  .features-grid { grid-template-columns: 1fr; }

  .screenshots-grid { grid-template-columns: 1fr; }

  .donate-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
