/* 可持续时尚 - 数据表格风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #607d8b;
  --primary: #607d8b;
  --primary-dark: #455a64;
  --primary-light: #90a4ae;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-primary: #263238;
  --text-secondary: #546e7a;
  --text-muted: #78909c;
  --border-color: #e0e6ed;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --max-width: 1200px;
}

/* 重置 */
* {
  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-color: var(--bg-color);
}

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

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

/* 布局 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 页头 */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

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

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  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::before {
  content: "🔍";
  margin-right: 8px;
  opacity: 0.5;
}

/* 面包屑 */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

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

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

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: -30px 0 40px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

/* 表格 */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-color);
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
}

.data-table th.sortable::after {
  content: " ⇅";
  opacity: 0.3;
}

.data-table tbody tr:hover {
  background: var(--bg-color);
}

.data-table .badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #e8f5e9;
  color: var(--success);
}

.badge-warning {
  background: #fff3e0;
  color: var(--warning);
}

.badge-info {
  background: #e3f2fd;
  color: #1976d2;
}

/* 分类网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: box-shadow 0.2s;
}

.category-card:hover {
  box-shadow: var(--shadow-hover);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.category-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* 列表 */
.list-group {
  list-style: none;
}

.list-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.list-item-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.list-item-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.list-item-action {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

/* 文章列表 */
.article-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.article-image {
  height: 160px;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 48px;
}

.article-content {
  padding: 20px;
}

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

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

.article-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 文章详情 */
.article-header {
  background: var(--card-bg);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  gap: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.article-body {
  background: var(--card-bg);
  padding: 40px 0;
}

.article-content-detail {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
}

.article-content-detail h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 32px 0 16px;
}

.article-content-detail h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
}

.article-content-detail p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

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

.article-content-detail li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* 导出按钮 */
.export-btns {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
}

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

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

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

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 14px;
}

.pagination a {
  background: var(--card-bg);
  color: var(--text-secondary);
}

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

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

/* 三栏文章区 */
.three-col-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.col-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.col-section ul {
  list-style: none;
}

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

.col-section a {
  color: var(--text-secondary);
  font-size: 14px;
}

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

/* 页脚 */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 40px;
}

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

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* 404 页面 */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

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

.error-title {
  font-size: 24px;
  font-weight: 600;
  margin: 24px 0 16px;
}

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

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

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

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

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

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    gap: 16px;
  }

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

  .search-box {
    width: 100%;
    order: 2;
  }

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

  .stats-grid {
    grid-template-columns: 1fr;
    margin-top: -20px;
  }

  .category-grid,
  .article-list,
  .three-col-section {
    grid-template-columns: 1fr;
  }

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

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
}