/* CacheBin Official Site - Shared Styles
   Used by: index.html, privacy.html, terms.html
   Last Updated: 2026-06-02 */

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

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --line: #e5e5e5;
  --accent: #007aff;
  --accent-soft: rgba(0,122,255,0.08);
  --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #f5f5f5;
    --muted: #999;
    --line: #222;
    --accent: #0a84ff;
    --accent-soft: rgba(10,132,255,0.12);
    --card: #141414;
  }
}

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
               Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
header {
  padding: 20px 0; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}
.nav { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #007aff, #5856d6);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--fg); text-decoration: none; }

/* Hero (index.html) */
.hero { padding: 72px 0 56px; text-align: center; }
.badge-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.hero h1 {
  font-size: 52px; line-height: 1.1; margin: 0 0 18px;
  font-weight: 700; letter-spacing: -0.025em;
}
.hero .subtitle { font-size: 19px; color: var(--muted); margin: 0 auto 32px; max-width: 600px; }
.hero .tagline { font-size: 13px; color: var(--muted); margin-top: 16px; }

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  background: var(--accent); color: white;
  font-weight: 600; font-size: 16px;
}
.cta:hover { text-decoration: none; opacity: 0.9; }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  background: transparent; color: var(--fg);
  font-weight: 500; font-size: 16px;
  border: 1px solid var(--line);
}
.cta-secondary:hover { text-decoration: none; background: var(--card); }
.cta-row { display: flex; gap: 12px; justify-content: center; margin: 28px 0 12px; flex-wrap: wrap; }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--line); }
h2 { font-size: 30px; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.015em; }
.section-sub { color: var(--muted); margin: 0 0 32px; font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease;
}
.feature:hover { border-color: var(--accent); }
.feature h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .icon { font-size: 22px; margin-bottom: 10px; display: block; }

.cache-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cache-tag {
  padding: 6px 12px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--fg);
}

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan {
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  position: relative;
  text-align: left;
}
.plan.best { border-color: var(--accent); border-width: 2px; background: var(--accent-soft); }
.plan-badge {
  position: absolute; top: -10px; left: 24px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--accent); color: white;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.plan h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.plan .price { font-size: 36px; font-weight: 700; margin: 0; line-height: 1; }
.plan .price-period { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan .trial { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.cn-section h2 { font-size: 26px; }
.cn-section p { color: var(--muted); font-size: 15px; max-width: 640px; }

/* Document pages (privacy.html, terms.html) */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: 38px; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.02em; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 40px; }
.doc h2 {
  font-size: 22px; margin: 40px 0 12px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; font-weight: 600; }
.doc p { margin: 0 0 14px; color: var(--fg); }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 24px; }
.doc li { margin-bottom: 6px; color: var(--fg); }
.doc .callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 15px;
}
.doc .callout strong { color: var(--fg); }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Footer */
footer {
  padding: 36px 0; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
.footer-links a { color: var(--muted); margin-right: 16px; }
.footer-links a:last-child { margin-right: 0; }
.footer-links a:hover { color: var(--fg); text-decoration: none; }

@media (max-width: 640px) {
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 34px; }
  .hero .subtitle { font-size: 16px; }
  .nav-links { display: none; }
  h2 { font-size: 22px; }
  section { padding: 44px 0; }
  .plan .price { font-size: 28px; }
  .doc { padding: 40px 0 60px; }
  .doc h1 { font-size: 28px; }
  .doc h2 { font-size: 19px; }
}
