/* ===== 红酒网站样式 - www.pujiushang.cn ===== */
/* 主色调: 红酒色 #722F37, 强调色 #8B0000 */

/* ===== CSS 变量 ===== */
:root {
  --primary-color: #722F37;
  --accent-color: #8B0000;
  --gold-color: #C9A227;
  --bg-color: #FAFAFA;
  --card-bg: #FFFFFF;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #E8E8E8;
  --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: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

/* ===== 页头 ===== */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: #fff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

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

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

.nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.nav a:hover {
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 6px 15px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  width: 150px;
  font-size: 14px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

/* ===== Profile Banner ===== */
.profile-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #4A1A23 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--gold-color);
  margin: 0 auto 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

.profile-name {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 25px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 25px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

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

.btn-primary:hover {
  background: #D4AF37;
  color: #333;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: var(--card-bg);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

.breadcrumb-separator {
  color: var(--text-muted);
}

/* ===== 内容区域 ===== */
.content {
  padding: 40px 0;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ===== 卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

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

/* ===== 内容列表 ===== */
.content-list {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

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

.list-item:hover {
  background: #FAFAFA;
}

.list-item-image {
  width: 160px;
  height: 120px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.list-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.list-item-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.list-item-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-item-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.page-item {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-item.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.page-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 文章详情 ===== */
.article-header {
  text-align: center;
  margin-bottom: 30px;
}

.article-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.article-featured-image {
  width: 100%;
  max-width: 800px;
  height: 400px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: var(--radius);
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

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

.article-content h2 {
  font-size: 24px;
  font-weight: bold;
  margin: 30px 0 15px;
  color: var(--primary-color);
}

.article-content h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 25px 0 12px;
}

/* ===== 侧边栏区域 ===== */
.sidebar-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-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 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
}

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

.sidebar-list .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

/* ===== 分类头部 ===== */
.category-header {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  text-align: center;
}

.category-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
}

.category-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.category-stat {
  text-align: center;
}

.category-stat .num {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

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

/* ===== 推荐区域 ===== */
.recommend-section {
  margin-top: 40px;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

/* ===== 404页面 ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

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

.error-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
}

.error-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 400px;
}

.error-actions {
  display: flex;
  gap: 15px;
}

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

.error-actions .btn-primary:hover {
  background: var(--accent-color);
}

/* ===== 页脚 ===== */
.footer {
  background: #2C2C2C;
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

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

.footer-brand p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--gold-color);
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
}

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

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

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

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

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

  .profile-banner {
    padding: 40px 0;
  }

  .profile-name {
    font-size: 24px;
  }

  .profile-stats {
    gap: 20px;
  }

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

  .list-item {
    flex-direction: column;
  }

  .list-item-image {
    width: 100%;
    height: 180px;
  }

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

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

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

  .article-featured-image {
    height: 250px;
  }

  .error-code {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  .profile-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    justify-content: center;
  }

  .category-stats {
    flex-direction: column;
    gap: 15px;
  }

  .pagination {
    flex-wrap: wrap;
  }
}
