/* ========================================
   滑雪装备 - 资讯风格样式表
   www.zixinglvyou.cn
   ======================================== */

/* CSS 变量定义 */
:root {
  --accent-color: #d63384;
  --primary-color: #1a5f9e;
  --secondary-color: #2c3e50;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #f5f7fa;
  --bg-white: #fff;
  --border-color: #e8ecf1;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1200px;
  --header-height: 70px;
}

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

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-color);
  background-color: var(--bg-color);
}

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

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

ul, ol {
  list-style: none;
}

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

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

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 三栏布局 */
.three-column {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 24px;
  padding: 24px 0;
}

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

/* 导航 */
.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s;
}

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

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: 24px;
  padding: 4px;
  border: 1px solid var(--border-color);
}

.search-box input {
  border: none;
  background: transparent;
  padding: 8px 16px;
  width: 200px;
  outline: none;
  font-size: 0.9rem;
}

.search-box button {
  border: none;
  background: var(--primary-color);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.search-box button:hover {
  background: var(--accent-color);
}

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

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

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

.hero-keywords {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-keywords span {
  background: rgba(255,255,255,0.2);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* ========================================
   侧边栏 Sidebar
   ======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-left {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: fit-content;
}

.sidebar-right {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: fit-content;
}

/* 侧边栏模块 */
.widget {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 1rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-header::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--accent-color);
  border-radius: 2px;
}

.widget-content {
  padding: 16px 20px;
}

/* 导航菜单 */
.nav-menu li {
  margin-bottom: 4px;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-color);
  transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--bg-color);
  color: var(--primary-color);
}

.nav-menu .icon {
  width: 20px;
  text-align: center;
}

/* 分类列表 */
.category-list li {
  border-bottom: 1px solid var(--border-color);
}

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

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  color: var(--text-color);
}

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

.category-list .count {
  background: var(--bg-color);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* 文章列表 */
.post-list li {
  margin-bottom: 16px;
}

.post-list li:last-child {
  margin-bottom: 0;
}

.post-list a {
  display: block;
  color: var(--text-color);
}

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

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

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

/* 热门排行 */
.hot-list {
  counter-reset: hot-rank;
}

.hot-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.hot-list li::before {
  counter-increment: hot-rank;
  content: counter(hot-rank);
  width: 24px;
  height: 24px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
}

.hot-list li:nth-child(-n+3)::before {
  background: var(--accent-color);
  color: #fff;
}

.hot-list .hot-title {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-color);
}

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

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

.tag-cloud a {
  padding: 6px 14px;
  background: var(--bg-color);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  transition: all 0.3s;
}

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

/* ========================================
   主内容区 Main
   ======================================== */
.main {
  min-width: 0;
}

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

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

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 2px;
}

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

.card-more:hover {
  color: var(--accent-color);
}

.card-body {
  padding: 24px;
}

/* 特色文章 */
.featured-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.featured-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius);
  transition: all 0.3s;
}

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

.featured-item .thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.featured-item .content {
  display: flex;
  flex-direction: column;
}

.featured-item .category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(214, 51, 132, 0.1);
  color: var(--accent-color);
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  width: fit-content;
}

.featured-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--secondary-color);
}

.featured-item .excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.featured-item .meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

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

.article-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-item .thumb-wrap {
  position: relative;
}

.article-item .thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.article-item .content {
  display: flex;
  flex-direction: column;
}

.article-item h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-item h4 a {
  color: var(--text-color);
}

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

.article-item .excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.article-item .meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

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

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

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

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

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumb {
  background: var(--bg-white);
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--text-muted);
}

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

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

.breadcrumb li:last-child {
  color: var(--text-color);
  font-weight: 500;
}

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

.category-header h1 {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.category-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
}

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

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

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

/* ========================================
   文章详情页
   ======================================== */
.article-header {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.article-title {
  font-size: 1.8rem;
  color: var(--secondary-color);
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

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

.article-meta .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.article-meta .author-info {
  display: flex;
  flex-direction: column;
}

.article-meta .author-name {
  font-weight: 500;
  color: var(--text-color);
}

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

.article-meta .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-meta .tag {
  padding: 4px 12px;
  background: var(--bg-color);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 文章内容 */
.article-content {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 1.25rem;
  color: var(--secondary-color);
  margin: 24px 0 12px;
}

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

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

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding: 16px 24px;
  background: var(--bg-color);
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--text-light);
}

/* 目录 */
.toc {
  background: var(--bg-color);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--secondary-color);
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: var(--text-light);
  font-size: 0.95rem;
}

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

/* 作者卡片 */
.author-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-color);
  border-radius: var(--radius);
  margin-top: 32px;
}

.author-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-card .info {
  flex: 1;
}

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

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

/* ========================================
   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: 8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.8;
}

.error-title {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin-bottom: 16px;
}

.error-desc {
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 400px;
}

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

.btn {
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

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

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

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

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

/* ========================================
   页脚 Footer
   ======================================== */
.footer {
  background: var(--secondary-color);
  color: #fff;
  padding: 48px 0 24px;
  margin-top: auto;
}

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

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

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

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

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

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

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

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

  .sidebar-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-top: 12px;
    justify-content: center;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

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

  .sidebar-right {
    position: static;
    order: 2;
  }

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

  .featured-item .thumb {
    height: 200px;
  }

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

  .article-item .thumb {
    height: 80px;
  }

  .article-item .excerpt {
    display: none;
  }

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

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

@media (max-width: 480px) {
  .nav {
    gap: 4px;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .hero-keywords {
    gap: 8px;
  }

  .hero-keywords span {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .category-stats {
    gap: 24px;
  }

  .article-header,
  .article-content {
    padding: 20px;
  }

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

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

  .error-actions {
    flex-direction: column;
  }
}
