/** 死亡游戏 - 系列教程风格样式表
 * 主色调: #4caf50 (绿色)
 * 风格: tutorial-series
 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #4caf50;
  --accent-dark: #388e3c;
  --accent-light: #81c784;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --text-primary: #eaeaea;
  --text-secondary: #a0a0a0;
  --text-muted: #6c757d;
  --border-color: #2d3561;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --success-color: #27ae60;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 70px;
}

/* ===== 重置与基础 ===== */
*, *::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;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

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

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

/* ===== 页头 ===== */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.logo::before {
  content: '☠';
  font-size: 1.8rem;
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 8px 16px;
  border: 1px solid var(--border-color);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 180px;
}

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

.search-box button {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 1.1rem;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  padding: 80px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

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

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

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 8px;
}

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

/* ===== 区块标题 ===== */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card-meta {
  display: flex;
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* ===== 系列卡片 ===== */
.series-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  transition: all 0.3s ease;
}

.series-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.series-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.series-card h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.series-card .badge {
  background: var(--accent-color);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.series-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.series-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ===== 网格布局 ===== */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.article-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.article-item.completed {
  border-left: 3px solid var(--success-color);
}

.article-number {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent-color);
  flex-shrink: 0;
}

.article-item.completed .article-number {
  background: var(--success-color);
  color: white;
}

.article-info {
  flex: 1;
}

.article-info h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.article-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.check-mark {
  color: var(--success-color);
  font-size: 1.2rem;
  margin-left: 10px;
}

/* ===== 内容区域 ===== */
.content-section {
  padding: 40px 0;
}

.content-section.alt {
  background: var(--bg-secondary);
}

/* ===== 系列信息区 ===== */
.series-info {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.series-info-header {
  display: flex;
  gap: 30px;
  margin-bottom: 24px;
}

.series-cover {
  width: 200px;
  height: 280px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 4rem;
  flex-shrink: 0;
}

.series-info-content {
  flex: 1;
}

.series-info h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.series-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.series-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== 文章正文 ===== */
.article-header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

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

.article-series-info {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 40px 0 20px;
  color: var(--accent-color);
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 30px 0 15px;
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: var(--text-secondary);
}

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

.article-content img {
  border-radius: var(--radius);
  margin: 30px 0;
  box-shadow: var(--shadow);
}

.featured-image {
  width: 100%;
  aspect-ratio: 21/9;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 4rem;
  margin-bottom: 40px;
}

/* ===== 导航按钮 ===== */
.part-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  margin: 40px 0;
  border: 1px solid var(--border-color);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

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

.nav-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-btn.disabled:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.series-progress {
  text-align: center;
}

.progress-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.progress-bar-large {
  width: 200px;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

/* ===== 侧边栏列表 ===== */
.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.sidebar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.sidebar-list a {
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.sidebar-list .count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== 三栏底部 ===== */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.column h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.column ul {
  list-style: none;
}

.column li {
  padding: 8px 0;
}

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

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

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

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

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

/* ===== 404页面 ===== */
.error-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

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

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 20px;
  text-shadow: 0 0 40px rgba(76, 175, 80, 0.3);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-dark);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

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

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

  .series-info-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .series-cover {
    width: 160px;
    height: 220px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
  }

  .search-box {
    width: auto;
  }

  .search-box input {
    width: 120px;
  }

  .hero {
    padding: 50px 0;
  }

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

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

  .hero-meta {
    flex-direction: column;
    gap: 10px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .series-info {
    padding: 20px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .part-navigation {
    flex-direction: column;
    gap: 16px;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
  }

  .article-item {
    flex-direction: column;
    text-align: center;
  }

  .article-meta {
    text-align: center;
  }

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

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

  .section-title {
    font-size: 1.2rem;
  }

  .card-body {
    padding: 15px;
  }

  .sidebar-section {
    padding: 16px;
  }
}
