/* ===== Header 公共样式 ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}
.brand-text span {
  font-size: 12px;
  color: #64748b;
  display: block;
}

/* ===== 导航链接 - 横排靠右 ===== */
.header-nav {
  margin-left: auto;
}
.header-nav ul {
  display: flex !important;
  align-items: center;
  gap: 8px;
  list-style: none !important;
  margin: 0;
  padding: 0;
}
.header-nav ul li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.header-nav ul li a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.header-nav ul li a:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* ===== 移动端菜单按钮 ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: #0f172a;
  position: relative;
  width: 36px;
  height: 36px;
}
.menu-toggle:hover { background: #f1f5f9; }
.menu-toggle svg {
  width: 22px;
  height: 22px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s;
}
.menu-toggle .icon-close { opacity: 0; }
.menu-toggle.active .icon-open { opacity: 0; }
.menu-toggle.active .icon-close { opacity: 1; }

/* ===== 移动端菜单面板 ===== */
.mobile-panel {
  display: none;
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 99;
  overflow-y: auto;
  border-top: 1px solid #e2e8f0;
}
.mobile-panel.open { display: block; }
.mobile-panel-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #0f172a;
  border-radius: 10px;
  transition: all 0.15s;
  text-decoration: none;
}
.mobile-link:hover {
  background: #eff6ff;
  color: #2563eb;
  text-decoration: none;
}
.mobile-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
}

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

/* ===== Footer ===== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  font-size: 13px;
  padding: 40px 24px 20px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p {
  line-height: 1.7;
  max-width: 300px;
  margin-bottom: 12px;
}
.footer-brand .author {
  font-size: 12px;
  color: #64748b;
}
.footer-brand .author a {
  color: #cbd5e1;
  text-decoration: underline;
}
.footer-col h4 {
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #94a3b8;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .header-inner {
    padding: 10px 16px;
  }
  .header-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .brand-text span {
    display: none;
  }
  .search-box {
    max-width: none;
  }
  .hero h2 {
    font-size: 22px;
  }
  .main-layout {
    flex-direction: column;
    padding: 16px;
  }
  .sidebar {
    position: static;
    width: 100%;
    max-height: none;
    display: none;
  }
  .sidebar.open {
    display: block;
  }
  .nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .nav-list li {
    margin: 0;
  }
  .nav-list a {
    border-left: none;
    padding: 6px 12px;
    font-size: 12px;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .about-inner {
    grid-template-columns: 1fr;
  }
  .about-image {
    display: none;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .quick-tags a {
    font-size: 12px;
    padding: 4px 10px;
  }
}