/* ---- CSS 自定义属性 ---- */
:root {
  --a-accent: #f3b014;
  --a-accent-glow: rgba(243, 176, 20, 0.6);
  --a-accent-dim: rgba(243, 176, 20, 0.12);
  --a-accent-fade: rgba(243, 176, 20, 0.06);
  --a-bg-card: rgba(255, 255, 255, 0.02);
  --a-bg-card-hover: rgba(255, 255, 255, 0.035);
  --a-border: rgba(255, 255, 255, 0.07);
  --a-border-light: rgba(255, 255, 255, 0.04);
  --a-text: rgba(255, 255, 255, 0.88);
  --a-text-dim: rgba(255, 255, 255, 0.68);
  --a-text-muted: rgba(255, 255, 255, 0.35);
  --a-severity-warn: #f3b014;
  --a-severity-mute: #ff8c42;
  --a-severity-act: #e8491d;
  --a-severity-sev: #ff3333;
  --a-gap: 40px;
  --a-radius: 8px;
  --a-radius-sm: 4px;
  --a-font-sans: "Barlow", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --a-font-mono: "Cascadia Code", "Fira Code", "JetBrains Mono", Consolas, monospace;
}

/* 尊重系统减少动效设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

/* ============================================================
   1. 英雄区 (Hero)
   ============================================================ */
.about-page .section-title {
  margin-bottom: 50px;
  position: relative;
}

.about-page .about-title {
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.15em;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.about-page .about-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--a-accent), transparent);
  margin: 16px auto 0;
  border-radius: 2px;
}

.about-page .about-title .hl {
  font-family: "Impact", "Arial Black", sans-serif;
  letter-spacing: 0.18em;
  color: var(--a-accent);
  text-shadow: 0 0 30px rgba(243, 176, 20, 0.3);
}

.about-page .section-title .subtitle {
  display: block;
  color: var(--a-text-dim);
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  letter-spacing: 0.12em;
  font-weight: 300;
  margin-top: 8px;
}

.rules-content {
  flex: 1;
  min-width: 0;
}

/* ---- 2c. 服务器公告横幅（温馨提示） ---- */
.server-notice {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: linear-gradient(135deg, rgba(243,176,20,0.10) 0%, rgba(243,176,20,0.03) 100%);
  border: 1px solid rgba(243,176,20,0.15);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 36px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.server-notice:hover {
  background: linear-gradient(135deg, rgba(243,176,20,0.13) 0%, rgba(243,176,20,0.05) 100%);
  border-color: rgba(243,176,20,0.25);
}
.sn-badge {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.sn-label {
  font-weight: 700;
  color: #c9b458;
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sn-text {
  color: rgba(255, 255, 255, 0.70);
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.03em;
}
@media (max-width: 768px) {
  .server-notice {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 16px;
    gap: 12px;
    margin-bottom: 24px;
  }
  .sn-badge { font-size: 24px; }
  .sn-text { font-size: 13px; }
}

/* ============================================================
   3. Widget 卡片（规则组）
   ============================================================ */
.about-page .widget {
  margin-bottom: 36px;
  padding: 0;
  background: transparent;
  border: none;
}

/* 规则组卡片 */
.about-page .widget.rules-card {
  padding: 32px 36px 28px;
  margin-bottom: 28px;
  background: var(--a-bg-card);
  border: 1px solid var(--a-border-light);
  border-radius: var(--a-radius);
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.about-page .widget.rules-card:hover {
  background: var(--a-bg-card-hover);
  border-color: var(--a-border);
}

/* 金色左侧饰条 */
.about-page .widget.rules-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--a-accent), rgba(243,176,20,0.3));
  border-radius: 0 2px 2px 0;
}

/* 卡片头 */
.about-page .widget_title {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.widget_title .section-label {
  color: #fff;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 规则副标题 */
.about-page .rule-subtitle {
  color: var(--a-text-dim);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-left: 4px;
}

/* ============================================================
   4. 规则条目列表
   ============================================================ */
.about-page .rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-page .rule-item {
  color: #fff;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.8;
  padding: 8px 0 8px 36px;
  position: relative;
  transition: background 0.2s ease;
  border-radius: var(--a-radius-sm);
}

.about-page .rule-item:hover {
  background: var(--a-accent-fade);
}

/* 编号圆圈 */
.about-page .rule-item .rule-num {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--a-accent-dim);
  color: var(--a-accent);
  font-size: 13px;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.about-page .rule-item:hover .rule-num {
  background: var(--a-accent);
  color: #0b1046;
  transform: translateY(-50%) scale(1.1);
}

/* ============================================================
   5. 子规则（后续规则组，无编号）
   ============================================================ */
.sub-rule-widget {
  margin-bottom: 20px !important;
}

.sub-rule-widget .widget_title {
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--a-border-light);
}

.sub-rule-widget .section-label {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 600;
  color: var(--a-accent);
  opacity: 0.75;
  transition: opacity 0.2s;
}

.sub-rule-widget:hover .section-label {
  opacity: 1;
}

/* ============================================================
   6. 处罚阶梯表（Heatmap）
   ============================================================ */
.penalty-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  border-radius: var(--a-radius);
  border: 1px solid var(--a-border-light);
}

.penalty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: var(--a-text);
}

