/* VR头显 - 资讯风格样式表 */
/* 查询关键词: VR头显 www.vrwanji.cn 提供VR游戏头显的评测 推荐及最新VR游戏资讯 涵盖多人游戏 */

/* CSS 变量 */
:root {
  --accent-color: #d63384;
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --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 {
  scroll-behavior: smooth;
}

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-secondary);
}

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 16px;
}

/* 头部 */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

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

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

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

.nav a {
  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: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

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

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 180px;
  font-size: 0.9rem;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* 主体布局 - 三栏 */
.main-wrapper {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 24px;
}

/* 侧边栏通用 */
.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 88px;
  height: fit-content;
}

.widget {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

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

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

/* 左侧导航 */
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all 0.2s;
  margin-bottom: 4px;
}

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

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

/* 分类列表 */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
}

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

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

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

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

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

.tag.hot {
  background: #fef3f2;
  color: #dc2626;
}

/* 内容列表 */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.content-item:hover {
  box-shadow: var(--shadow-md);
}

.content-item .thumb {
  width: 160px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

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

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

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

.content-item .desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

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

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

.content-item .category-tag {
  display: inline-block;
  padding: 2px 10px;
  background: #eef2ff;
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 0.8rem;
}

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

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

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

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

.hot-item:nth-child(1)::before {
  background: #fef3f2;
  color: #dc2626;
}

.hot-item:nth-child(2)::before {
  background: #fff7ed;
  color: #ea580c;
}

.hot-item:nth-child(3)::before {
  background: #fefce8;
  color: #ca8a04;
}

.hot-item .title {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hot-item .views {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 推荐列表 */
.rec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rec-item {
  display: flex;
  gap: 12px;
}

.rec-item .thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.rec-item .title {
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* 首页 Hero */
.hero {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  border-radius: var(--radius-lg);
  padding: 40px;
  color: white;
  margin-bottom: 24px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

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

/* 特色内容 */
.featured-section {
  margin-bottom: 24px;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.view-more:hover {
  text-decoration: underline;
}

/* 特色卡片 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.featured-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.featured-card .thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.featured-card .info {
  padding: 16px;
}

.featured-card .category {
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-bottom: 8px;
}

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

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

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

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

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

/* 分类页标题 */
.category-header {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.category-header h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 筛选器 */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.pagination a {
  background: var(--bg-primary);
  color: var(--text-secondary);
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
}

.pagination .current {
  background: var(--accent-color);
  color: white;
}

.pagination .disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* 文章页 */
.article-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 1.75rem;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  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: 600;
  font-size: 0.95rem;
}

.article-meta .author-bio {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-meta .date,
.article-meta .views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-cover {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

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

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

.article-content h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
}

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

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

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

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

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

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* 文章标签 */
.article-tags {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

/* 分享按钮 */
.share-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* 目录 */
.toc {
  position: sticky;
  top: 88px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.toc-list a:hover,
.toc-list a.active {
  background: var(--bg-secondary);
  color: var(--accent-color);
}

.toc-list a.level-2 {
  padding-left: 24px;
  font-size: 0.85rem;
}

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

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

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

.author-card .bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.author-card .stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

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

.author-card .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
}

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

/* 相关文章 */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-item {
  display: flex;
  gap: 12px;
}

.related-item .thumb {
  width: 70px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.related-item .title {
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.error-code {
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* 页脚 */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 48px 0 24px;
  margin-top: 48px;
}

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

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

.footer-brand p {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

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

  .sidebar-left {
    display: none;
  }

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

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

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

  .mobile-menu-btn {
    display: block;
  }

  .main-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    display: none;
  }

  .hero {
    padding: 24px;
  }

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

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

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

  .content-item .thumb {
    width: 100%;
    height: 180px;
  }

  .article-container {
    padding: 20px;
  }

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

  .article-cover {
    height: 200px;
  }

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

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

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

@media (max-width: 480px) {
  .container,
  .main-wrapper {
    padding: 0 12px;
  }

  .widget {
    padding: 16px;
  }

  .article-content {
    font-size: 1rem;
  }

  .pagination {
    flex-wrap: wrap;
  }
}
