/* 游戏周边 - 极简博客风格样式表 */
/* 变量定义 */
:root {
  --accent-color: #333333;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --border-color: #e5e5e5;
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  --max-width: 680px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --line-height: 1.8;
}

/* 重置样式 */
*, *::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: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

ul, ol {
  list-style: none;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 页头 */
.header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.logo a {
  color: inherit;
}

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

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

.nav a:hover {
  color: var(--text-primary);
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-box input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  width: 180px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-color);
}

.search-box button {
  padding: 0.5rem 1rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
}

/* 主内容区 */
.main {
  min-height: calc(100vh - 300px);
}

/* Hero 区域 */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* 区块标题 */
.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* 内容列表 */
.content-list {
  margin-bottom: 3rem;
}

.content-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.content-item:first-child {
  padding-top: 0;
}

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

.content-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.content-title a {
  color: var(--text-primary);
}

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

.content-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.content-meta span {
  margin-right: 1rem;
}

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

/* 特色内容 */
.featured-list {
  margin-bottom: 3rem;
}

.featured-item {
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.featured-item:last-child {
  margin-bottom: 0;
}

.featured-item .content-title {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.featured-item .content-meta {
  margin-bottom: 0;
}

/* 侧边栏区块 */
.widget {
  margin-bottom: 3rem;
}

.widget-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-item {
  font-size: 0.9375rem;
}

.widget-item a {
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.widget-item a::before {
  content: "•";
  color: var(--text-muted);
}

.widget-item a:hover {
  color: var(--link-color);
}

.widget-item .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

/* 文章页样式 */
.article-header {
  text-align: center;
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

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

.article-meta span {
  margin: 0 0.5rem;
}

.article-featured-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
}

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

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

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--accent-color);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--accent-color);
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

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

.article-body li {
  margin-bottom: 0.5rem;
}

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

.article-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.article-tags a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-tags a:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* 相关文章 */
.related-posts {
  margin-top: 3rem;
}

.related-posts .post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.post-nav-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.post-nav-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.post-nav-item a {
  font-weight: 600;
  color: var(--text-primary);
}

.post-nav-item a:hover {
  color: var(--link-color);
}

.post-nav-item.next {
  text-align: right;
}

/* 分类页头部 */
.category-header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.category-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.category-desc {
  font-size: 1rem;
  color: var(--text-secondary);
}

.category-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--border-color);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

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

.error-actions a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 0.9375rem;
}

.error-actions a:hover {
  background: var(--text-primary);
  color: white;
}

/* 页脚 */
.footer {
  padding: 3rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    --max-width: 100%;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    flex: 1;
    width: auto;
  }

  .hero {
    padding: 2rem 0;
  }

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

  .hero p {
    font-size: 1rem;
  }

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

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

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

  .post-nav-item.next {
    text-align: left;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .content-title {
    font-size: 1.125rem;
  }

  .featured-item {
    padding: 1rem;
  }
}