.penalty-table thead th {
  background: var(--a-accent-dim);
  color: var(--a-accent);
  font-weight: 700;
  padding: 14px 18px;
  text-align: center;
  border-bottom: 2px solid var(--a-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 0.9em;
}

.penalty-table thead th:first-child {
  text-align: left;
}

.penalty-table tbody td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--a-border-light);
  vertical-align: middle;
  transition: background 0.2s ease;
}

.penalty-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  min-width: 140px;
}

.penalty-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* 处罚等级颜色 — 热度图风格 */
.p-warn { 
  color: var(--a-severity-warn); 
  background: rgba(243, 176, 20, 0.08);
  font-weight: 600;
}
.p-mute { 
  color: var(--a-severity-mute); 
  background: rgba(255, 140, 66, 0.08);
  font-weight: 600;
}
.p-act { 
  color: var(--a-severity-act); 
  background: rgba(232, 73, 29, 0.08);
  font-weight: 600;
}
.p-sev { 
  color: var(--a-severity-sev); 
  background: rgba(255, 51, 51, 0.1);
  font-weight: 800;
}

/* 直接封禁行 */
.penalty-table tbody tr td[colspan] {
  background: rgba(255, 51, 51, 0.06);
}

.penalty-table tbody tr td[colspan]::before {
  content: '⛔ ';
}

/* ============================================================
   7. FAQ 手风琴
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.faq-item {
  border: 1px solid var(--a-border-light);
  background: var(--a-bg-card);
  border-radius: var(--a-radius);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.faq-item[open] {
  border-color: rgba(243, 176, 20, 0.3);
  background: var(--a-bg-card-hover);
}

.faq-q {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 600;
  padding: 16px 22px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  -webkit-user-select: none;
  user-select: none;
  transition: color 0.2s ease;
}

.faq-q::-webkit-details-marker { display: none; }

.faq-q::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--a-accent-dim);
  color: var(--a-accent);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease;
}

.faq-item[open] .faq-q::before {
  content: "−";
  background: var(--a-accent);
  color: #0b1046;
  transform: rotate(180deg);
}

.faq-q:hover { color: var(--a-accent); }

.faq-a {
  padding: 0 22px 18px 60px;
  color: var(--a-text-dim);
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
  line-height: 1.8;
}

.faq-a p { margin: 0 0 8px; }
.faq-a p:last-child { margin-bottom: 0; }

.faq-a code {
  background: var(--a-accent-dim);
  color: var(--a-accent);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.9em;
}

.faq-a a {
  color: var(--a-accent);
  text-decoration: underline;
}

/* ============================================================
   8. 特色介绍卡片 (widget)
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.feature-item {
  background: var(--a-bg-card);
  border: 1px solid rgba(243, 176, 20, 0.12);
  border-radius: var(--a-radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: var(--a-accent);
  background: rgba(243, 176, 20, 0.04);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(243, 176, 20, 0.06);
}

.feature-item i {
  font-size: 36px;
  color: var(--a-accent);
  margin-bottom: 14px;
  display: block;
}

.feature-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.feature-item p {
  font-size: 13px;
  color: var(--a-text-dim);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   9. 简介 & 参数
   ============================================================ */
.about-intro {
  font-size: 15px;
  color: var(--a-text-dim);
  line-height: 1.8;
  padding: 16px 0 24px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  border-bottom: 1px solid var(--a-border-light);
  margin-bottom: 28px;
}

.params-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.param-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--a-bg-card);
  border: 1px solid var(--a-border-light);
  border-radius: var(--a-radius-sm);
  font-size: 14px;
  color: #ddd;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.param-item:hover {
  background: var(--a-bg-card-hover);
  border-color: var(--a-border);
}

