:root {
  --bg: #0b0d11;
  --bg-subtle: #0f1218;
  --surface: #141821;
  --surface-elevated: #1a202c;
  --border: #262d3d;
  --border-strong: #353f54;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --blue: #38bdf8;
  --blue-soft: rgba(56, 189, 248, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --max-w: 1140px;
  --doc-w: 860px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(245, 158, 11, 0.11), transparent 70%),
    radial-gradient(700px 360px at 85% 120px, rgba(56, 189, 248, 0.06), transparent 70%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Language visibility: English is default in static HTML for crawlers & OAuth verifiers */
[data-lang="zh"] {
  display: none !important;
}

html[data-active-lang="zh"] [data-lang="en"] {
  display: none !important;
}

html[data-active-lang="zh"] [data-lang="zh"] {
  display: revert !important;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: #fbbf24;
  text-decoration: underline;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

code {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #fde68a;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  font-size: 0.88em;
}

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

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

/* Header / Topbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 13, 17, 0.84);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  text-decoration: none !important;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 999px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--text);
  color: #0b0d11;
}

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

.hero-pills {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.pill-emerald {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.pill-amber {
  background: var(--accent-soft);
  border-color: rgba(245, 158, 11, 0.32);
  color: #fbbf24;
}

.hero-logo {
  width: 84px;
  height: 84px;
  margin-bottom: 16px;
  filter: drop-shadow(0 12px 28px rgba(245, 158, 11, 0.22));
}

.hero h1 {
  margin: 0 auto 16px;
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 820px;
}

.hero-subtitle {
  margin: 0 auto 30px;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #f8fafc;
  color: #0b0d11 !important;
  border: 1px solid #f8fafc;
}

.btn-primary:hover {
  background: #e2e8f0;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
}

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

.hero-legal-bar {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

.hero-legal-bar a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Screenshots Showcase */
.showcase {
  padding: 16px 0 56px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.screenshot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
}

.screenshot-caption {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

/* Sections */
.section {
  padding: 52px 0;
  border-top: 1px solid rgba(38, 45, 61, 0.65);
}

.section-header {
  margin-bottom: 32px;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

/* Feature Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

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

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

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

/* Protocol Table */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: rgba(26, 32, 44, 0.7);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

td {
  color: var(--text-secondary);
}

/* Google OAuth & Security Transparency Box */
.trust-panel {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.07) 0%, rgba(20, 24, 33, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.trust-panel h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  color: #ecfdf5;
}

.trust-list {
  margin: 14px 0 18px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.trust-list li {
  margin-bottom: 8px;
}

.trust-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.9rem;
}

/* Legal Document Pages (Privacy Policy & Terms of Service) */
.doc-main {
  flex: 1;
  padding: 48px 0 72px;
}

.doc-header {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.doc-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.callout {
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.callout-amber {
  background: var(--accent-soft);
  border-color: rgba(245, 158, 11, 0.35);
}

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

.doc-content h2 {
  margin: 36px 0 12px;
  font-size: 1.32rem;
  color: var(--text);
  padding-top: 8px;
}

.doc-content h3 {
  margin: 22px 0 8px;
  font-size: 1.06rem;
  color: var(--text);
}

.doc-content p,
.doc-content li {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.doc-content ul,
.doc-content ol {
  padding-left: 22px;
  margin: 10px 0 18px;
}

.doc-content li {
  margin-bottom: 7px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 36px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

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

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

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

@media (max-width: 640px) {
  .hero {
    padding: 44px 0 28px;
  }
  .trust-panel {
    padding: 20px;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #111827;
  }
  .site-header, .lang-switch {
    display: none;
  }
  .doc-content p, .doc-content li, .doc-content h2, .doc-content h3, td, th {
    color: #111827;
  }
}
