/* 海报画册 - 学术风格样式 */

:root {
  --primary-color: #607d8b;
  --primary-dark: #455a64;
  --primary-light: #90a4ae;
  --accent-color: #546e7a;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #fff;
  --bg-light: #f5f7f8;
  --bg-muted: #eceff1;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 4px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

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

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

ul {
  list-style: none;
}

/* Header */
.header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-dark);
}

.logo span {
  color: var(--primary-color);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.search-box button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-muted) 100%);
  padding: 64px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.hero p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Section */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.category-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.category-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.category-card h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.category-card p {
  font-size: 13px;
  color: var(--text-light);
}

/* Template List */
.template-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-item {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.template-item:hover {
  box-shadow: var(--shadow);
}

.template-info h4 {
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.template-info p {
  font-size: 13px;
  color: var(--text-light);
}

.template-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #fff;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-col {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 20px;
}

.article-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.article-col ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.article-col ul li:last-child {
  border-bottom: none;
}

.article-col ul li a {
  color: var(--text-color);
  font-size: 13px;
  display: block;
}

.article-col ul li a:hover {
  color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-light);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-light);
}

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

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

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

/* Category Header */
.category-header {
  background: var(--bg-light);
  padding: 48px 24px;
  text-align: center;
}

.category-header h1 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-light);
}

/* Citation Styles */
.citation-styles {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.citation-tag {
  padding: 6px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.citation-tag:hover,
.citation-tag.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-color);
}

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

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

/* Article Page */
.article-header {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-light);
}

.article-header h1 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.article-meta {
  color: var(--text-light);
  font-size: 14px;
}

.article-meta span {
  margin: 0 8px;
}

/* Template Structure */
.template-structure {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.template-structure h3 {
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.template-structure ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.template-structure ul li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
}

.template-structure ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Template Preview */
.template-preview {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.preview-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary-dark);
}

.preview-meta {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 14px;
}

.preview-section {
  margin-bottom: 24px;
}

.preview-section h4 {
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.preview-section p {
  color: var(--text-light);
  line-height: 1.8;
  text-align: justify;
}

/* Download Section */
.download-section {
  text-align: center;
  padding: 32px;
  background: var(--bg-light);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.download-section h3 {
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Sidebar Layout */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-box {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-box h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-box ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.sidebar-box ul li a {
  color: var(--text-color);
  font-size: 13px;
  display: block;
}

.sidebar-box ul li a:hover {
  color: var(--primary-color);
}

/* 404 Page */
.error-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 24px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.error-desc {
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 400px;
}

/* Footer */
.footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 32px 24px;
  text-align: center;
}

.footer p {
  color: var(--text-light);
  font-size: 13px;
}

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

.footer-links a {
  color: var(--text-light);
  font-size: 13px;
}

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

/* Responsive */
@media (max-width: 992px) {
  .category-grid,
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .search-box {
    width: 160px;
  }

  .hero {
    padding: 48px 16px;
  }

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

  .section {
    padding: 32px 16px;
  }

  .category-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .template-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .template-actions {
    width: 100%;
  }

  .template-actions .btn {
    flex: 1;
    text-align: center;
  }

  .citation-styles {
    flex-wrap: wrap;
  }

  .template-structure ul {
    grid-template-columns: 1fr;
  }

  .download-buttons {
    flex-direction: column;
  }

  .download-buttons .btn {
    width: 100%;
  }
}
