/* ============================================
   速方云博客 - 自定义主题样式
   品牌色: #466EF5 (蓝) / #FF8300 (橙)
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #142655;
  background: #F9FAFF;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #466EF5;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #3558d6;
}

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

/* ============================================
   Header
   ============================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid rgba(226, 231, 240, 1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #466EF5;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #142655;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: #8992AA;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #466EF5;
  border-bottom-color: #466EF5;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
  background: linear-gradient(135deg, #466EF5 0%, #6B8CFF 100%);
  color: #fff;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  opacity: 0.9;
}

/* ============================================
   Content Layout
   ============================================ */
.main-content {
  flex: 1;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

/* ============================================
   Post Cards (Index)
   ============================================ */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(226, 231, 240, 1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(70, 110, 245, 0.1);
}

.post-card-body {
  padding: 28px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #8992AA;
  margin-bottom: 12px;
}

.post-tags .tag {
  display: inline-block;
  padding: 2px 8px;
  background: #EEF1FF;
  color: #466EF5;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 4px;
}

.post-card .post-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card .post-title a {
  color: #142655;
}

.post-card .post-title a:hover {
  color: #466EF5;
}

.post-excerpt {
  color: #8992AA;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.read-more {
  font-size: 14px;
  font-weight: 500;
  color: #466EF5;
}

.read-more:hover {
  color: #FF8300;
}

/* ============================================
   Post Detail
   ============================================ */
.post-detail {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(226, 231, 240, 1);
  padding: 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8992AA;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: #8992AA;
}

.breadcrumb a:hover {
  color: #466EF5;
}

.breadcrumb .separator {
  color: #ccc;
}

.breadcrumb .current {
  color: #142655;
}

.post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(226, 231, 240, 1);
}

.post-detail .post-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.post-detail .post-meta .tag {
  display: inline-block;
  padding: 2px 8px;
  background: #EEF1FF;
  color: #466EF5;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
}

.post-detail .post-meta .tag:hover {
  background: #466EF5;
  color: #fff;
}

/* Post Content */
.post-content {
  font-size: 15px;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #466EF5;
  color: #142655;
}

.post-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #142655;
}

.post-content p {
  margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  border-left: 4px solid #466EF5;
  background: #EEF1FF;
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  color: #142655;
}

.post-content code {
  background: #EEF1FF;
  color: #466EF5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.post-content pre {
  background: #1e2a3a;
  color: #e4e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 14px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.post-content th {
  background: #466EF5;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
}

.post-content td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(226, 231, 240, 1);
}

.post-content tr:hover td {
  background: #F9FAFF;
}

.post-content strong {
  color: #142655;
  font-weight: 600;
}

.post-content hr {
  border: none;
  border-top: 1px solid rgba(226, 231, 240, 1);
  margin: 32px 0;
}

.post-content a {
  color: #466EF5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: #FF8300;
}

/* Post Footer */
.post-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(226, 231, 240, 1);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.prev-post,
.next-post {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: #F9FAFF;
  border-radius: 8px;
  flex: 1;
  transition: background 0.2s;
}

.prev-post:hover,
.next-post:hover {
  background: #EEF1FF;
}

.next-post {
  text-align: right;
}

.nav-label {
  font-size: 12px;
  color: #8992AA;
}

.nav-title {
  font-size: 14px;
  color: #142655;
  font-weight: 500;
}

.post-cta {
  text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, #466EF5 0%, #6B8CFF 100%);
  border-radius: 12px;
  color: #fff;
}

.post-cta p {
  margin-bottom: 16px;
  font-size: 16px;
}

.cta-button {
  display: inline-block;
  padding: 12px 32px;
  background: #FF8300;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.cta-button:hover {
  background: #e67600;
  color: #fff;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(226, 231, 240, 1);
  padding: 24px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #142655;
}

.sidebar-desc {
  font-size: 14px;
  color: #8992AA;
  line-height: 1.6;
  margin-bottom: 16px;
}

.sidebar-cta {
  display: inline-block;
  padding: 10px 24px;
  background: #466EF5;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.sidebar-cta:hover {
  background: #3558d6;
  color: #fff;
}

.sidebar-posts {
  list-style: none;
}

.sidebar-posts li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(226, 231, 240, 0.5);
}

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

.sidebar-posts a {
  font-size: 14px;
  color: #142655;
  line-height: 1.5;
}

.sidebar-posts a:hover {
  color: #466EF5;
}

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

.tag-item {
  display: inline-block;
  padding: 4px 12px;
  background: #EEF1FF;
  color: #466EF5;
  border-radius: 16px;
  font-size: 13px;
  transition: all 0.2s;
}

.tag-item:hover {
  background: #466EF5;
  color: #fff;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  text-align: center;
  padding: 40px 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border-radius: 8px;
  font-size: 14px;
}

.pagination a {
  background: #fff;
  color: #466EF5;
  border: 1px solid rgba(226, 231, 240, 1);
}

.pagination a:hover {
  background: #466EF5;
  color: #fff;
}

.pagination .current {
  background: #466EF5;
  color: #fff;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: #F9FAFF;
  border-top: 1px solid rgba(226, 231, 240, 1);
  padding: 48px 24px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 16px;
}

.footer-links a {
  color: #8992AA;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #466EF5;
}

.footer-copyright {
  color: #bbb;
  font-size: 13px;
  margin-bottom: 8px;
}

.footer-icp a {
  color: #bbb;
  font-size: 12px;
}

.footer-icp a:hover {
  color: #466EF5;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 13px;
  }

  .hero {
    padding: 40px 16px 30px;
  }

  .hero-title {
    font-size: 28px;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
    padding: 24px 16px;
    gap: 24px;
  }

  .post-detail {
    padding: 24px;
  }

  .post-detail .post-title {
    font-size: 22px;
  }

  .post-nav {
    flex-direction: column;
  }

  .next-post {
    text-align: left;
  }

  .footer-links {
    gap: 24px;
  }
}
