/* Global OneFeedAPI Dark Obsidian Override for 2,000+ Long-Tail SEO/GEO Pages */
:root {
  color-scheme: dark !important;
  --bg: #06080d !important;
  --card: #0d1320 !important;
  --sub: #141c2c !important;
  --panel: #101726 !important;
  --ink: #f8fafc !important;
  --ink2: #cbd5e1 !important;
  --mut: #94a3b8 !important;
  --faint: #64748b !important;
  --line: rgba(255, 255, 255, 0.08) !important;
  --line2: rgba(255, 255, 255, 0.16) !important;
  --blue: #10f5a0 !important;
  --blue-soft: rgba(16, 245, 160, 0.14) !important;
  --navy: #05070c !important;
  --green: #10f5a0 !important;
  --beam: rgba(255, 255, 255, 0.14) !important;
  --sh0: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
  --sh1: 0 10px 30px -12px rgba(0, 0, 0, 0.65) !important;
  --sh2: 0 24px 60px -18px rgba(0, 0, 0, 0.8) !important;
}

html, body {
  background: #06080d !important;
  color: #f8fafc !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(620px circle at 12% -10%, rgba(16, 245, 160, 0.1), transparent 60%),
    radial-gradient(560px circle at 88% -8%, rgba(34, 211, 238, 0.1), transparent 60%);
}

.page, main, .in {
  position: relative;
  z-index: 1;
}

/* Unified OneFeedAPI Dark Header injected into legacy pages */
.of-legacy-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 8, 13, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.of-legacy-nav-in {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.of-legacy-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 16.5px;
  color: #f8fafc !important;
  letter-spacing: -0.03em;
}

.of-legacy-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16, 245, 160, 0.2), rgba(34, 211, 238, 0.14));
  border: 1px solid rgba(16, 245, 160, 0.42);
  display: grid;
  place-items: center;
}

.of-legacy-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.of-legacy-links a {
  font-size: 14px;
  color: #cbd5e1 !important;
  padding: 6px 11px;
  border-radius: 8px;
}

.of-legacy-links a:hover {
  color: #10f5a0 !important;
  background: rgba(255, 255, 255, 0.06);
}

.of-legacy-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  background: linear-gradient(135deg, #10f5a0, #22d3ee) !important;
  color: #04130d !important;
}

/* Primary Buttons in legacy pages */
.btn.pri, .btn.sm, .btn.blue, .btn.md.blue, button[type="submit"], .t-go, .go, .run, .try-btn {
  background: linear-gradient(135deg, #10f5a0, #22d3ee) !important;
  color: #04130d !important;
  font-weight: 650 !important;
  border: 0 !important;
}

.btn.sec2, .btn.ghost {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

/* Fix /zh/tools/ active country pill (US) & public status badges */
.ccs a {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.ccs a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

.ccs a.on {
  background: linear-gradient(135deg, #10f5a0, #22d3ee) !important;
  color: #04130d !important;
  font-weight: 650 !important;
  border-color: transparent !important;
}

.tag, .tag.ok, .tag.free, .badge {
  background: rgba(16, 245, 160, 0.14) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 245, 160, 0.3) !important;
}

/* Mobile horizontal scroll for docs sub-nav bars */
.dnav, .subnav, .docs-tabs, .tabs {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  scrollbar-width: none;
}

/* Mobile drawer for legacy header (zero-JS <details>) */
.of-legacy-mob {
  display: none;
}

.of-legacy-mob summary {
  list-style: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #f8fafc;
}

.of-legacy-mob summary::-webkit-details-marker { display: none; }

.of-legacy-mob-panel {
  position: fixed;
  top: 64px;
  left: 12px;
  right: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(11, 15, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: grid;
  gap: 4px;
  z-index: 70;
}

.of-legacy-mob-panel a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: #cbd5e1 !important;
}

.of-legacy-mob-panel a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #10f5a0 !important;
}

/* Platform Tiles glow cleanly on dark */
.tile {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 14px -4px rgba(16, 245, 160, 0.35);
}

.p-tiktok, .p-douyin, .p-x, .p-threads {
  background: #141a26 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 0 12px -4px rgba(34, 211, 238, 0.45) !important;
}

/* Tables, Code Blocks, Inputs, Cards & Hardcoded Light Blocks */
pre, code, .code {
  background: #05070c !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

input, select, textarea {
  background: #0b0f18 !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

table, thead, tbody, tr, th, td,
.card, .panel, .box, details, .pr-row, .toc, .callout, .note, .tip, .board, .tool-card {
  background-color: #0d1320 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  color: #e2e8f0 !important;
}

th, thead tr {
  background-color: #111827 !important;
  color: #94a3b8 !important;
}

mark {
  background: rgba(16, 245, 160, 0.18) !important;
  color: #10f5a0 !important;
}

/* Unified OneFeedAPI Dark Footer injected into all 2,000+ legacy pages */
.of-legacy-foot {
  margin-top: 84px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #06080d;
  padding: 44px 0 32px;
  color: #94a3b8;
  font-size: 13.5px;
}

.of-legacy-foot-in {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.of-legacy-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.of-legacy-foot-links a {
  color: #cbd5e1 !important;
}

.of-legacy-foot-links a:hover {
  color: #10f5a0 !important;
}

@media (max-width: 760px) {
  .of-legacy-links { display: none; }
  .of-legacy-mob { display: block; }
  .of-legacy-nav-in, .of-legacy-foot-in { padding: 0 16px; }
}