.param-item .param-key {
  font-weight: 600;
  color: var(--a-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.param-item .param-val {
  color: var(--a-text);
  word-break: break-all;
}

/* ============================================================
   10. 锚点高亮脉冲
   ============================================================ */
@keyframes targetHighlight {
  0%   { border-color: rgba(243, 176, 20, 0.5); background: rgba(243, 176, 20, 0.08); box-shadow: 0 0 25px rgba(243, 176, 20, 0.06); }
  100% { border-color: var(--a-border-light); background: var(--a-bg-card); box-shadow: none; }
}

.rules-card:target {
  animation: targetHighlight 2.5s ease-out forwards;
}

/* ============================================================
   11. 滚动揭示动画
   ============================================================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================================
   12. 回到顶部按钮 (增强)
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(243, 176, 20, 0.1);
  border: 1px solid rgba(243, 176, 20, 0.25);
  color: var(--a-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s, border-color 0.2s;
  pointer-events: none;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.btt-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: rgba(243, 176, 20, 0.25);
  color: #fff;
  border-color: rgba(243, 176, 20, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(243, 176, 20, 0.15);
}

/* ============================================================
   13. 空状态 / 其他
   ============================================================ */
.about-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--a-text-dim);
  font-size: 18px;
}

.about-empty a {
  color: var(--a-accent);
  text-decoration: underline;
}

.other-content-block {
  font-size: 14px;
  color: var(--a-text-dim);
  line-height: 1.7;
}

.other-content-block p {
  margin-bottom: 10px;
}

/* ============================================================
   14. 响应式设计
   ============================================================ */

/* 平板：TOC 折叠为横向导航 */
@media (max-width: 1024px) {

  .about-page .widget.rules-card {
    padding: 24px 20px 20px;
  }

  .about-page .rule-item {
    padding: 6px 0 6px 32px;
    font-size: 15px;
    line-height: 1.7;
  }

  .about-page .rule-item .rule-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
    left: 2px;
  }

  .penalty-table { font-size: 13px; }
  .penalty-table th,
  .penalty-table td { padding: 10px 10px; }

  .faq-q { padding: 14px 18px; font-size: 15px; }
  .faq-a { padding: 0 18px 14px 52px; }
}

/* 手机 */
@media (max-width: 768px) {
  .about-page .section-title {
    margin-bottom: 30px;
  }

  .about-page .about-title {
    letter-spacing: 0.1em;
  }

  .about-page .about-title::after {
    width: 60px;
  }

  .about-page .widget.rules-card {
    padding: 20px 14px 18px;
    margin-bottom: 20px;
    border-radius: 6px;
  }

  .about-page .widget.rules-card::before {
    width: 2px;
  }

  .about-page .rule-item {
    padding: 5px 0 5px 30px;
    font-size: 14px;
    line-height: 1.7;
  }

  .about-page .rule-item .rule-num {
    width: 20px;
    height: 20px;
    font-size: 10px;
    left: 0;
  }

  .penalty-table th,
  .penalty-table td { padding: 8px 6px; font-size: 12px; }

  .penalty-table tbody td:first-child {
    min-width: 100px;
    font-size: 12px;
  }

  .faq-q { padding: 12px 14px; font-size: 14px; gap: 8px; }
  .faq-q::before { width: 22px; height: 22px; font-size: 15px; }
  .faq-a { padding: 0 14px 12px 44px; }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-item {
    padding: 20px 16px;
  }

  .params-list {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }

  .about-intro {
    font-size: 14px;
    padding: 12px 0 18px;
    margin-bottom: 20px;
  }

  .about-page .widget_title .section-label {
    font-size: 1rem;
  }

  .sub-rule-widget .section-label {
    font-size: 1rem;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  .about-page .widget.rules-card {
    padding: 16px 12px 14px;
    margin-bottom: 16px;
  }

  .about-page .rule-item {
    font-size: 13px;
    padding-left: 26px;
  }

  .about-page .rule-item .rule-num {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .penalty-table th,
  .penalty-table td { padding: 6px 4px; font-size: 11px; }

  .penalty-table tbody td:first-child {
    min-width: 80px;
    font-size: 11px;
  }
}
/* ============================================================
   15. 标题区 padding 补偿（从 about.php 内联移入）
   ============================================================ */
.about-page .rules-content {
  padding-top: 40px;
}
@media (max-width: 768px) {
  .about-page .rules-content {
    padding-top: 30px;
  }
}
main.about-page {
  padding-top: 170px;
}
@media (max-width: 768px) {
  main.about-page {
    padding-top: 100px;
  }
}
@media (max-width: 576px) {
  main.about-page {
    padding-top: 70px;
  }
}


.about-page .rule-note {
    margin-top: 12px;
    padding: 8px 16px;
    color: var(--a-accent);
    font-weight: 600;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    text-align: center;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--a-accent-dim);
    opacity: 0.92;
}

