/* ========================================
   家庭影院 - 样式表
   关键词: 家庭影院 www.yingyinle.cn
   ======================================== */

/* CSS 变量定义 */
:root {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #e94560;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --border-color: #2a2a4a;
  --gradient-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(233, 69, 96, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

/* 重置样式 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

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

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* ========================================
   头部导航
   ======================================== */
.header {
  background: var(--gradient-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-card);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(233, 69, 96, 0.1);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  border: 1px solid var(--border-color);
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 200px;
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}

/* ========================================
   英雄区域
   ======================================== */
.hero {
  background: var(--gradient-primary);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(233,69,96,0.1)" stroke-width="0.5"/></svg>') repeat;
  background-size: 100px 100px;
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--accent-color);
}

.hero-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ========================================
   卡片组件
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gradient-accent);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.card-content {
  padding: 20px;
}

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

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

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

/* ========================================
   分类列表
   ======================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

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

.category-item:hover {
  background: var(--secondary-color);
  border-color: var(--accent-color);
  transform: translateY(-4px);
}

.category-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-count {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   文章列表
   ======================================== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.article-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.article-item:hover {
  border-color: var(--accent-color);
}

.article-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-item:hover .article-image img {
  transform: scale(1.05);
}

.article-content {
  padding: 24px 24px 24px 0;
  display: flex;
  flex-direction: column;
}

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

.article-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

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

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

/* ========================================
   文章内容页
   ======================================== */
.article-header {
  background: var(--gradient-primary);
  padding: 60px 0;
  text-align: center;
}

.article-header-category {
  display: inline-block;
  background: var(--gradient-accent);
  color: var(--text-primary);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.article-header h1 {
  font-size: 36px;
  font-weight: 800;
  max-width: 800px;
  margin: 0 auto 24px;
  line-height: 1.3;
}

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

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

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px;
}

.article-featured-image {
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  border-radius: var(--radius-lg);
}

.article-content-body {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.article-content-body h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 20px;
}

.article-content-body h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 16px;
}

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

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

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

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

.article-content-body ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

.article-content-body blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-primary);
}

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

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.page-link:hover,
.page-link.active {
  background: var(--gradient-accent);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

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

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

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

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

.breadcrumb-current {
  color: var(--text-primary);
}

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

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

.error-code {
  font-size: 120px;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}

.error-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.error-message {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
  background: var(--primary-color);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color);
}

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

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 15px;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

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

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

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

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .nav {
    display: none;
  }

  .search-box {
    display: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

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

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

  .article-image {
    aspect-ratio: 16 / 9;
  }

  .article-content {
    padding: 20px;
  }

  .article-header h1 {
    font-size: 28px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

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

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

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

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

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

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .article-header h1 {
    font-size: 24px;
  }

  .article-content-body {
    font-size: 16px;
  }

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