/* 辐射避难所 - 全局样式 */
:root {
  --accent-color: #e91e63;
  --primary-dark: #1a1a2e;
  --primary-light: #16213e;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-gray: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

* {
  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-primary);
  background: var(--bg-gray);
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-gray);
  border-radius: 20px;
  padding: 6px 16px;
  width: 200px;
}

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

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  color: var(--bg-white);
  padding: 60px 0;
  text-align: center;
}

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

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Section Title */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-gray);
}

.card-body {
  padding: 16px;
}

.card-category {
  font-size: 12px;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-light);
}

.card-meta-left {
  display: flex;
  gap: 12px;
}

.difficulty-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.difficulty-easy {
  background: #e8f5e9;
  color: #2e7d32;
}

.difficulty-medium {
  background: #fff3e0;
  color: #ef6c00;
}

.difficulty-hard {
  background: #ffebee;
  color: #c62828;
}

/* Featured Section */
.featured-section {
  padding: 40px 0;
}

/* Resource Section */
.resource-section {
  padding: 40px 0;
  background: var(--bg-white);
}

/* Load More */
.load-more {
  text-align: center;
  padding: 40px 0;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: #c2185b;
}

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

.btn-outline:hover {
  background: var(--accent-color);
  color: var(--bg-white);
}

/* Sidebar Lists */
.sidebar-section {
  padding: 40px 0;
}

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

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

.sidebar-box h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

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

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.sidebar-list a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-list a::before {
  content: '•';
  color: var(--accent-color);
}

.sidebar-list a:hover {
  color: var(--accent-color);
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: var(--bg-white);
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 14px;
  margin-bottom: 16px;
  color: var(--bg-white);
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 13px;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  opacity: 0.6;
}

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

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

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

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

.breadcrumb-inner span {
  margin: 0 8px;
}

/* Category Header */
.category-header {
  background: var(--bg-white);
  padding: 30px 0;
  text-align: center;
}

.category-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  background: var(--bg-gray);
  color: var(--text-secondary);
  transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--accent-color);
  color: var(--bg-white);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg-white);
  color: var(--text-secondary);
  box-shadow: var(--shadow);
}

.pagination a:hover,
.pagination a.active {
  background: var(--accent-color);
  color: var(--bg-white);
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 16px;
}

/* Article Page */
.article-section {
  padding: 30px 0;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.article-header {
  margin-bottom: 30px;
}

.article-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}

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

.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 20px;
  margin: 30px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 17px;
  margin: 24px 0 12px;
}

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

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

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

.article-content img {
  border-radius: var(--radius);
  margin: 20px 0;
}

/* Action Buttons */
.article-actions {
  display: flex;
  gap: 12px;
  margin: 30px 0;
  padding: 24px;
  background: var(--bg-gray);
  border-radius: var(--radius);
}

.btn-large {
  padding: 14px 32px;
  font-size: 15px;
}

/* Related Section */
.related-section {
  padding: 30px 0;
}

/* 404 Page */
.error-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-content {
  max-width: 500px;
}

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

.error-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

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

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

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

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

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .search-box {
    width: 150px;
  }

  .hero {
    padding: 40px 0;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .article-container {
    padding: 24px;
  }

  .article-title {
    font-size: 22px;
  }

  .article-actions {
    flex-wrap: wrap;
  }

  .filter-tabs {
    gap: 8px;
  }

  .filter-tab {
    padding: 6px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 20px;
  }

  .pagination a,
  .pagination span {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}
