/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #1e3a5f;
  --primary-light: #2d5a8a;
  --accent: #2e75b6;
  --border: #e2e8f0;
  --shadow: 0 4px 20px -4px rgba(30, 58, 95, 0.08);
  --shadow-hover: 0 8px 30px -4px rgba(30, 58, 95, 0.15);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* 修复 WordPress admin bar 导致的顶部偏移 */
body.admin-bar .header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography - 全站字体大小统一 */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}

span {
  font-size: inherit;
}

small {
  font-size: 0.875rem;
}

/* 移动端字体调整 */
@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
  
  h4 {
    font-size: 1rem;
  }
  
  p {
    font-size: 0.9375rem;
  }
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.logo-text {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

/* Navigation */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg);
}

.nav-link svg {
  opacity: 0.7;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  display: none;
}

@media (min-width: 768px) {
  .search-box {
    display: block;
  }
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 200px;
  padding: 10px 12px 10px 40px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  border: none;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

@media (min-width: 1024px) {
  .search-input {
    width: 240px;
  }
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s;
}

.menu-toggle:hover {
  background: var(--bg);
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Menu */
.nav-mobile {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}

.nav-mobile.open {
  display: block;
}

@media (min-width: 1024px) {
  .nav-mobile {
    display: none !important;
  }
}

.search-box-mobile {
  position: relative;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .search-box-mobile {
    display: none;
  }
}

.search-box-mobile .search-input {
  width: 100%;
}

.nav-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Main Layout */
.main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (min-width: 1024px) {
  .main {
    flex-direction: row;
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

.sidebar {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1024px) {
  .sidebar {
    order: 1;
    width: 225px;
    flex-shrink: 0;
    position: sticky;
    top: 88px;
    height: fit-content;
  }
}

.content {
  order: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1024px) {
  .content {
    order: 2;
  }
}

/* Right Sidebar */
.sidebar-right {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1200px) {
  .sidebar-right {
    width: 225px;
    flex-shrink: 0;
    position: sticky;
    top: 88px;
    height: fit-content;
  }
}

@media (max-width: 1199px) {
  .sidebar-right {
    display: none;
  }
}

/* Contact Card in Right Sidebar */
.contact-card .contact-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.contact-card .contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.contact-card .contact-item svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.contact-card .contact-item a {
  color: #64748b;
  text-decoration: none;
}

.contact-card .contact-item a:hover {
  color: #2e75b6;
}

/* Business Card in Right Sidebar */
.business-card .business-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.business-item {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.business-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.business-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem;
}

.business-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-header svg {
  color: var(--accent);
}

/* Announcement Card */
.announcement-card p {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
}

.announcement-item-border {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--border);
}

.announcement-card .hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.code-box code {
  flex: 1;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  color: var(--accent);
  overflow-x: auto;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--accent);
  color: white;
}

/* Sidebar Subcategories */
.sidebar-subcategories {
  margin-bottom: 20px;
}

.sidebar-subcat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-subcat-item {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}

.sidebar-subcat-item:last-child {
  border-bottom: none;
}

.sidebar-subcat-item:hover {
  color: var(--accent);
}

/* Author Card */
.author-card {
  text-align: center;
}

.author-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--bg-card);
}

.author-avatar-img {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--bg-card);
  display: block;
}

.author-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-bio {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.author-bio .accent {
  color: var(--accent);
}

.author-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.author-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-primary {
  width: 100%;
  padding: 7px 30px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #e63e36;
  transform: translateY(-1px);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--accent);
  color: white;
}

/* Tag Cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.tag.accent {
  color: var(--accent);
}

.tag-sm { font-size: 12px; }
.tag-md { font-size: 14px; }
.tag-lg { font-size: 16px; font-weight: 500; }
.tag-xl { font-size: 18px; font-weight: 600; }

/* Hero Slider */
.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.slider-slides {
  position: relative;
  height: 280px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .slider-slides {
    height: 350px;
  }
}

.slider-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.slider-slide.active {
  opacity: 1;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  pointer-events: none;
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  animation: slideUp 0.6s ease;
  pointer-events: none;
}

@media (min-width: 768px) {
  .slide-content {
    padding: 32px;
  }
}

.slide-category {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 12px;
}

.slide-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .slide-title {
    font-size: 32px;
  }
}

