/* ========================================
   球鞋文化 - 杂志博客风格样式
   www.qiuwenhua.cn
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #e91e63;
  --accent-dark: #c2185b;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --bg-dark: #1a1a1a;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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 {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* ========================================
   通用组件
   ======================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

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

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

.card-image {
  position: relative;
  overflow: hidden;
}

.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: 1rem;
}

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

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

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

.list-item-image {
  width: 80px;
  height: 60px;
  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.9375rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  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.8125rem;
  color: var(--text-muted);
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

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

/* 面包屑 */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.breadcrumb span {
  margin: 0 0.5rem;
}

/* ========================================
   Header 页头
   ======================================== */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

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

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

/* ========================================
   Footer 页脚
   ======================================== */

.footer {
  background: var(--bg-dark);
  color: var(--bg-white);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

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

.footer-brand .logo-text {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  padding: 0.375rem 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========================================
   首页 - Hero 区域
   ======================================== */

.hero-section {
  padding: 2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.hero-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;
}

.hero-main .card-image {
  position: absolute;
  inset: 0;
}

.hero-main .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--bg-white);
  padding: 2rem;
}

.hero-main .card-category {
  color: var(--accent-color);
}

.hero-main .card-title {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.hero-main .card-excerpt {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-sidebar .card {
  flex: 1;
  min-height: 120px;
}

.hero-sidebar .card-image {
  height: 120px;
}

/* ========================================
   首页 - 特色文章网格
   ======================================== */

.features-section {
  padding: 2rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

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

.feature-large .card-image {
  height: 100%;
  min-height: 400px;
}

.feature-large .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--bg-white);
}

.feature-item .card-image {
  height: 180px;
}

/* ========================================
   三栏推荐区域
   ======================================== */

.recommend-section {
  padding: 2rem 0;
  background: var(--bg-white);
  margin-top: 2rem;
}

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

.recommend-column h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

/* ========================================
   分类页样式
   ======================================== */

.category-hero {
  background: var(--bg-dark);
  color: var(--bg-white);
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.category-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.category-info h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.category-info p {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.category-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-color);
}

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

.category-sidebar .widget {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.subcategory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 分类内容网格 */
.category-content {
  padding: 2rem 0;
}

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

.category-grid .card-image {
  height: 200px;
}

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

.category-grid .lead-story .card-image {
  height: 100%;
  min-height: 400px;
}

.category-grid .lead-story .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--bg-white);
}

/* ========================================
   文章详情页
   ======================================== */

.article-header {
  padding: 2rem 0;
  background: var(--bg-white);
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-category {
  background: var(--accent-color);
  color: var(--bg-white);
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.article-date {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.article-excerpt {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-hero-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}

/* 文章主体 */
.article-body {
  padding: 3rem 0;
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

.article-content {
  font-size: 1.125rem;
  line-height: 1.9;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

.article-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

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

/* 文章侧边栏 */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
}

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.author-card {
  text-align: center;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
}

.author-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ========================================
   404 页面
   ======================================== */

.error-page {
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

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

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

.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

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

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

/* ========================================
   响应式设计
   ======================================== */

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

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

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

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

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

  .feature-large .card-image {
    min-height: 250px;
  }

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

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

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

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

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

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

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

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

  .hero-main {
    min-height: 300px;
  }

  .hero-main .card-title {
    font-size: 1.25rem;
  }

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

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

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

  .category-info h1 {
    font-size: 1.75rem;
  }

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

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

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

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

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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