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

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #0a0a0a;
  --bg-card:     #141414;
  --bg-raised:   #1e1e1e;
  --border:      rgba(255, 255, 255, 0.07);
  --text:        #f2f2f2;
  --text-2:      #999;
  --text-3:      #555;
  --accent:      #ff6b35;
  --accent-alt:  #ffb347;
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
  --max-w:       1080px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg:          #f5f5f7;
  --bg-card:     #ffffff;
  --bg-raised:   #e8e8ed;
  --border:      rgba(0, 0, 0, 0.08);
  --text:        #1d1d1f;
  --text-2:      #6e6e73;
  --text-3:      #aeaeb2;
  color-scheme: light;
}

/* ── Base ─────────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}

body.lang-en .lang-zh { display: none; }
body.lang-zh .lang-en { display: none; }

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

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

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

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 28px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
}

.nav-logo .logo-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s;
}

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

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

.btn-lang, .btn-theme {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1;
}

.btn-lang:hover, .btn-theme:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.btn-theme { padding: 5px 10px; }

.hero {
  padding: 96px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, transparent);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 5px 14px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.section { padding: 56px 0; }

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 28px;
  font-weight: 600;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: inherit;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  text-decoration: none;
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.app-icon-ring {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 40%, #ffb347 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-icon-ring::after {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.app-name { font-size: 18px; font-weight: 700; color: var(--text); }
.app-tagline { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.app-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; }

.app-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-2);
}

.app-detail-hero { padding: 64px 0 48px; }

.app-detail-inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.app-detail-icon {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.app-detail-icon-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 40%, #ffb347 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.35);
  position: relative;
  overflow: hidden;
}

.app-detail-icon-placeholder::after {
  content: "";
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 5px rgba(255,255,255,0.25);
}

.app-detail-text h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.app-detail-text .sub {
  font-size: 17px;
  color: var(--text-2);
  margin-top: 10px;
  max-width: 480px;
  line-height: 1.6;
}

.app-detail-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dl-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none !important;
}

.dl-badge:hover { opacity: 0.85; transform: translateY(-1px); }

.dl-badge-ios { background: #000; color: #fff; border: 1px solid #333; }
[data-theme="light"] .dl-badge-ios { background: #1d1d1f; border-color: #1d1d1f; }
.dl-badge-android { background: #1a73e8; color: #fff; }
.dl-badge-soon {
  background: var(--bg-raised);
  color: var(--text-3);
  border: 1px solid var(--border);
  font-weight: 400;
  font-size: 13px;
  cursor: default;
}
.dl-badge-soon:hover { opacity: 1; transform: none; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-icon { font-size: 26px; margin-bottom: 10px; }
.feature-title { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.feature-desc { font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* Screenshots gallery */
.screenshots-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.screenshot-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.screenshot-item img {
  width: 200px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: block;
}

.screenshot-caption {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

@media (max-width: 600px) {
  .screenshot-item img { width: 150px; }
  .screenshots-row { gap: 10px; }
}

.policy-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.policy-wrap h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.policy-meta {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.policy-meta a { color: var(--text-3); }
.policy-meta a:hover { color: var(--text-2); }

.policy-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 40px;
}

.policy-toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.policy-toc ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.policy-toc li a { font-size: 14px; color: var(--text-2); transition: color 0.2s; }
.policy-toc li a:hover { color: var(--accent); text-decoration: none; }

.policy-section { margin-bottom: 44px; }

.policy-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 72px;
}

.policy-item { margin-bottom: 22px; }

.policy-item h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.policy-item p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-line;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); text-decoration: none; }

footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 40px;
}

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

.footer-copy { font-size: 13px; color: var(--text-3); }

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

.footer-links a {
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-2); text-decoration: none; }

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .app-detail-inner { flex-direction: column; gap: 24px; }
  .app-detail-icon,
  .app-detail-icon-placeholder { width: 80px; height: 80px; border-radius: 18px; }
  .app-detail-icon-placeholder::after { width: 38px; height: 38px; border-width: 4px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .hero { padding: 64px 0 48px; }
  .hero::before, .hero::after { display: none; }
}
