/* ============================================
   下载湾主题样式 - WordPress 风格
   ============================================ */

:root {
  --primary: #5b3df5;
  --primary-dark: #3a1fb8;
  --primary-light: #8a72ff;
  --accent: #00d4a8;
  --text: #1f2330;
  --text-light: #5a6175;
  --text-muted: #8c93a8;
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --bg-card: #ffffff;
  --border: #e8eaf2;
  --shadow-sm: 0 1px 2px rgba(31, 35, 48, 0.05);
  --shadow: 0 4px 12px rgba(31, 35, 48, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 35, 48, 0.12);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --container: 1200px;
  --transition: all .25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-alt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

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

/* ====== 顶部导航 ====== */
/* ====== 顶部公告横幅 ====== */
.notice-bar {
  background: linear-gradient(90deg, rgba(91, 61, 245, 0.08), rgba(0, 212, 168, 0.08));
  border-bottom: 1px solid var(--border);
  padding: 8px 28px;
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
}

.notice-bar a {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 1px dashed var(--primary-light);
  transition: var(--transition);
}

.notice-bar a:hover {
  color: var(--primary-dark);
  border-bottom-style: solid;
}

/* ====== 面包屑导航 ====== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 0 4px;
}

.breadcrumb a {
  color: var(--text-light);
  transition: var(--transition);
}

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

.breadcrumb .separator {
  color: var(--text-muted);
  margin: 0 4px;
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.brand-name {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -2px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(91, 61, 245, 0.08);
  color: var(--primary);
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm);
}

.nav-cta:hover {
  background: var(--primary-dark);
  color: #fff !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
}

/* ====== Hero 区 ====== */
.hero {
  background: linear-gradient(135deg, #5b3df5 0%, #00d4a8 100%);
  color: #fff;
  padding: 80px 28px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 19px;
  opacity: 0.92;
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 13px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ====== 主布局 ====== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 28px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

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

/* ====== 文章卡片 ====== */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

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

.post-category {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(91, 61, 245, 0.1);
  color: var(--primary);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.post-meta time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.post-card h2 a {
  color: var(--text);
}

.post-card h2 a:hover {
  color: var(--primary);
}

.post-excerpt {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

.read-more::after {
  content: "→";
  transition: transform .2s ease;
}

.read-more:hover::after {
  transform: translateX(3px);
}

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

.post-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ====== 文章内页 ====== */
.article-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.article-header h1 {
  font-size: 38px;
  line-height: 1.3;
  font-weight: 800;
  margin: 14px 0 18px;
  letter-spacing: -0.015em;
}

.article-header .post-excerpt {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 0;
}

.article-body {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  border: 1px solid var(--border);
  font-size: 16.5px;
  line-height: 1.85;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-top: 8px;
  position: relative;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 16px;
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
  display: none;
}

.article-body p {
  margin-bottom: 18px;
  color: var(--text);
}

.article-body strong {
  color: var(--primary-dark);
  font-weight: 600;
}

.article-body a {
  color: var(--primary);
  border-bottom: 1px dashed var(--primary-light);
}

.article-body a:hover {
  border-bottom-style: solid;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-alt);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-light);
  font-style: italic;
}

.article-body code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-dark);
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.article-body pre {
  background: #1f2330;
  color: #d4d8e3;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-footer {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 40px;
  margin-top: 32px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.article-footer .post-tags {
  gap: 8px;
}

.article-footer .post-tag {
  font-size: 13px;
  padding: 4px 12px;
}

.share-links {
  display: flex;
  gap: 8px;
}

.share-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
}

.share-link:hover {
  background: var(--primary);
  color: #fff;
}


/* ====== 文章主题图 ====== */
.post-hero {
  margin: 0 0 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.post-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.post-hero figcaption {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 16px;
  background: var(--bg-alt);
  text-align: right;
}

/* ====== 侧边栏 ====== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 128px;
  align-self: start;
  max-height: calc(100vh - 144px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.widget li:last-child {
  border-bottom: none;
}

.widget li a {
  color: var(--text);
  display: flex;
  justify-content: space-between;
}

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

.widget li span {
  color: var(--text-muted);
  font-size: 12px;
}

.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tagcloud a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-alt);
  color: var(--text-light);
  border-radius: 14px;
  font-size: 13px;
  transition: var(--transition);
}

.tagcloud a:hover {
  background: var(--primary);
  color: #fff;
}

/* ====== 分页 ====== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text);
}

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

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

/* ====== 底部 ====== */
.site-footer {
  background: #1a1d2b;
  color: #b8bccd;
  padding: 56px 28px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  padding: 4px 0;
}

.footer-col a {
  color: #b8bccd;
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-about {
  font-size: 14px;
  line-height: 1.7;
  color: #8a8fa3;
  margin-top: 12px;
}

.footer-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #2a2e3f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #8a8fa3;
  flex-wrap: wrap;
  gap: 12px;
}

/* ====== 关于页面/单页 ====== */
.page-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  text-align: center;
}

.page-header h1 {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.page-header p {
  font-size: 17px;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
}

.page-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  border: 1px solid var(--border);
  font-size: 16.5px;
  line-height: 1.85;
}

.page-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 32px 0 14px;
}

.page-content p {
  margin-bottom: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.feature-item {
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.feature-item h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-item p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

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

  .sidebar {
    order: -1;
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .hero h1 {
    font-size: 36px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    box-shadow: var(--shadow);
  }

  .main-nav.show {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .main-nav a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .menu-toggle {
    display: block;
  }

  .header-inner {
    padding: 14px 20px;
  }

  .container,
  .article-body,
  .article-header,
  .article-footer,
  .page-content,
  .page-header {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero {
    padding: 56px 22px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-stats {
    gap: 28px;
  }

  .hero-stat-num {
    font-size: 26px;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .post-card h2 {
    font-size: 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ====== 辅助类 ====== */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }