/*
 * 薪火bbs — 公共样式
 * 金环球再生资源 内部公告 / 文件分享
 * 视觉风格对齐 szhq / jygof 两个站 (深色 + 金色强调 + 渐变 CTA)
 */

:root {
  --brand-50: #f0fdf4;
  --brand-100: #dcfce7;
  --brand-400: #4ade80;
  --brand-500: #22c55e;
  --brand-600: #16a34a;
  --brand-700: #15803d;
  --brand-800: #166534;
  --brand-900: #14532d;

  --gold: #ffd700;
  --gold-soft: #f5c542;

  --bg: #0b1220;
  --bg-soft: #101a2e;
  --surface: #16233b;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eef7;
  --text-muted: #94a3b8;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
  font-size: 1.1rem;
}
.brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: all 0.25s ease;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--brand-50);
  background: rgba(34, 197, 94, 0.14);
}
@media (max-width: 720px) {
  .site-header .inner { flex-direction: column; align-items: flex-start; }
  .site-nav a { padding: 6px 11px; font-size: 0.85rem; }
}

/* ---------- 主体 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.22), transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.18;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand-400), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  max-width: 660px;
  margin: 0 auto 30px;
  font-size: 1.05rem;
  color: var(--text-muted);
}
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 10px 26px rgba(34, 197, 94, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(34, 197, 94, 0.42); }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* ---------- 卡片 ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 42px; }
.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 0 0 12px;
  font-weight: 800;
}
.section-head p { color: var(--text-muted); margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 197, 94, 0.4); }
.card h3 { margin: 0 0 10px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: rgba(34, 197, 94, 0.14);
  margin-bottom: 16px;
}

/* ---------- 公告列表 ---------- */
.list { display: grid; gap: 12px; }
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.22s ease;
}
.list-item:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(34, 197, 94, 0.35); }
.list-item .tag {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--brand-400);
}
.list-item .tag.warn { background: rgba(245, 197, 66, 0.16); color: var(--gold); }
.list-item .tag.info { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.list-item .tag.danger { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.list-item .t { font-weight: 600; display: block; }
.list-item .d { font-size: 0.86rem; color: var(--text-muted); display: block; }
.list-item .meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
}
.list-item.pinned {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.05);
}
.list-item.pinned .tag { background: rgba(255, 215, 0, 0.18); color: var(--gold); }

/* ---------- 分类 chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.chip.on { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.4); color: var(--brand-400); }

/* ---------- 文件分享 ---------- */
.file-list { display: grid; gap: 10px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.22s ease;
}
.file-item:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateX(3px);
}
.file-item .ftype {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.file-item .ftype.csv { background: rgba(34, 197, 94, 0.16); color: var(--brand-400); }
.file-item .ftype.txt { background: rgba(245, 197, 66, 0.16); color: var(--gold); }
.file-item .ftype.pdf { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.file-item .fname { font-weight: 600; display: block; }
.file-item .fdesc { font-size: 0.85rem; color: var(--text-muted); display: block; }
.file-item .fdl {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-400);
  white-space: nowrap;
}
.file-item .fdl:hover { color: var(--gold); }

/* ---------- 正文排版 ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 10px; font-weight: 800; }
.prose .subtitle { color: var(--text-muted); margin: 0 0 28px; }
.prose h2 { font-size: 1.4rem; margin: 34px 0 12px; }
.prose h3 { font-size: 1.08rem; margin: 24px 0 8px; }
.prose p { color: #cbd5e1; margin: 0 0 14px; }
.prose ul, .prose ol { color: #cbd5e1; padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 7px; }
.prose blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--brand-500);
  background: rgba(34, 197, 94, 0.07);
  border-radius: 0 10px 10px 0;
  color: #cbd5e1;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.9rem;
}
.prose th, .prose td {
  padding: 11px 13px;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th { background: rgba(255, 255, 255, 0.04); color: var(--text); font-weight: 600; }
.prose td { color: #cbd5e1; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800) 55%, #0c3a22);
  box-shadow: var(--shadow);
  text-align: center;
}
.cta::before,
.cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.cta::before { width: 260px; height: 260px; background: rgba(74, 222, 128, 0.28); top: -110px; right: -80px; }
.cta::after { width: 240px; height: 240px; background: rgba(255, 215, 0, 0.14); bottom: -110px; left: -70px; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 4vw, 2.1rem); color: #fff; font-weight: 800; }
.cta p { margin: 0 0 24px; color: rgba(255, 255, 255, 0.82); }
.cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta .btn-primary { background: #fff; color: var(--brand-700); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); }
.cta .btn-ghost { border-color: rgba(255, 255, 255, 0.3); color: #fff; background: rgba(255, 255, 255, 0.1); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- 页脚 (与 szhq / jygof 一致) ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 36px;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-400);
  margin: 0 0 16px;
}
.footer-col p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--gold); }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}
.footer-brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  font-size: 1.15rem;
}
.footer-brand strong { font-size: 1.02rem; }
.footer-brand span { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-contact li i { color: var(--gold); font-style: normal; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.footer-bottom p { margin: 0 0 8px; }
.footer-bottom .sep { margin: 0 12px; opacity: 0.4; }
.footer-bottom a:hover { color: var(--gold); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 90;
  transform: translateZ(0);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

/* ---------- 杂项 ---------- */
.crumb { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 22px; }
.crumb a:hover { color: var(--brand-400); }
.note {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.note strong { color: var(--text); }
.badge-new {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  margin-left: 8px;
  vertical-align: middle;
}
