/*
Theme Name: BaoYuBot Blog
Author: BaoYuBot
Version: 1.1.0
Text Domain: baoyubot-blog
*/
:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #fbfaf6;
  --ink: #202124;
  --muted: #666d75;
  --line: #ded9cf;
  --brand: #0b6f70;
  --brand-strong: #084f50;
  --accent: #d95f3d;
  --violet: #6457a6;
  --gold: #b38318;
  --pro-ink: #101820;
  --pro-panel: #111c22;
  --pro-line: rgba(182, 205, 196, 0.22);
  --pro-green: #65d6ad;
  --pro-blue: #70b8ff;
  --shadow: 0 18px 50px rgba(32, 33, 36, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.baoyubot-blog-shell {
  min-height: 100vh;
  margin: 0;
  color: #eaf3ef;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(18, 117, 101, 0.44), transparent 28rem),
    radial-gradient(circle at 12% 14%, rgba(42, 98, 128, 0.22), transparent 26rem),
    linear-gradient(135deg, #061116 0%, #0d2025 48%, #10291f 100%);
  background-attachment: fixed;
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
}

a { color: inherit; }

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.wrap {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(182, 205, 196, 0.18);
  background: rgba(6, 17, 22, 0.86);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.site-brand { color: #f5fbf8; }
.footer-brand { width: fit-content; color: #f5fbf8; }

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--brand);
  box-shadow: 0 8px 22px rgba(11, 111, 112, 0.24);
}

.brand-image-mark {
  overflow: hidden;
  background: rgba(11, 111, 112, 0.96);
}

.brand-image-mark img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.primary-nav a,
.nav-dropdown-trigger,
.header-link,
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 11px;
  color: rgba(234, 243, 239, 0.78);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  appearance: none;
}

.primary-nav a:hover,
.nav-dropdown-trigger:hover,
.nav-dropdown:focus-within .nav-dropdown-trigger,
.nav-dropdown:hover .nav-dropdown-trigger,
.header-link:hover {
  color: var(--pro-green);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown:hover .chevron,
.nav-dropdown:focus-within .chevron { transform: rotate(180deg); }

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
  width: min(560px, calc(100vw - 40px));
  border: 1px solid rgba(101, 214, 173, 0.2);
  border-radius: 12px;
  padding: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    rgba(6, 17, 22, 0.96);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-dropdown-panel::before {
  position: absolute;
  top: -9px;
  left: calc(50% - 9px);
  width: 16px;
  height: 16px;
  border-top: 1px solid rgba(101, 214, 173, 0.2);
  border-left: 1px solid rgba(101, 214, 173, 0.2);
  background: rgba(6, 17, 22, 0.96);
  content: "";
  transform: rotate(45deg);
}

.primary-nav .nav-dropdown-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon text";
  gap: 2px 10px;
  min-height: 78px;
  border: 1px solid rgba(182, 205, 196, 0.13);
  border-radius: 10px;
  padding: 13px;
  color: #eaf3ef;
  background: rgba(255, 255, 255, 0.045);
  white-space: normal;
}

.primary-nav .nav-dropdown-item:hover {
  border-color: rgba(101, 214, 173, 0.44);
  color: #f5fbf8;
  background: rgba(101, 214, 173, 0.1);
}

.nav-icon {
  display: grid;
  grid-area: icon;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--pro-green);
  background: rgba(101, 214, 173, 0.1);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-dropdown-item strong { grid-area: title; font-size: 14px; }
.nav-dropdown-item em { grid-area: text; color: rgba(234, 243, 239, 0.58); font-size: 12px; font-style: normal; line-height: 1.45; }

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.header-link { border: 1px solid rgba(182, 205, 196, 0.16); }

.header-cta {
  color: #041514;
  background: var(--pro-green);
  box-shadow: 0 12px 28px rgba(101, 214, 173, 0.18);
}

.header-cta:hover { color: #041514; background: #8be8c6; }

.blog-hero {
  border-bottom: 1px solid rgba(182, 205, 196, 0.16);
  padding: 74px 0 42px;
}

.blog-hero-inner { max-width: 980px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--pro-green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-hero h1,
.article-detail h1,
.empty-state h1 {
  max-width: 940px;
  margin: 0;
  color: #f5fbf8;
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.blog-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(234, 243, 239, 0.72);
  font-size: 18px;
  line-height: 1.72;
}

.blog-main { padding: 34px 0 64px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.post-card,
.article-detail,
.empty-state {
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045)),
    rgba(8, 17, 22, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.post-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 20px;
}

.post-card h2 {
  margin: 12px 0 10px;
  color: #f5fbf8;
  font-size: 22px;
  line-height: 1.28;
}

.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { color: var(--pro-green); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(234, 243, 239, 0.68);
  font-size: 13px;
}

.meta span,
.meta time,
.meta a {
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(234, 243, 239, 0.72);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.meta a:hover { color: var(--pro-green); }

.excerpt {
  margin: 0 0 16px;
  color: rgba(234, 243, 239, 0.68);
  line-height: 1.7;
}

.read,
.back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--pro-green);
  font-weight: 900;
  text-decoration: none;
}

.read:hover,
.back-link:hover { color: #8be8c6; }

.pagination {
  display: flex;
  gap: 12px;
  padding: 26px 0 0;
}

.pagination a {
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--pro-green);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 900;
  text-decoration: none;
}

.article-shell {
  max-width: 960px;
  padding: 36px 24px 72px;
}

.back-link { margin-bottom: 18px; }

.article-detail { padding: clamp(24px, 5vw, 48px); }

.article-detail h1 {
  margin: 16px 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
}

.lead {
  margin: 0 0 26px;
  border-bottom: 1px solid rgba(182, 205, 196, 0.16);
  padding-bottom: 24px;
  color: rgba(234, 243, 239, 0.72);
  font-size: 18px;
  line-height: 1.76;
}

.content {
  color: rgba(234, 243, 239, 0.82);
  font-size: 16px;
}

.content h2,
.content h3,
.content h4 {
  color: #f5fbf8;
  line-height: 1.32;
}

.content h2 { margin: 38px 0 12px; font-size: 28px; }
.content h3 { margin: 28px 0 10px; font-size: 21px; }
.content p, .content li { font-size: 16px; }
.content a { color: var(--pro-green); }
.content a:hover { color: #8be8c6; }
.content blockquote {
  margin: 24px 0;
  border-left: 3px solid var(--pro-green);
  padding: 12px 18px;
  color: rgba(234, 243, 239, 0.78);
  background: rgba(101, 214, 173, 0.08);
}
.content pre {
  overflow: auto;
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 8px;
  padding: 16px;
  color: #e2e8f0;
  background: rgba(3, 9, 12, 0.92);
}
.content code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  overflow: hidden;
  border-radius: 8px;
}
.content th,
.content td {
  border: 1px solid rgba(182, 205, 196, 0.18);
  padding: 10px;
}
.content th { color: #f5fbf8; background: rgba(101, 214, 173, 0.08); }
.content img { max-width: 100%; height: auto; border-radius: 8px; }

.seo-geo-compare,
.article-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.compare-card,
.article-compare-card {
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.empty-state { margin: 40px 0; padding: 32px; color: rgba(234, 243, 239, 0.72); }
.empty-state h1 { margin: 8px 0 12px; font-size: clamp(30px, 4vw, 48px); }

.modern-footer {
  border-top: 1px solid rgba(182, 205, 196, 0.18);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(6, 17, 22, 0.92);
  background-size: 34px 34px, 34px 34px, auto;
}

.modern-footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(4, minmax(140px, 1fr));
  gap: 28px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 24px 24px;
}

.footer-about p {
  max-width: 420px;
  margin: 12px 0 0;
  color: rgba(234, 243, 239, 0.66);
  line-height: 1.65;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column strong { color: #f5fbf8; font-size: 15px; }
.footer-column a {
  color: rgba(234, 243, 239, 0.66);
  font-size: 14px;
  text-decoration: none;
}
.footer-column a:hover { color: var(--pro-green); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1220px;
  margin: 0 auto;
  border-top: 1px solid rgba(182, 205, 196, 0.14);
  padding: 14px 24px 22px;
  color: rgba(234, 243, 239, 0.5);
  font-size: 13px;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}
.footer-legal-links a { color: inherit; text-decoration: none; }
.footer-legal-links a:hover { color: var(--pro-green); }

@media (max-width: 980px) {
  .site-header-inner { grid-template-columns: 1fr; gap: 12px; }
  .primary-nav { justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .header-actions { justify-content: flex-start; }
  .modern-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, 1220px); }
  .site-header-inner { padding: 12px 16px; }
  .primary-nav { justify-content: flex-start; }
  .nav-dropdown-panel { left: 0; grid-template-columns: 1fr; width: min(320px, calc(100vw - 32px)); transform: translate(0, 8px); }
  .nav-dropdown:hover .nav-dropdown-panel,
  .nav-dropdown:focus-within .nav-dropdown-panel { transform: translate(0, 0); }
  .nav-dropdown-panel::before { left: 24px; }
  .header-actions { flex-wrap: wrap; }
  .blog-hero { padding: 44px 0 30px; }
  .blog-hero h1,
  .article-detail h1 { line-height: 1.08; }
  .post-grid { grid-template-columns: 1fr; }
  .article-shell { padding: 28px 16px 52px; }
  .article-detail { padding: 22px 18px; }
  .modern-footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; }
  .footer-legal-links { justify-content: flex-start; }
}

.compact-footer .compact-footer-bottom {
  align-items: center;
  min-height: 74px;
}
.compact-footer a {
  color: rgba(234, 243, 239, 0.72);
  text-decoration: none;
}
.compact-footer a:hover {
  color: var(--pro-green);
}
.site-foot {
  border-top: 1px solid rgba(182, 205, 196, 0.18);
  background: rgba(6, 17, 22, 0.92);
}
.site-foot .wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 22px 24px;
  color: rgba(234, 243, 239, 0.66);
  font-size: 14px;
}
.site-foot a {
  color: rgba(234, 243, 239, 0.72);
  text-decoration: none;
}
.site-foot a:hover {
  color: var(--pro-green);
}


.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 2px 0 8px;
}
.topic-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(234, 243, 239, 0.76);
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}
.topic-tab:hover {
  border-color: rgba(101, 214, 173, 0.42);
  color: var(--pro-green);
  background: rgba(101, 214, 173, 0.1);
}
.topic-tab.is-active {
  border-color: rgba(101, 214, 173, 0.8);
  color: #041514;
  background: var(--pro-green);
  box-shadow: 0 12px 28px rgba(101, 214, 173, 0.16);
}
.topic-tab span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  padding: 0 6px;
  color: rgba(234, 243, 239, 0.76);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}
