:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --line: #e5e7eb;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

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

a {
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-wrap {
  min-height: 100vh;
}

.site-header {
  background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.site-brand {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.site-desc {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
}

.header-search {
  flex: 1;
  max-width: 460px;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-form input {
  flex: 1;
  height: 46px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 18px;
  outline: none;
  font-size: 0.95rem;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.search-form button {
  height: 46px;
  padding: 0 22px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.search-form button:hover {
  background: var(--primary-dark);
}

.nav-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 0 auto;
  border-radius: 2px;
}

.site-main {
  padding-bottom: 40px;
}

.hero-section {
  padding: 24px 0 8px;
}

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

.hero-main,
.side-card,
.module-card,
.article-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 20px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.hero-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-card {
  min-width: calc(100% - 0px);
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.hero-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
}

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

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.88) 100%);
  color: #fff;
}

.hero-content h3 {
  margin: 10px 0 8px;
  font-size: 1.5rem;
  line-height: 1.35;
}

.hero-content h3 a,
.hero-content p {
  color: #fff;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.slider-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-top: 14px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
}

.slider-dots button.active {
  background: var(--primary);
}

.page-section {
  padding: 16px 0 0;
}

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

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

.sidebar {
  min-width: 0;
}

.module-card,
.side-card {
  padding: 20px;
  margin-bottom: 24px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.more-link {
  font-size: 0.9rem;
  color: var(--primary);
}

.card-grid {
  display: grid;
  gap: 18px;
}

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

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

.post-card,
.simple-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover,
.simple-card:hover,
.video-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.post-thumb,
.simple-thumb,
.side-thumb,
.video-thumb,
.mini-thumb {
  display: block;
  overflow: hidden;
  background: #eef2ff;
}

.post-thumb {
  aspect-ratio: 16 / 9;
}

.post-thumb img,
.simple-thumb img,
.side-thumb img,
.video-thumb img,
.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body,
.simple-body {
  padding: 16px;
}

.post-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.cat-link {
  color: var(--primary);
  font-weight: 600;
}

.post-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.45;
}

.post-desc {
  margin: 0;
  color: var(--text-light);
  font-size: 0.94rem;
}

.post-tags {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 0.875rem;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.5;
}

.tag-cloud,
.tag-page-cloud,
.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a,
.tag-page-cloud a,
.tag-links a,
.post-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 0.875rem;
}

.tag-page-cloud a {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.side-list,
.mini-list,
.video-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-item,
.mini-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-thumb,
.mini-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.side-info h3,
.mini-body h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.side-info p,
.mini-body p,
.simple-body p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.85rem;
}

.video-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
}

.play-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.video-item h3 {
  margin: 0;
  padding: 14px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.text-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-list li {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

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

.text-list a {
  line-height: 1.6;
}

.page-banner {
  padding: 26px 0 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.page-heading {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.3;
}

.page-subtitle {
  margin: 0;
  color: var(--text-light);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pagination a {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.article-card {
  padding: 26px;
  margin-bottom: 24px;
}

.article-header h1 {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1.35;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-light);
  font-size: 0.9rem;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.article-cover {
  margin: 22px 0;
  overflow: hidden;
  border-radius: 16px;
}

.article-cover img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.article-intro,
.article-summary {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  color: #374151;
}

.article-content {
  font-size: 1rem;
  color: #111827;
  overflow-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

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

.article-content img {
  margin: 18px auto;
  border-radius: 12px;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.1em 1.4em;
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-tags {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tag-title {
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
}

.search-form-large {
  background: #f8fafc;
  border: 1px solid var(--line);
}

.search-form-large input {
  color: var(--text);
}

.search-form-large input::placeholder {
  color: #9ca3af;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.site-footer {
  margin-top: 40px;
  background: #111827;
  color: rgba(255, 255, 255, 0.82);
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.footer-text {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 1080px) {
  .hero-grid,
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .content-area {
    order: 1;
  }

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

@media (max-width: 768px) {
  .container {
    width: min(var(--container), calc(100% - 24px));
  }

  .header-top {
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-bar {
    display: none;
  }

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

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 14px;
  }

  .main-nav a {
    justify-content: flex-start;
    border-radius: 12px;
  }

  .page-heading,
  .article-header h1 {
    font-size: 1.55rem;
  }

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

  .side-item,
  .mini-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .article-card,
  .module-card,
  .side-card,
  .hero-main {
    padding: 16px;
  }

  .footer-inner {
    flex-direction: column;
    padding: 28px 0;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .hero-content {
    padding: 16px;
  }

  .hero-content h3 {
    font-size: 1.2rem;
  }

  .search-form input,
  .search-form button {
    height: 42px;
  }

  .pagination a {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
  }

  .article-intro,
  .article-summary {
    padding: 14px;
  }
}