.slide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.slide-meta svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.temperature {
  color: var(--accent);
  font-weight: 600;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hero-slider:hover .slider-btn {
  opacity: 1;
}

.slider-btn:hover {
  background: rgba(255,255,255,0.4);
}

.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.dot.active {
  width: 24px;
  background: white;
}

.dot:hover {
  background: rgba(255,255,255,0.8);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-card {
  position: relative;
  height: 112px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

@media (min-width: 768px) {
  .category-card {
    height: 128px;
  }
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
  transition: background 0.3s;
}

.category-card:hover .category-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-title {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

/* Announcement Bar */
.announcement-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.announcement-bar svg {
  color: var(--accent);
  flex-shrink: 0;
}

.announcement-bar p {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Blog Posts */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
}

@media (min-width: 768px) {
  .post-card {
    flex-direction: row;
    gap: 20px;
  }
}

.post-image {
  flex-shrink: 0;
  width: 100%;
  height: 128px;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .post-image {
    width: 176px;
    height: 128px;
    margin-bottom: 0;
  }
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.post-content > * {
  margin-left: 0;
  padding-left: 0;
}

.post-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
  padding: 0;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-title a {
  color: inherit;
  text-decoration: none;
}

.post-card:hover .post-title {
  color: var(--accent);
}

.post-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.post-meta svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag {
  padding: 4px 10px;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}

.post-tag:hover {
  background: var(--accent);
  color: white;
}

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
  text-align: center;
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer p:last-child {
  margin-bottom: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo text hide on mobile */
@media (max-width: 640px) {
  .logo-text {
    display: none;
  }
}

/* ========================================
   Article Info Card (Sidebar)
   ======================================== */
.article-info-card {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
  overflow: hidden;
}

.article-info-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.article-info-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
}

.article-info-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.article-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-info-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.article-info-item svg {
  opacity: 0.8;
}

.article-info-temp {
  color: var(--accent);
}

.article-info-temp svg {
  stroke: var(--accent);
}

.article-info-title {
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Fixed Directory Navigation */
.fixed-directory-nav {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
  overflow: hidden;
}

.directory-nav-header {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.directory-nav-list {
  display: flex;
  flex-direction: column;
  max-height: 400px;
  overflow-y: auto;
}

.directory-nav-item {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.directory-nav-item:hover {
  background: rgba(46, 117, 182, 0.08);
  color: #2e75b6;
  border-left-color: #2e75b6;
}

.directory-nav-item.active {
  background: rgba(46, 117, 182, 0.08);
  color: #2e75b6;
  border-left-color: #2e75b6;
  font-weight: 500;
}

.directory-nav-list::-webkit-scrollbar {
  width: 4px;
}

.directory-nav-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.directory-nav-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.directory-nav-list::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* TOC Navigation Links */
.toc-nav-link {
  display: block;
  color: #64748b;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-nav-link:hover {
  color: #2e75b6;
  background: rgba(46, 117, 182, 0.08);
  border-left-color: #2e75b6;
}

.toc-nav-link.active {
  color: #2e75b6;
  background: rgba(46, 117, 182, 0.08);
  border-left-color: #2e75b6;
  font-weight: 500;
}

/* Hide on smaller screens */
@media (max-width: 1400px) {
  .fixed-directory-nav {
    display: none;
  }
}

/* Article Banner */
.article-banner {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.article-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.article-banner-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.article-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.article-banner-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

@media (max-width: 768px) {
  .article-banner {
    height: 200px;
    border-radius: 0;
  }
  .article-banner-title {
    font-size: 1.25rem;
  }
  .article-banner-overlay {
    padding: 1rem;
  }
  .article-banner-meta {
    gap: 1rem;
    font-size: 0.75rem;
  }
}

/* Category Banner */
.category-banner {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.category-banner-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem 0;
}

.category-banner-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin: 0;
}

@media (max-width: 768px) {
  .category-banner {
    height: 160px;
    border-radius: 0;
  }
  .category-banner-title {
    font-size: 1.25rem;
  }
}

/* Code Block Styles */
.code-block {
  background: #1e1e1e;
  border-radius: 8px;
  margin: 1rem 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #2d2d2d;
  border-bottom: 1px solid #3d3d3d;
}

.code-block-dots {
  display: flex;
  gap: 0.5rem;
}

.code-block-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-block-dot.red { background: #ff5f56; }
.code-block-dot.yellow { background: #ffbd2e; }
.code-block-dot.green { background: #27ca40; }

.code-block-actions {
  display: flex;
  gap: 0.5rem;
}

.code-block-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.code-block-btn:hover {
  color: #fff;
}

.code-block-btn.copied {
  color: #27ca40;
}

.code-block-content {
  padding: 1rem;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.code-block code {
  color: #d4d4d4;
  background: transparent;
  padding: 0;
}

.code-block .line-number {
  color: #6a737d;
  margin-right: 1rem;
  user-select: none;
}

.code-block .keyword {
  color: #2e75b6;
}

.code-block .string {
  color: #a5d6ff;
}

.code-block .command {
  color: #7ee787;
}

.code-block .comment {
  color: #6a737d;
}

/* Comment Form Styles */
.comment-form {
  font-size: 14px;
}

.comment-form p {
  font-size: 14px;
}

.comment-form label {
  font-size: 14px;
}

.comment-form .logged-in-as {
  font-size: 14px;
}

.comment-form textarea {
  font-size: 14px;
}

.comment-form .form-submit input,
.comment-form .submit,
.comment-form input[type="submit"] {
  padding: 7px 30px;
  background: #2e75b6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.comment-form .form-submit input:hover,
.comment-form .submit:hover,
.comment-form input[type="submit"]:hover {
  background: #e63e36;
}

/* Mobile Sidebar Styles */
.mobile-search-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-search-box {
  display: none;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.mobile-search-box.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-search-box form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 0.75rem;
}

.mobile-search-box .search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.mobile-search-box .search-input {
  flex: 1;
  border: none;
  padding: 0.625rem 0;
  font-size: 0.95rem;
  background: transparent;
  min-width: 0;
  outline: none;
  box-shadow: none;
}

.mobile-search-box .search-input:focus {
  outline: none;
  box-shadow: none;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-sidebar.show {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.sidebar-logo img {
  height: 32px;
  width: auto;
}

.sidebar-logo span {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.sidebar-close:hover {
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu-item {
  position: relative;
}

.sidebar-menu-item > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.sidebar-menu-item > a svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-menu-item > a:hover,
.sidebar-menu-item.active > a {
  background: #f8fafc;
  color: var(--accent);
}

.sidebar-menu-item > a:hover svg,
.sidebar-menu-item.active > a svg {
  color: var(--accent);
}

.submenu-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s ease;
}

.sidebar-menu-item.open .submenu-toggle svg {
  transform: rotate(180deg);
}

.sidebar-submenu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f8fafc;
}

.sidebar-menu-item.open .sidebar-submenu {
  display: block;
}

.sidebar-submenu li a {
  display: block;
  padding: 0.625rem 1.25rem 0.625rem 3rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-submenu li a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  background: #fff;
}

@media (max-width: 768px) {
  .mobile-search-toggle {
    display: flex;
  }
  
  .nav-mobile {
    display: none !important;
  }
}

/* Footer Beian Styles */
.footer-beian {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-beian a {
  color: #94a3b8;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-beian a:hover {
  color: #2e75b6;
}

.footer-custom {
  margin-top: 0.5rem;
}

/* Right Fixed Contact Widget */
.contact-widget {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  z-index: 100;
}

.contact-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.contact-widget-header svg {
  color: #2e75b6;
}

.contact-widget-content {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.contact-item svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.contact-item a {
  color: #64748b;
  text-decoration: none;
}

.contact-item a:hover {
  color: #2e75b6;
}

/* TOC Sidebar Card */
.toc-sidebar-card {
  max-height: 300px;
  overflow: hidden;
}

.toc-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 240px;
  overflow-y: auto;
}

.toc-sidebar-list li {
  margin-bottom: 0.25rem;
}

.toc-sidebar-list li:last-child {
  margin-bottom: 0;
}

.toc-sidebar-list a {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  text-decoration: none;
  padding: 0.375rem 0.5rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-sidebar-list a:hover {
  color: #2e75b6;
  background: rgba(46, 117, 182, 0.08);
  border-left-color: #2e75b6;
}

.toc-sidebar-list a.active {
  color: #2e75b6;
  background: rgba(46, 117, 182, 0.08);
  border-left-color: #2e75b6;
  font-weight: 500;
}

@media (max-width: 1400px) {
  .contact-widget {
    display: none;
  }
}