.topic-tab.is-active span {
  color: #041514;
  background: rgba(4, 21, 20, 0.1);
}
@media (max-width: 720px) {
  .topic-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .topic-tab {
    flex: 0 0 auto;
  }
}


.post-adjacent-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.post-adjacent-card {
  display: grid;
  align-content: start;
  min-height: 132px;
  border: 1px solid rgba(182, 205, 196, 0.18);
  border-radius: 8px;
  padding: 18px;
  color: #f5fbf8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045)),
    rgba(8, 17, 22, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
  text-decoration: none;
}
.post-adjacent-card:hover {
  border-color: rgba(101, 214, 173, 0.44);
  background:
    linear-gradient(180deg, rgba(101, 214, 173, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(8, 17, 22, 0.86);
}
.post-adjacent-card span {
  color: var(--pro-green);
  font-size: 13px;
  font-weight: 900;
}
.post-adjacent-card strong {
  margin-top: 8px;
  color: #f5fbf8;
  font-size: 18px;
  line-height: 1.42;
}
.post-adjacent-card.next {
  text-align: right;
}
.post-adjacent-card.is-empty {
  visibility: hidden;
}
@media (max-width: 720px) {
  .post-adjacent-nav {
    grid-template-columns: 1fr;
  }
  .post-adjacent-card.next {
    text-align: left;
  }
  .post-adjacent-card.is-empty {
    display: none;
  }
}


.number-pagination {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 34px 0 0;
}
.number-pagination .page-numbers {
  display: inline-flex;
  min-width: 42px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(182, 205, 196, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(234, 243, 239, 0.82);
  background: rgba(255, 255, 255, 0.045);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}
.number-pagination a.page-numbers:hover {
  border-color: rgba(101, 214, 173, 0.5);
  color: var(--pro-green);
  background: rgba(101, 214, 173, 0.1);
}
.number-pagination .page-numbers.current {
  border-color: #65d6adcc;
  color: #041514;
  background: #65d6adcc;
}
.number-pagination .page-numbers.dots {
  min-width: 34px;
  border-color: transparent;
  color: rgba(234, 243, 239, 0.58);
  background: transparent;
}


.blog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  gap: 14px 24px;
  align-items: start;
  margin: 0 0 24px;
}
.blog-toolbar .topic-tabs {
  margin: 0;
}
.blog-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  justify-self: end;
  width: 100%;
}
.blog-search input[type="search"] {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(182, 205, 196, 0.2);
  border-radius: 999px;
  padding: 0 15px;
  color: #f5fbf8;
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}
.blog-search input[type="search"]::placeholder {
  color: rgba(234, 243, 239, 0.46);
}
.blog-search input[type="search"]:focus {
  border-color: rgba(101, 214, 173, 0.7);
  box-shadow: 0 0 0 3px rgba(101, 214, 173, 0.12);
}
.blog-search button {
  min-height: 42px;
  border: 1px solid rgba(101, 214, 173, 0.74);
  border-radius: 999px;
  padding: 0 16px;
  color: #041514;
  background: #65d6adcc;
  font-weight: 900;
}
.blog-search button:hover {
  background: var(--pro-green);
}
.search-summary {
  margin: 0 0 18px;
  color: rgba(234, 243, 239, 0.72);
  font-weight: 800;
}
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .blog-toolbar {
    grid-template-columns: 1fr;
  }
  .blog-search {
    justify-self: stretch;
  }
}
@media (max-width: 520px) {
  .blog-search {
    grid-template-columns: 1fr;
  }
  .blog-search button {
    width: fit-content;
  }
}
