/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --max-width: 1200px;
  --header-height: 60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; width: 100%; }

/* ===== Header ===== */
.site-header { background: var(--card-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; min-height: var(--header-height); }
.header-inner { display: flex; align-items: center; min-height: var(--header-height); gap: 6px 24px; flex-wrap: wrap; padding: 6px 0; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.logo:hover { color: var(--primary); }
.logo-icon { font-size: 1.4rem; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-link { padding: 6px 12px; border-radius: 6px; font-size: 0.875rem; color: var(--text-secondary); white-space: nowrap; transition: all 0.2s; }
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: #eff6ff; color: var(--primary); font-weight: 500; }
.nav-lang { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.nav-lang-sep { color: var(--text-secondary); font-size: 12px; }
.nav-lang-link { padding-left: 4px !important; padding-right: 4px !important; font-size: 0.875rem; }

.header-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-login-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  border: 1px solid var(--primary);
  transition: all 0.2s;
  white-space: nowrap;
}
.header-login-btn:hover { background: var(--primary); color: #fff; }
.header-user-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text);
  transition: background 0.2s;
  white-space: nowrap;
}
.header-user-link:hover { background: var(--bg); }
.header-user-avatar { font-size: 1rem; }
.header-user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; }

/* ===== Header Tool Search ===== */
.header-search { position: relative; margin-left: auto; }
.header-search-input { width: 200px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 0.85rem; outline: none; background: var(--bg); transition: all 0.25s; }
.header-search-input:focus { width: 260px; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.header-search-results { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 360px; max-height: 400px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); z-index: 200; }
.header-search-results.show { display: block; }
.hsr-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--text); transition: background 0.15s; }
.hsr-item:hover, .hsr-item.active { background: #f1f5f9; }
.hsr-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.hsr-text { display: flex; flex-direction: column; min-width: 0; }
.hsr-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsr-desc { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.hsr-empty { padding: 16px; text-align: center; font-size: 0.85rem; color: var(--text-secondary); }
@media (max-width: 768px) { .header-search { display: none; } }

/* ===== Hero / Search ===== */
.hero { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); padding: 48px 0; text-align: center; }
.hero h1 { color: #fff; font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1rem; margin-bottom: 24px; }
.hero-download { margin: -8px 0 20px; font-size: 0.95rem; }
.hero-download a { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.hero-download a:hover { color: #dbeafe; }
.hero-download-sep { margin: 0 10px; color: rgba(255,255,255,0.55); }
.search-box { max-width: 560px; margin: 0 auto; position: relative; }
.search-box input { width: 100%; padding: 14px 48px 14px 20px; border: none; border-radius: 50px; font-size: 1rem; outline: none; box-shadow: var(--shadow-md); }
.search-box button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--primary); color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; transition: background 0.2s; }
.search-box button:hover { background: var(--primary-hover); }

/* ===== Category Filter ===== */
.category-bar { display: flex; gap: 8px; padding: 20px 0 8px; flex-wrap: wrap; }
.cat-chip { padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; background: var(--card-bg); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all 0.2s; text-decoration: none; }
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Tool Cards ===== */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 20px 0 40px; }
.tool-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all 0.2s; display: flex; flex-direction: column; text-decoration: none; color: var(--text); position: relative; }
.tool-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-2px); color: var(--text); }
.tool-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tool-card-icon { width: 42px; height: 42px; border-radius: 10px; background: #eff6ff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.tool-card-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.tool-card-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card-action { margin-top: 14px; font-size: 0.85rem; font-weight: 500; color: var(--primary); }
.tool-card--promo { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, var(--card-bg) 48%); }
.tool-card--promo:hover { border-color: #f59e0b; }
.tool-card-promo-img {
  margin: -20px -20px 12px;
  max-height: 120px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tool-card-promo-img img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.tool-card-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 600; color: #92400e;
  background: #fef3c7; padding: 2px 8px; border-radius: 999px;
}
.tool-card--promo .tool-card-icon { background: #fef3c7; }
.tool-card--model { border-color: #bae6fd; background: linear-gradient(180deg, #f0f9ff 0%, var(--card-bg) 48%); }
.tool-card--model:hover { border-color: #0ea5e9; }
.tool-card--model .tool-card-badge { color: #075985; background: #e0f2fe; }
.tool-card--model .tool-card-icon { background: #e0f2fe; }
.tool-card-meta { font-size: 0.75rem; color: var(--text-secondary); margin: -4px 0 8px; }
.tool-card--tbk { padding-top: 12px; }
.tool-card--tbk .tool-card-tbk-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}
.tool-card--tbk .tool-card-tbk-cover {
  width: 88px;
  height: 88px;
  margin: 0;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 10px;
  flex-shrink: 0;
}
.tool-card--tbk .tool-card-tbk-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tool-card--tbk .tool-card-tbk-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tool-card--tbk .tool-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  font-size: 0.95rem;
}
.tool-card--tbk .tool-card-badge {
  position: static;
  color: #9a3412;
  background: #ffedd5;
}
.tool-card--tbk .tool-card-meta {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #c2410c;
}
.tool-card--tbk .tool-card-tbk-footer {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tool-card--tbk .tool-card-tbk-footer .tool-card-action { margin-top: 0; }
.tool-card-tags { font-size: 0.72rem; color: #0369a1; margin-top: 6px; }
.promo-article-body { line-height: 1.75; font-size: 0.95rem; }
.promo-article-body img { max-width: 100%; height: auto; }
.promo-article-body h1, .promo-article-body h2, .promo-article-body h3 { margin: 1em 0 0.5em; }
.promo-article-body p { margin: 0.75em 0; }
.promo-article-body ul, .promo-article-body ol { padding-left: 1.4em; margin: 0.75em 0; }

/* ===== Tool Page ===== */
.tool-page { padding: 32px 0 60px; flex: 1; }
.tool-page-header { margin-bottom: 24px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.tool-page-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.tool-page-header p { color: var(--text-secondary); font-size: 0.95rem; }
.tool-body { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

/* ===== Tool UI Components ===== */
.tool-textarea { width: 100%; min-height: 180px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; font-size: 0.875rem; line-height: 1.6; resize: vertical; outline: none; transition: border-color 0.2s; }
.tool-textarea:focus { border-color: var(--primary); }
.tool-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.tool-input:focus { border-color: var(--primary); }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-group { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.tool-output { width: 100%; min-height: 180px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; font-size: 0.875rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; overflow-y: auto; }
.tool-label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool-select { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; outline: none; background: #fff; cursor: pointer; }
.copy-btn { position: relative; }
.copy-btn.copied::after { content: "Copied!"; position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: #10b981; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; }

/* ===== Related Tools ===== */
.related-section { margin-top: 24px; }
.related-section h2 { font-size: 1.1rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.related-item { padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; font-size: 0.875rem; color: var(--text); transition: all 0.2s; display: block; }
.related-item:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Tool report ===== */
.tool-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding: 14px 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
}
.tool-report-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e3a8a;
}
.tool-report-trigger {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.tool-report-trigger:hover {
  background: var(--primary-hover);
}

/* ===== Footer ===== */
.site-footer { background: var(--card-bg); border-top: 1px solid var(--border); margin-top: auto; padding: 40px 0 20px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.nav-link-external { color: var(--text-secondary); }
.nav-link-external:hover { color: var(--primary); }
.footer-brand { font-weight: 600; font-size: 1.1rem; }
.footer-desc { font-size: 0.85rem; color: var(--text-secondary); font-weight: 400; margin-top: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { font-size: 0.9rem; margin-bottom: 4px; }
.footer-links a { font-size: 0.85rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; text-align: center; font-size: 0.8rem; color: var(--text-secondary); }
.footer-company { margin-bottom: 6px; font-size: 0.8rem; color: var(--text-secondary); }
.footer-beian { margin-top: 6px; font-size: 0.78rem; }
.footer-beian a { color: var(--text-secondary); text-decoration: none; }
.footer-beian a:hover { color: var(--primary); text-decoration: underline; }

.footer-recent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  min-height: 40px;
}
.footer-recent-label {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.footer-recent-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  min-height: 1.6em;
}
.footer-recent-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  opacity: 1;
  transition: opacity 0.35s ease;
}
.footer-recent-track.is-fading {
  opacity: 0;
}
.footer-recent-link {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.footer-recent-link:hover {
  color: var(--primary);
}
.footer-recent-link.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  .footer-recent {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== 404 ===== */
.error-page { text-align: center; padding: 80px 20px; flex: 1; }
.error-page h1 { font-size: 4rem; color: var(--primary); }
.error-page p { color: var(--text-secondary); margin: 12px 0 24px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--card-bg); border-bottom: 1px solid var(--border); padding: 12px 20px; box-shadow: var(--shadow-md); }
  .hero { padding: 32px 0; }
  .hero h1 { font-size: 1.35rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}

/* ===== First-party promo rail / spot ===== */
.tb-spot {
  position: relative;
  margin: 28px auto;
  text-align: center;
}
.tb-spot-a {
  display: inline-block;
  max-width: 900px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.tb-spot-a:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.tb-spot-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.tb-spot-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0.85;
}

.tb-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  z-index: 900;
  display: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  background: #fff;
}
.tb-rail-left { left: 14px; }
.tb-rail-right { right: 14px; }
.tb-rail-a { display: block; }
.tb-rail-img { width: 100%; height: auto; display: block; }
.tb-rail-mark {
  position: absolute;
  bottom: 4px;
  left: 6px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0.85;
}
.tb-rail-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-rail-x:hover { background: rgba(0,0,0,0.75); }
@media (min-width: 1200px) {
  .tb-rail { display: block; }
}
@media (min-width: 1520px) {
  .tb-rail { width: 180px; }
}
@media (min-width: 1700px) {
  .tb-rail { width: 240px; }
}
@media (min-width: 1920px) {
  .tb-rail { width: 320px; }
}
@media (min-width: 2400px) {
  .tb-rail { width: 400px; }
}
@media (min-width: 3000px) {
  .tb-rail { width: 480px; }
}

/* ===== Feedback Widget ===== */
.feedback-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feedback-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,99,235,0.45);
}
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.feedback-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  animation: fbSlideUp 0.25s ease;
}
@keyframes fbSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.feedback-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
.feedback-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.feedback-close:hover { color: var(--text); }
.feedback-field {
  margin-bottom: 14px;
  position: relative;
}
.feedback-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text);
}
.feedback-field select,
.feedback-field textarea,
.feedback-field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.feedback-field select:focus,
.feedback-field textarea:focus,
.feedback-field input:focus {
  outline: none;
  border-color: var(--primary);
}
.feedback-field textarea { resize: vertical; min-height: 90px; }
.feedback-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.feedback-submit {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.feedback-submit:hover { background: var(--primary-hover); }
.feedback-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.feedback-msg {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 1.2em;
}
@media (max-width: 480px) {
  .feedback-fab { bottom: 20px; right: 20px; width: 46px; height: 46px; font-size: 1.2rem; }
  .feedback-modal { padding: 18px; }
}

/* ===== API Usage Section (tool pages) ===== */
.api-usage-section { margin: 32px auto 0; }
.api-usage-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.api-usage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.api-usage-header:hover { background: var(--bg); }
.api-usage-header h3 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.api-usage-arrow { font-size: 1rem; color: var(--text-secondary); transition: transform 0.2s; }
.api-usage-body { padding: 0 20px 20px; }
.api-usage-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 14px; }
.api-usage-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.api-usage-endpoint code { font-size: 0.875rem; font-family: 'SF Mono', 'Fira Code', monospace; color: var(--text); }
.api-method {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
}
.api-usage-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.api-tab {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}
.api-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.api-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }
.api-tab-panel pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0;
}
.api-tab-panel pre code { background: none; padding: 0; color: inherit; font-family: 'SF Mono', 'Fira Code', monospace; }
.api-try-form { display: flex; flex-direction: column; gap: 10px; }
.api-try-row { display: flex; flex-direction: column; gap: 4px; }
.api-try-row label { font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
.api-try-row input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--bg);
  color: var(--text);
}
.api-try-row input:focus { outline: none; border-color: var(--primary); }
.api-try-btn {
  align-self: flex-start;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.api-try-btn:hover { background: var(--primary-hover); }
.api-try-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.api-try-result {
  background: #1e293b;
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 4px;
}
.api-try-result.success { border-left: 3px solid #22c55e; }
.api-try-result.error { border-left: 3px solid #ef4444; }
.api-usage-note { font-size: 0.8rem; color: var(--text-secondary); margin-top: 14px; }
.api-usage-note code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-size: 0.75rem; }
.api-usage-note a { color: var(--primary); }
.api-options-doc { margin-top: 16px; }
.api-options-doc h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.api-options-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.api-options-table th, .api-options-table td { padding: 6px 10px; border: 1px solid var(--border); text-align: left; }
.api-options-table th { background: var(--bg); font-weight: 600; color: var(--text-secondary); }
.api-options-table td code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-size: 0.75rem; }
.api-opts-hint { font-size: 0.8rem; color: var(--text-secondary); margin-top: 8px; }

/* ===== SEO / GEO 语义化内容 ===== */
.seo-content-section {
  margin: 40px auto;
  max-width: var(--max-width);
}
.seo-article {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.seo-article h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.seo-article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text);
}
.seo-article p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.seo-article a { color: var(--primary); }

/* FAQ 折叠面板 */
.seo-faq {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.seo-faq h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.seo-faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.seo-faq-item:last-child { border-bottom: none; }
.seo-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: color 0.2s;
  user-select: none;
}
.seo-faq-q:hover { color: var(--primary); }
.seo-faq-arrow {
  font-size: 0.8rem;
  transition: transform 0.2s;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 12px;
}
.seo-faq-item.open .seo-faq-arrow { transform: rotate(90deg); }
.seo-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 0;
}
.seo-faq-item.open .seo-faq-a {
  max-height: 400px;
  padding: 0 0 14px 0;
}
.seo-faq-a p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* 相关工具推荐 */
.seo-related {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.seo-related h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.seo-related-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.seo-related-list li a {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s;
  border: 1px solid var(--border);
}
.seo-related-list li a:hover {
  background: #eff6ff;
  color: var(--primary);
  border-color: var(--primary);
}

/* ---- 联系我们 ---- */
.contact-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  text-align: center;
}
.contact-title {
  font-size: 1.75rem;
  margin-bottom: 8px;
}
.contact-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
}
.contact-qr {
  margin-bottom: 28px;
}
.contact-qr img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.contact-qr-hint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-item:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
  text-decoration: none;
  color: var(--text);
}
.contact-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.contact-item-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.contact-item-value {
  font-size: 0.95rem;
  word-break: break-all;
}
.contact-empty {
  color: var(--text-secondary);
  padding: 48px 0;
}
