/* ========================================
   球鞋文化 - 全局样式
   www.qiuxiepingce.cn
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #e91e63;
  --primary-dark: #1a1a2e;
  --secondary-dark: #16213e;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --bg-gray: #eee;
  --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-sm: 4px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

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

ul {
  list-style: none;
}

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

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

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

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

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

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

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

/* ========================================
   页脚 Footer
   ======================================== */
.footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 48px 20px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

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

.footer-brand p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
}

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

.footer-links a {
  color: #aaa;
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}

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

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

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

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

.breadcrumb span {
  margin: 0 8px;
}

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

/* ========================================
   卡片组件
   ======================================== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.card-content {
  padding: 20px;
}

.card-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

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

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

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

/* ========================================
   特色文章卡片
   ======================================== */
.card-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.card-featured .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
  padding: 40px 24px 24px;
}

.card-featured .card-title {
  font-size: 1.4rem;
  color: #fff;
}

.card-featured .card-meta {
  color: rgba(255,255,255,0.8);
}

/* ========================================
   文章列表项
   ======================================== */
.list-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.list-item-image {
  width: 100px;
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.list-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-item-title:hover {
  color: var(--accent-color);
}

.list-item-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ========================================
   侧边栏组件
   ======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* 作者卡片 */
.author-card {
  text-align: center;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.author-role {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.author-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.tag:hover {
  background: var(--accent-color);
  color: #fff;
}

/* ========================================
   首页布局
   ======================================== */
.home-section {
  margin-bottom: 48px;
}

/* 头条区域 */
.headline-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.headline-main .card-image {
  aspect-ratio: 16/10;
}

.headline-main .card-title {
  font-size: 1.6rem;
}

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

.headline-sidebar .card {
  flex: 1;
}

.headline-sidebar .card-image {
  aspect-ratio: 16/9;
}

.headline-sidebar .card-title {
  font-size: 0.95rem;
}

/* 特色文章网格 */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.feature-large {
  grid-row: span 2;
}

.feature-large .card-image {
  aspect-ratio: 3/4;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.view-all {
  font-size: 0.9rem;
  color: var(--accent-color);
  font-weight: 500;
}

/* 三栏文章列表 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.column-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

/* ========================================
   分类页布局
   ======================================== */
.category-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.category-info {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.category-info h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.category-info p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.category-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

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

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 文章网格 */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.lead-story {
  grid-column: span 1;
  grid-row: span 2;
}

.lead-story .card-image {
  aspect-ratio: 3/4;
}

/* ========================================
   文章详情页
   ======================================== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.article-main {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

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

.article-category {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(233, 30, 99, 0.1);
  color: var(--accent-color);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.article-meta-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-meta-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.article-cover {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.article-body h3 {
  font-size: 1.25rem;
  margin: 32px 0 16px;
}

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

.article-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 24px 0;
}

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

.article-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.article-tags-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* 相关文章推荐 */
.related-section {
  margin-top: 48px;
}

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

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

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

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

.error-title {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

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

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.3s;
}

.btn:hover {
  background: #c2185b;
}

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

  .headline-sidebar {
    flex-direction: row;
  }

  .headline-sidebar .card {
    flex: 1;
  }

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

  .feature-large {
    grid-row: span 1;
  }

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

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

  .lead-story {
    grid-column: span 1;
    grid-row: span 1;
  }

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

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .headline-sidebar {
    flex-direction: column;
  }

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

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

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

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

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

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

  .article-main {
    padding: 24px;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .error-code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

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