/* ============================================================
   烛心 · 多板块站点样式
   ============================================================ */
:root {
  --accent: #e8a33d;
  --bg: #0d0f12;
  --card: #161a20;
  --text: #e8eaed;
  --muted: #8b939e;
  --line: rgba(255,255,255,.08);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* ================= 顶部栏 ================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; height: 68px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--text);
}
.brand-avatar {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.brand-text i { font-size: 12px; color: var(--muted); font-style: normal; }

.menu-btn {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); color: var(--text);
  font-size: 17px; padding: 5px 13px; border-radius: 9px; cursor: pointer;
}

/* ================= 标签导航 ================= */
.tabs-wrap { border-top: 1px solid var(--line); position: relative; }
.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none; padding: 0;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 7px;
  padding: 15px 18px; font-size: 14.5px; color: var(--muted);
  text-decoration: none; white-space: nowrap;
  transition: color .2s;
}
.tab .ti { font-size: 15px; opacity: .85; }
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text); font-weight: 600;
}
.tab.active .ti { opacity: 1; }

/* ================= 页面标题 ================= */
main { flex: 1; padding-bottom: 90px; }
.page-head {
  padding: 52px 0 34px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.page-head h1 {
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 800; letter-spacing: -1px; margin-bottom: 8px;
}
.page-head p { color: var(--muted); font-size: 15.5px; }

/* 页面切换动画 */
#blocks { animation: fade .38s ease both; }
@keyframes fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ================= 通用区块 ================= */
.block { margin-bottom: 46px; }
.block-title {
  font-size: 18px; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 11px;
}
.block-title::before {
  content: ''; width: 3px; height: 18px; border-radius: 2px;
  background: var(--accent);
}
.block-text p { color: var(--muted); font-size: 16px; margin-bottom: 13px; }
.block-text p:last-child { margin-bottom: 0; }

/* ---------- 数据条 ---------- */
.stats {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
}
.stat b {
  display: block; font-size: 28px; font-weight: 800;
  color: var(--accent); line-height: 1.2;
}
.stat span { color: var(--muted); font-size: 13.5px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1.5px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -26px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.tl-time {
  font-size: 12.5px; font-weight: 700; color: var(--accent);
  letter-spacing: 1px; margin-bottom: 4px;
}
.tl-item h4 { font-size: 16px; margin-bottom: 4px; font-weight: 700; }
.tl-item p { color: var(--muted); font-size: 14.5px; }

/* ---------- 卡片网格 ---------- */
.cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.cards[data-cols="2"] { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards[data-cols="4"] { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.acard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  text-decoration: none; color: inherit; display: block;
  transition: transform .25s, border-color .25s, background .25s;
}
a.acard:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--card) 88%, var(--accent));
}
.acard .ic { font-size: 25px; display: block; margin-bottom: 13px; }
.acard h3 { font-size: 17px; margin-bottom: 7px; font-weight: 700; }
.acard p { color: var(--muted); font-size: 14.5px; }
.tag {
  display: inline-block; font-size: 11.5px; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 11px;
}

/* ---------- 列表 ---------- */
.list { display: grid; gap: 13px; }
.li {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  transition: transform .22s, border-color .22s;
}
a.li:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.li-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.li-head h4 { font-size: 16.5px; font-weight: 700; }
.li p { color: var(--muted); font-size: 14.5px; }
.li-meta { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; color: var(--muted);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 6px; padding: 2px 9px;
}

/* ---------- 技能条 ---------- */
.bars { display: grid; gap: 17px; }
.bar-row { display: grid; gap: 7px; }
.bar-top { display: flex; justify-content: space-between; font-size: 14.5px; }
.bar-top span:last-child { color: var(--muted); font-size: 13px; }
.bar-track {
  height: 7px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
.bar-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg,
      color-mix(in srgb, var(--accent) 55%, transparent), var(--accent));
  transition: width 1s cubic-bezier(.22,1,.36,1);
}

/* ---------- 标签云 ---------- */
.tagcloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tagcloud span {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 16px; font-size: 14px;
  transition: border-color .2s, color .2s, transform .2s;
}
.tagcloud span:hover {
  border-color: var(--accent); color: var(--accent); transform: translateY(-2px);
}

