/* mirror_flow:p6_ai_generated */
:root {
  --primary: #8b1e1e;
  --primary-light: #b84444;
  --primary-dark: #5e0f0f;
  --accent: #c9974a;
  --accent-light: #e0c78a;
  --bg-cream: #fdf8f2;
  --bg-warm: #f7efe4;
  --text-dark: #2c1f14;
  --text-mid: #5c4a3a;
  --text-light: #8a7565;
  --white: #ffffff;
  --border-soft: #e0d5c7;
  --shadow-sm: 0 2px 8px rgba(44, 31, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 31, 20, 0.1);
  --shadow-lg: 0 8px 32px rgba(44, 31, 20, 0.14);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', 'Songti SC', 'KaiTi', '楷体', '华文楷体', serif;
  --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Arial, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --max-width: 1200px;
  --header-height: 72px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-dark);
  background-color: var(--bg-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-dark);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-logo .logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-logo .logo-sub {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.06em;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background-color: rgba(139, 30, 30, 0.04);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ========== PAGE BANNER ========== */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, #6b1515 100%);
  color: var(--white);
  padding: 48px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.page-banner h1 {
  color: var(--white);
  font-size: 2.5rem;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.page-banner .breadcrumb {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  position: relative;
  z-index: 1;
}

.page-banner .breadcrumb a {
  color: rgba(255,255,255,0.9);
}

.page-banner .breadcrumb a:hover {
  color: var(--accent-light);
}

.page-banner .breadcrumb span {
  margin: 0 6px;
}

/* ========== MAIN CONTENT AREA ========== */
.main-content {
  flex: 1;
  padding: 48px 0 64px;
}

.main-content .container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar */
.sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: 0.04em;
}

.sidebar-nav a {
  display: block;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--primary);
  background-color: var(--bg-warm);
}

.sidebar-nav a.active {
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.tag-item {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.85rem;
  color: var(--text-mid);
  background: var(--bg-warm);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tag-item:hover {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.tag-item.active {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}

/* ========== LIST STYLES ========== */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.list-header h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--text-dark);
  letter-spacing: 0.03em;
}

.list-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-mid);
}

.list-sort a {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  transition: all var(--transition-fast);
}

.list-sort a:hover,
.list-sort a.active {
  color: var(--primary);
  background: rgba(139, 30, 30, 0.05);
}

/* Article Card */
.article-list {
  display: grid;
  gap: 20px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-soft);
  transform: translateY(-2px);
}

.article-card-inner {
  display: flex;
  gap: 24px;
  padding: 20px 24px;
}

.article-card .thumb {
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-warm);
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.article-card .info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.45;
}

.article-card .info h3 a {
  color: var(--text-dark);
  transition: color var(--transition-fast);
}

.article-card .info h3 a:hover {
  color: var(--primary);
}

.article-card .meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.article-card .meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-card .excerpt {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.article-card .card-tags .tag-item {
  font-size: 0.78rem;
  padding: 3px 10px;
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  font-size: 0.9rem;
  color: var(--text-mid);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(139, 30, 30, 0.03);
}

.pagination .current {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.pagination .disabled {
  color: var(--text-light);
  opacity: 0.5;
  pointer-events: none;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 28px;
  margin-top: auto;
}

.site-footer .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .main-content .container {
    grid-template-columns: 240px 1fr;
    gap: 28px;
  }

  .article-card-inner {
    flex-direction: column;
    gap: 16px;
  }

  .article-card .thumb {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.3rem; }

  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    gap: 2px;
    transform: translateY(-120%);
    transition: transform var(--transition-base);
    z-index: 999;
  }

  .main-nav.open {
    transform: translateY(0);
  }

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

  .main-content .container {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .page-banner {
    padding: 32px 0;
  }

  .page-banner h1 {
    font-size: 1.75rem;
  }

  .site-footer .container {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .main-content {
    padding: 32px 0 48px;
  }

  .article-card-inner {
    padding: 16px;
  }

  .article-card .thumb {
    height: 160px;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination a,
  .pagination span {
    min-width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }

  .site-footer .container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* ========== UTILITY ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ========== PRINT ========== */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .back-to-top,
  .pagination,
  .hamburger {
    display: none !important;
  }

  .main-content .container {
    display: block;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .article-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
