/* 电竞显示器 - 样式文件 */
/* 页面风格: tutorial (教程风格) */
/* 主色调: #20c997 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #20c997;
  --accent-dark: #1ba87e;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #212529;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-light: #ffffff;
  --border-color: #dee2e6;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

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

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

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

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

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

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

.nav a {
  color: var(--text-primary);
  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-secondary);
  border-radius: var(--radius);
  padding: 8px 16px;
  gap: 8px;
}

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

.search-box button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

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

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #343a40 100%);
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

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

.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-keywords {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.keyword-tag {
  background: rgba(32, 201, 151, 0.2);
  color: var(--accent-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid var(--accent-color);
}

/* ===== Stats Section ===== */
.stats-section {
  padding: 40px 0;
  background: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* ===== Content Section ===== */
.content-section {
  padding: 48px 0;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

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

.card-image {
  width: 100%;
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-progress {
  margin-top: 12px;
}

.progress-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: 3px;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg-secondary);
}

.card-status.completed {
  background: rgba(32, 201, 151, 0.1);
  color: var(--accent-color);
}

/* ===== List Section ===== */
.list-section {
  padding: 48px 0;
  background: var(--bg-secondary);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.list-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.list-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.list-card ul {
  list-style: none;
}

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

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

.list-card a {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.list-card a::before {
  content: '•';
  color: var(--accent-color);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

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

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

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

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

/* ===== Category Header ===== */
.category-header {
  padding: 48px 0 32px;
  text-align: center;
}

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

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

.category-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

/* ===== Article List ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}

.article-item:hover {
  transform: translateX(4px);
}

.article-thumb {
  width: 160px;
  height: 100px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.article-info {
  flex: 1;
}

.article-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Article Page ===== */
.article-header {
  padding: 48px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-meta-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

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

.article-content h3 {
  font-size: 1.25rem;
  margin: 32px 0 16px;
  color: var(--accent-color);
}

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

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

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

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

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

/* ===== Progress Box ===== */
.progress-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
}

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

.progress-box-title {
  font-weight: 600;
}

.progress-box-status {
  font-size: 14px;
  color: var(--accent-color);
  font-weight: 500;
}

/* ===== Related Section ===== */
.related-section {
  background: var(--bg-secondary);
  padding: 48px 0;
  margin-top: 48px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.related-card-thumb {
  height: 120px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.related-card-body {
  padding: 16px;
}

.related-card-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.related-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

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

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

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

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

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

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

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 48px 0 24px;
}

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

.footer-brand p {
  color: rgba(255,255,255,0.7);
  margin-top: 12px;
  font-size: 14px;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  list-style: none;
}

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

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

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

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .card-grid,
  .list-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  .search-box {
    display: none;
  }

  .hero {
    padding: 48px 0;
  }

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

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

  .card-grid,
  .list-grid {
    grid-template-columns: 1fr;
  }

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

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

  .article-thumb {
    width: 100%;
    height: 160px;
  }

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

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

@media (max-width: 480px) {
  .hero-keywords {
    gap: 8px;
  }

  .keyword-tag {
    font-size: 12px;
    padding: 6px 12px;
  }

  .filter-tabs {
    gap: 6px;
  }

  .filter-tab {
    padding: 8px 14px;
    font-size: 13px;
  }

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

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