/* /assets/style.css */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #1f2937;
  background: #f3f6fb;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

a {
  color: #1f2937;
  text-decoration: none;
  transition: all .2s ease;
}

a:hover {
  color: #2563eb;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: relative;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
}

.site-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.header-search {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 420px;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  overflow: hidden;
}

.search-input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: #111827;
}

.search-btn {
  min-width: 88px;
  height: 44px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.search-btn:hover {
  filter: brightness(1.05);
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 18px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.nav-item:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

.menu-toggle,
.mobile-search {
  display: none;
}

.site-main {
  padding: 24px 0 40px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.content-area,
.sidebar {
  min-width: 0;
}

.panel,
.widget,
.article-detail,
.page-banner,
.hero-slider {
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.panel,
.widget,
.article-detail,
.page-banner {
  padding: 20px;
}

.panel + .panel,
.widget + .widget,
.article-detail + .panel {
  margin-top: 24px;
}

.panel-head,
.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2,
.widget-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  color: #0f172a;
}

.widget-head h3 {
  font-size: 18px;
}

.more-link {
  color: #2563eb;
  font-weight: 600;
}

.page-banner {
  margin-bottom: 24px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.page-banner h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.3;
  color: #0f172a;
}

.page-banner p {
  margin: 0;
  color: #64748b;
}

/* 轮播 */
.hero-slider {
  position: relative;
  margin-bottom: 24px;
  padding: 0;
  overflow: hidden;
}

.hero-track {
  display: flex;
  width: 100%;
  transition: transform .45s ease;
}

.hero-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.hero-link {
  display: grid;
  grid-template-columns: 52% 48%;
  min-height: 380px;
}

.hero-image {
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: #e5e7eb;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.hero-content h2 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.35;
  color: #fff;
}

.hero-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.76);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  font-size: 28px;
  line-height: 42px;
  text-align: center;
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  background: #ffffff;
}

/* 卡片 */
.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover,
.side-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.card-horizontal {
  flex-direction: row;
  align-items: stretch;
}

.thumb-box {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

.card .thumb-box {
  width: 100%;
  height: 180px;
}

.card .thumb-box img,
.thumb-sm img,
.side-thumb img,
.article-cover img,
.article-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-sm {
  flex: 0 0 220px;
  width: 220px;
  height: 140px;
  overflow: hidden;
  background: #e5e7eb;
}

.card-body {
  flex: 1;
  min-width: 0;
  padding: 16px;
}

.card-category {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.5;
}

.card h3 a {
  color: #111827;
}

.card h3 a:hover {
  color: #2563eb;
}

.card p {
  margin: 0 0 12px;
  color: #64748b;
}

.card-tags {
  margin-bottom: 10px;
  color: #2563eb;
  font-size: 13px;
}

.card-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #64748b;
}

/* 侧栏 */
.widget {
  padding: 18px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.side-thumb {
  flex: 0 0 108px;
  width: 108px;
  height: 76px;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
}

.side-body {
  flex: 1;
  min-width: 0;
}

.side-body h4 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
}

.side-body p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.rank-list {
  margin: 0;
  padding-left: 20px;
}

.rank-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank-list a {
  flex: 1;
  min-width: 0;
}

.rank-list span {
  flex: 0 0 auto;
  font-size: 12px;
  color: #94a3b8;
}

/* 标签 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud-large .tag-item {
  font-size: 15px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.tag-item:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* 内容页 */
.article-header {
  margin-bottom: 22px;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #64748b;
}

.article-header h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.4;
  color: #0f172a;
}

.article-cover {
  width: 100%;
  height: 420px;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 18px;
  background: #e5e7eb;
}

.article-intro {
  padding: 16px 18px;
  margin-bottom: 22px;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  background: #f8fbff;
  color: #475569;
}

.article-content {
  font-size: 16px;
  color: #1f2937;
  word-break: break-word;
}

.article-content p {
  margin: 0 0 1.1em;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.4em 0 .7em;
  color: #0f172a;
  line-height: 1.4;
}

.article-content ul,
.article-content ol {
  padding-left: 22px;
  margin: 0 0 1.1em;
}

.article-content blockquote {
  margin: 1.2em 0;
  padding: 14px 16px;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  background: #f8fbff;
  color: #475569;
}

.article-content img {
  width: 100%;
  max-width: 100%;
  height: 360px;
  margin: 18px auto;
  border-radius: 16px;
  overflow: hidden;
  background: #e5e7eb;
}

.article-extra {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #2563eb;
}

/* 分页 */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-weight: 700;
}

.page-btn:hover,
.page-btn.active,
.page-btn.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

/* 底部 */
.site-footer {
  margin-top: 10px;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 16px 18px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-desc {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.64);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.86);
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.footer-copy p {
  margin: 0;
}

/* 404 */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.error-box {
  width: 100%;
  max-width: 560px;
  padding: 42px 30px;
  border: 1px solid #e8edf5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.error-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  object-fit: contain;
}

.error-code {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 68px;
  line-height: 1;
  font-weight: 900;
  color: #2563eb;
}

.error-box h1 {
  margin: 0 0 10px;
  font-size: 30px;
  color: #0f172a;
}

.error-box p {
  margin: 0;
  color: #64748b;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  color: #334155;
}

.error-btn.primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

/* 响应式 */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .content-area {
    order: 1;
  }

  .card-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-link {
    grid-template-columns: 1fr;
  }

  .hero-image {
    height: 300px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-content h2 {
    font-size: 26px;
  }

  .article-cover {
    height: 320px;
  }

  .article-content img {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .header-top {
    min-height: 68px;
  }

  .site-logo {
    font-size: 20px;
  }

  .desktop-search {
    display: none;
  }

  .mobile-search {
    display: block;
    padding: 0 0 16px;
  }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #0f172a;
    border-radius: 2px;
  }

  .main-nav {
    display: none;
    gap: 10px;
    padding: 0 0 16px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-item {
    width: calc(50% - 5px);
    justify-content: center;
  }

  .site-main {
    padding: 18px 0 28px;
  }

  .panel,
  .widget,
  .article-detail,
  .page-banner {
    padding: 16px;
    border-radius: 16px;
  }

  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .card-horizontal {
    flex-direction: column;
  }

  .hero-link {
    min-height: auto;
  }

  .hero-image {
    height: 220px;
  }

  .card .thumb-box {
    height: 180px;
  }

  .thumb-sm {
    width: 100%;
    height: 180px;
    flex: none;
  }

  .side-thumb {
    width: 96px;
    height: 68px;
    flex: 0 0 96px;
  }

  .page-banner h1,
  .article-header h1 {
    font-size: 24px;
  }

  .article-cover {
    height: 240px;
  }

  .article-content img {
    height: 220px;
  }

  .footer-inner,
  .footer-copy {
    flex-direction: column;
    align-items: flex-start;
  }

  .error-box {
    padding: 34px 22px;
  }

  .error-code {
    font-size: 56px;
  }

  .error-box h1 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .search-input {
    font-size: 13px;
  }

  .search-btn {
    min-width: 74px;
    font-size: 13px;
  }

  .nav-item {
    width: 100%;
  }

  .hero-image {
    height: 200px;
  }

  .card .thumb-box,
  .thumb-sm {
    height: 170px;
  }

  .card h3,
  .side-body h4 {
    font-size: 16px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .widget-head h3 {
    font-size: 17px;
  }

  .tag-item {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .article-cover {
    height: 220px;
  }

  .article-content img {
    height: 200px;
  }
}