/* 电竞竞猜 - 主站样式 | 符合语义化与可访问性 */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-accent: #f59e0b;
  --color-bg: #0f172a;
  --color-bg-card: #1e293b;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max-width: 1200px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* 站点头部 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem 1rem;
}
.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  height: 48px;
  width: auto;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-nav a {
  color: var(--color-text);
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* 移动端：汉堡按钮 + 居中「电竞竞猜」 */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 4px;
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255,255,255,0.08);
  color: var(--color-text);
}
.menu-toggle-icon {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.menu-toggle-icon::before {
  top: -6px;
}
.menu-toggle-icon::after {
  top: 6px;
}
.header-brand {
  display: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  flex: 1;
  text-align: center;
}
.header-brand:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* 右侧抽屉：仅移动端使用，桌面端不渲染 */
.drawer-overlay,
.drawer {
  display: none;
}

/* 仅移动端：头部改为「电竞竞猜」居中 + 右侧汉堡，抽屉从右侧滑出 */
@media (max-width: 768px) {
  /* 隐藏桌面用 Logo 和导航，只保留居中品牌 + 右侧汉堡 */
  .site-header .header-logo,
  .site-header .site-nav {
    display: none !important;
  }
  .site-header .header-brand {
    display: block !important;
    order: 1;
    flex: 1;
    min-width: 0;
    text-align: center;
  }
  .site-header .menu-toggle {
    display: flex !important;
    order: 2;
    flex-shrink: 0;
  }
  .site-header .inner {
    justify-content: flex-start;
  }

  /* 移动端才显示抽屉与遮罩 */
  .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
  }
  .drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .drawer {
    display: block;
    position: fixed;
    top: 0;
    left: auto;
    right: 0;
    z-index: 160;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    direction: ltr;
    background: var(--color-bg-card);
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -4px 0 24px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 1rem 0 2rem;
  }
  .drawer.is-open {
    transform: translateX(0);
  }
  .drawer-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
  }
  .drawer-close:hover,
  .drawer-close:focus-visible {
    background: rgba(255,255,255,0.08);
  }
  .drawer-nav ul {
    list-style: none;
    margin: 0;
    padding: 2.5rem 1.25rem 0;
  }
  .drawer-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .drawer-nav a {
    display: block;
    padding: 0.9rem 0;
    color: var(--color-text);
    font-weight: 500;
    font-size: 1rem;
  }
  .drawer-nav a:hover {
    color: var(--color-accent);
    text-decoration: none;
  }
}

/* 无障碍：跳转主内容 */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* 首页主横幅 */
.hero {
  position: relative;
  width: 100%;
  min-height: 280px;
  max-height: 520px;
  overflow: hidden;
  background: var(--color-bg-card);
}
.hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
}
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}
.hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}
.hero-desc {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
}

/* 主内容区 */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* 区块通用 */
.section {
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.section:last-of-type {
  border-bottom: none;
}
.inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-title {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
  color: var(--color-text);
}
.section-desc {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
  max-width: 65ch;
}
.intro-content p {
  margin: 0 0 1rem;
  max-width: 72ch;
}
.intro-content p:last-child {
  margin-bottom: 0;
}

/* 页标题 */
.page-title {
  font-size: 1.75rem;
  margin: 0 0 1rem;
  line-height: 1.3;
}

/* 卡片 */
.card {
  background: var(--color-bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.card-title {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}
.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card-grid .card-item {
  margin: 0;
}
.card-grid .card {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card-grid .card p {
  margin: 0;
  flex: 1;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.content-block {
  max-width: 72ch;
}
.content-block ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.content-block li {
  margin-bottom: 0.5rem;
}
.link-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.link-list li {
  margin-bottom: 0.75rem;
  padding-left: 0;
}
.link-list a {
  color: var(--color-text);
  font-weight: 500;
}
.link-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.game-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 65ch;
}
.game-list li {
  margin-bottom: 0.5rem;
}

/* 本页内容（目录）：谷歌建议长页提供目录便于浏览 */
.section-toc {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.toc-title {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem 1.5rem;
}
.toc-list a {
  color: var(--color-text);
  font-size: 0.9375rem;
}
.toc-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  margin-left: 0.5rem;
}
.btn-outline:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-text);
}

/* 表单 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
}
label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
}

/* 文章列表 */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.article-list li:last-child {
  border-bottom: none;
}
.article-list a {
  color: var(--color-text);
  font-weight: 500;
}
.article-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.article-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* 文章内页：面包屑、作者/时间、相关阅读、免责声明 */
.breadcrumb {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.breadcrumb a {
  color: var(--color-text-muted);
}
.breadcrumb a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.breadcrumb [aria-current="page"] {
  color: var(--color-text);
}
.article-header {
  margin-bottom: 1.5rem;
}
.article-byline {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.article-meta-sep {
  margin: 0 0.5rem;
  opacity: 0.7;
}
.article-body {
  margin-bottom: 1.5rem;
}
.article-body h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}
.article-body h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}
.article-body ul,
.article-body ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.5rem;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}
.article-body th,
.article-body td {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.article-body th {
  background: rgba(255,255,255,0.05);
  font-weight: 600;
}
.related-reading {
  margin-bottom: 1.5rem;
}
.related-reading .section-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}
.related-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-links li {
  margin-bottom: 0.5rem;
}
.related-links a {
  color: var(--color-text);
}
.related-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.article-disclaimer {
  margin-bottom: 1.5rem;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}
.article-disclaimer .section-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}
.article-disclaimer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.article-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.article-list-item .article-list-title {
  flex: 1;
  min-width: 0;
  order: 1;
}
.article-list-item .article-actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  order: 2;
}
.article-list-item .article-meta {
  width: 100%;
  margin-top: 0;
  order: 3;
}
.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}
.btn-danger {
  background: #b91c1c;
  color: #fff;
}
.btn-danger:hover {
  background: #991b1b;
  color: #fff;
  text-decoration: none;
}

/* 页脚 */
.site-footer {
  margin-top: 0;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}
.site-footer a {
  color: var(--color-text-muted);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-nav ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}
.footer-nav a:hover {
  color: var(--color-text);
}
.footer-copy {
  margin: 0;
}

/* 结构化数据 / 无障碍：隐藏仅给爬虫看的内容 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* FAQ 列表 */
.faq-list dt {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.faq-list dd {
  margin: 0;
  color: var(--color-text-muted);
}
.faq-inline dd {
  margin-bottom: 0.75rem;
}
.faq-inline dt:not(:first-child) {
  margin-top: 1.25rem;
}