/* ---------- 图集 ---------- */
.gallery {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.gitem {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  transition: transform .25s, border-color .25s;
}
.gitem:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.gitem img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.gitem .ph {
  width: 100%; aspect-ratio: 16/10;
  display: grid; place-items: center; font-size: 30px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg,
      transparent, transparent 11px,
      color-mix(in srgb, var(--text) 3%, transparent) 11px,
      color-mix(in srgb, var(--text) 3%, transparent) 22px);
}
.gcap { padding: 13px 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- 联系卡片 ---------- */
.links {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.litem {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: 14px;
  transition: transform .22s, border-color .22s;
}
.litem:hover { transform: translateY(-3px); border-color: var(--accent); }
.litem .ic { font-size: 22px; }
.litem .k { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: 1.4px; }
.litem .v { font-weight: 600; font-size: 14.5px; }

/* ================= 页脚 ================= */
.footer {
  border-top: 1px solid var(--line);
  padding: 30px 0; text-align: center;
  color: var(--muted); font-size: 13.5px;
}

/* ================= 移动端 ================= */
@media (max-width: 700px) {
  .topbar-inner { height: 60px; }
  .brand-text i { display: none; }
  .menu-btn { display: none; }
  .tab { padding: 13px 14px; font-size: 13.5px; }
  .page-head { padding: 34px 0 26px; margin-bottom: 30px; }
  .block { margin-bottom: 36px; }
  main { padding-bottom: 60px; }
}

/* ============================================================
   积分系统（points）
   ============================================================ */
.pts-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 6px;
}

.pts-overview .mon-v.up  { color: #4ade80; }
.pts-overview .mon-v.down { color: #ff5d5d; }
.pts-overview .mon-v {
  color: var(--accent);
}

.pts-sec {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 18px 12px;
  overflow: hidden;
}

.pts-sec-title {
  font-size: 16px;
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pts-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.pts-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}

.pts-table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.pts-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.pts-table tbody tr:last-child td {
  border-bottom: none;
}

.pts-table tbody tr {
  transition: background 0.18s ease;
}

.pts-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pts-table tr.top3 td {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.c-rank {
  width: 56px;
  font-size: 15px;
  white-space: nowrap;
}

.c-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pts-name {
  font-weight: 600;
  color: var(--text);
}

.pts-uid {
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.c-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th.c-num, th.c-date {
  text-align: right;
}

.pts-gold {
  color: var(--accent);
  font-weight: 700;
}

.pts-red {
  color: #ff5d5d;
  font-weight: 600;
}

.c-fish {
  color: var(--text);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-date {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pts-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 2px 10px;
}

.pts-error {
  margin-top: 18px;
  background: rgba(127, 29, 29, 0.18);
  border: 1px solid rgba(255, 93, 93, 0.35);
  border-radius: 14px;
  padding: 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pts-error-ic {
  font-size: 30px;
}

.pts-error b {
  font-size: 15px;
}

.pts-error p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
  word-break: break-all;
}

.pts-asset-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

@media (max-width: 560px) {
  .pts-overview { grid-template-columns: repeat(2, 1fr); }
  .pts-sec { padding: 14px 12px 8px; }
}

/* ============================================================
   视频嵌入（videobox）
   ============================================================ */
.videobox {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.videobox iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.videobox-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 2px 0;
}

/* ============================================================
   积分系统（points）
   ============================================================ */
.pts-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 6px;
}

.pts-overview .mon-v.up  { color: #4ade80; }
.pts-overview .mon-v.down { color: #ff5d5d; }
.pts-overview .mon-v {
  color: var(--accent);
}

.pts-sec {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 18px 12px;
  overflow: hidden;
}

.pts-sec-title {
  font-size: 16px;
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pts-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.pts-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}

.pts-table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.pts-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.pts-table tbody tr:last-child td {
  border-bottom: none;
}

.pts-table tbody tr {
  transition: background 0.18s ease;
}

.pts-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pts-table tr.top3 td {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.c-rank {
  width: 56px;
  font-size: 15px;
  white-space: nowrap;
}

.c-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pts-name {
  font-weight: 600;
  color: var(--text);
}

.pts-uid {
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.c-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th.c-num, th.c-date {
  text-align: right;
}

.pts-gold {
  color: var(--accent);
  font-weight: 700;
}

.pts-red {
  color: #ff5d5d;
  font-weight: 600;
}

.c-fish {
  color: var(--text);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-date {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pts-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 2px 10px;
}

.pts-error {
  margin-top: 18px;
  background: rgba(127, 29, 29, 0.18);
  border: 1px solid rgba(255, 93, 93, 0.35);
  border-radius: 14px;
  padding: 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pts-error-ic {
  font-size: 30px;
}

.pts-error b {
  font-size: 15px;
}

.pts-error p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
  word-break: break-all;
}

.pts-asset-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

@media (max-width: 560px) {
  .pts-overview { grid-template-columns: repeat(2, 1fr); }
  .pts-sec { padding: 14px 12px 8px; }
}

/* 修仙榜补充样式 */
.pts-realm {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.pts-cult {
  display: block;
  font-variant-numeric: tabular-nums;
}

.pts-mini-bar {
  display: block;
  height: 4px;
  margin-top: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pts-mini-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent), var(--accent));
  transition: width 0.6s ease;
}

/* ============================================================
   一键清理按钮（服务器页）
   ============================================================ */
.mon-clean {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.clean-btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.clean-btn:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.clean-btn:active {
  transform: scale(0.97);
}

.clean-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.clean-msg {
  font-size: 13px;
  color: var(--muted);
}

.clean-msg b {
  color: #4ade80;
}
