@charset "utf-8";
:root {
  --primary: #8b4513;
  --accent: #d4a574;
  --secondary: #2d5016;
  --bg-light: #faf6f0;
  --bg-white: #ffffff;
  --text-dark: #3d3d3d;
  --text-muted: #666666;
  --text-light: #999999;
  --border-color: #e0d5c5;
  --shadow: 6px 6px 0 var(--accent);
  --shadow-sm: 3px 3px 0 var(--accent);
  --radius: 4px;
  --radius-sm: 2px;
}

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

html, body {
  background: var(--bg-light);
  font-family: 'Microsoft YaHei', -apple-system, sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, li {
  list-style: none;
}

/* ========== Header ========== */
.header {
  background: var(--bg-white);
  border-bottom: 4px solid var(--primary);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
}

.logo img {
  height: 100px; width: 100px; object-fit: cover; border-radius: 10px;
  /* border removed */
}
.logo, .logo a { display: flex; align-items: center; gap: 12px; }
.site-name { font-size: 1.5rem; font-weight: 700; color: #1a1a1a; }

.nav-bar {
  flex: 1;
}

.nav {
  display: flex;
  gap: 0;
}

.nav li a {
  display: block;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 4px solid transparent;
  transition: all 0.25s;
}

.nav li a:hover,
.nav li.active a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== Main Wrapper ========== */
.main-wrapper {
  min-height: calc(100vh - 200px);
}

/* ========== Container ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Banner Section ========== */
.banner-section {
  padding: 30px 0;
  background: var(--bg-white);
  border-bottom: 3px solid var(--border-color);
}

.banner-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.banner-main {
  display: block;
  position: relative;
  height: 380px;
  background-size: cover;
  background-position: center;
  border: 4px solid var(--primary);
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: #1a1a1a;
}

.banner-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.banner-overlay h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.banner-overlay p {
  font-size: 14px;
  opacity: 0.9;
}

.banner-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.banner-mini {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  /* border removed */
  padding: 16px;
  transition: all 0.25s;
}

.banner-mini:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}

.banner-mini span {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ========== Category Nav ========== */
.category-nav {
  padding: 24px 0;
  background: var(--bg-light);
  border-bottom: 2px solid var(--border-color);
}

.category-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.category-item {
  padding: 10px 24px;
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--primary);
  transition: all 0.25s;
}

.category-item:hover {
  background: var(--primary);
  color: #1a1a1a;
}

/* ========== Section Header ========== */
.section-header {
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--primary);
}

.section-header h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* ========== Stack Section ========== */
.stack-section {
  padding: 50px 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stack-card {
  background: var(--bg-white);
  /* border removed */
  overflow: hidden;
  transition: all 0.25s;
}

.stack-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.stack-thumb {
  display: block;
  height: 140px;
  background-size: cover;
  background-position: center;
  border-bottom: 3px solid var(--primary);
}

.stack-info {
  padding: 16px;
}

.stack-cat {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.stack-info h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.stack-info h3 a {
  color: var(--text-dark);
}

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

.stack-info p {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.stack-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-light);
}

/* ========== Masonry Section ========== */
.masonry-section {
  padding: 50px 0;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

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

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.masonry-card {
  background: var(--bg-white);
  /* border removed */
  overflow: hidden;
  transition: all 0.25s;
}

.masonry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.masonry-thumb {
  display: block;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-bottom: 3px solid var(--primary);
}

.masonry-info {
  padding: 16px;
}

.masonry-cat {
  display: inline-block;
  padding: 3px 10px;
  background: var(--secondary);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.masonry-info h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.masonry-info h3 a {
  color: var(--text-dark);
}

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

.masonry-info p {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.masonry-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-light);
}

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

.sidebar-widget {
  background: var(--bg-white);
  /* border removed */
  padding: 20px;
}

.widget-title {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 2px dashed var(--border-color);
}

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

.rank-num {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 900;
}

.rank-list li:nth-child(1) .rank-num { background: var(--accent); }
.rank-list li:nth-child(2) .rank-num { background: #c9302c; }
.rank-list li:nth-child(3) .rank-num { background: #2d5016; }

.rank-list a {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

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

.recent-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--border-color);
}

.recent-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.recent-thumb {
  flex: 0 0 60px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--primary);
}

.recent-info {
  flex: 1;
  min-width: 0;
}

.recent-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item:hover .recent-title {
  color: var(--primary);
}

.recent-date {
  font-size: 12px;
  color: var(--text-light);
}

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

.tag-item {
  padding: 6px 14px;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--primary);
  transition: all 0.25s;
}

.tag-item:hover {
  background: var(--primary);
  color: #1a1a1a;
}

/* ========== Tags Section ========== */
.tags-section {
  padding: 50px 0;
  background: var(--bg-white);
  border-top: 3px solid var(--border-color);
}

.tags-cloud .tag-item {
  padding: 10px 20px;
  font-size: 14px;
}

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

.page-item {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--bg-white);
  /* border removed */
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
  transition: all 0.25s;
}

.page-item:hover {
  background: var(--primary);
  color: #1a1a1a;
}

.page-current {
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 800;
  border: 3px solid var(--accent);
}

.no-data {
  text-align: center;
  padding: 60px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-white);
  /* border removed */
}

/* ========== Page Header ========== */
.page-header {
  background: var(--bg-white);
  border-bottom: 4px solid var(--primary);
  padding: 50px 0;
}

.page-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  margin-bottom: 16px;
}

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

.separator {
  margin: 0 10px;
  color: var(--text-light);
}

.page-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* ========== Article Content ========== */
.article-content {
  background: var(--bg-white);
  /* border removed */
  padding: 40px;
}

.article-body {
  font-size: 16px;
  line-height: 2;
  color: var(--text-dark);
}

.article-body p {
  margin-bottom: 24px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  /* border removed */
  margin: 24px 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 32px 0 16px;
  font-weight: 800;
  color: var(--primary);
}

.article-body ul,
.article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

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

/* ========== Article Tags ========== */
.article-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 3px solid var(--primary);
}

.tags-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
}

/* ========== Footer ========== */
.footer {
  background: var(--primary);
  color: #1a1a1a;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px;
  text-align: center;
  font-size: 14px;
}

.footer-bottom a {
  color: var(--accent);
  margin: 0 10px;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .banner-grid {
    grid-template-columns: 1fr;
  }

  .banner-side {
    flex-direction: row;
  }

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

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

  .content-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-bar {
    display: none;
  }

  .banner-side {
    flex-direction: column;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    grid-template-columns: 1fr;
  }

  .article-content {
    padding: 24px;
  }
}
