/* =============================================
   CANVAS REFINED — 画布式设计 · 精修版
   每个样式都经过视觉打磨
   ============================================= */

:root {
  --white:#fff;
  --bg:#fafafc;
  --bg-card:#fff;
  --bg-soft:#f3f4f6;
  --text:#1a1a2e;
  --text-soft:#6b7280;
  --text-muted:#adb5bd;
  --red:#ef4444;
  --red-light:#fee2e2;
  --rose:#f43f5e;
  --amber:#f59e0b;
  --emerald:#10b981;
  --sky:#0ea5e9;
  --indigo:#6366f1;
  --violet:#8b5cf6;
  --gray-100:#f3f4f6;
  --gray-200:#e5e7eb;
  --gray-300:#d1d5db;
  --border:#e5e7eb;
  --border-light:#f3f4f6;
  --shadow-sm:0 1px 2px rgba(0,0,0,.04);
  --shadow:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow-md:0 4px 14px rgba(0,0,0,.08);
  --shadow-lg:0 10px 40px rgba(0,0,0,.1);
  --radius:8px;
  --radius-sm:4px;
  --radius-xl:16px;
  --font:-apple-system,'Microsoft YaHei','PingFang SC',sans-serif;
  --nav-h:52px;
  --max-w:1120px;
}

*,*::before,*::after{box-sizing:border-box}
html{font-size:15px;scroll-behavior:smooth}
body{
  margin:0;padding:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a{color:var(--text);text-decoration:none;transition:color .2s}
a:hover{color:var(--red)}
img{max-width:100%;height:auto;display:block}
::selection{background:var(--red);color:var(--white)}

.container{width:100%;max-width:var(--max-w);margin:0 auto;padding:0 24px}

/* ========== TOP BAR ========== */
.top-bar{
  position:fixed;top:0;left:0;right:0;z-index:100;
  height:var(--nav-h);
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--border-light);
}
.top-bar .in{
  display:flex;align-items:center;justify-content:space-between;
  max-width:var(--max-w);margin:0 auto;padding:0 24px;height:100%;
}
.top-bar .logo{
  font-weight:800;font-size:.95rem;letter-spacing:.5px;
  display:flex;align-items:center;gap:6px;
}
.top-bar .logo em{font-style:normal;background:linear-gradient(135deg,#ef4444,#f43f5e);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-weight:900}
.top-bar nav{display:flex;align-items:center;gap:1px}
.top-bar nav a{
  padding:6px 14px;font-size:.78rem;font-weight:500;color:var(--text-soft);
  border-radius:6px;transition:all .2s;
}
.top-bar nav a:hover{color:var(--text);background:var(--gray-100)}
.top-bar nav a.active{color:var(--red);font-weight:600}
.top-bar .auth{display:flex;align-items:center;gap:8px}
.top-bar .auth a{font-size:.78rem;font-weight:600;padding:6px 16px;border-radius:8px;transition:all .2s}
.top-bar .auth .l{color:var(--text-soft)}
.top-bar .auth .l:hover{color:var(--text);background:var(--gray-100)}
.top-bar .auth .r{
  background:linear-gradient(135deg,#ef4444,#f43f5e);
  color:var(--white);
  box-shadow:0 2px 8px rgba(239,68,68,.25);
}
.top-bar .auth .r:hover{box-shadow:0 4px 16px rgba(239,68,68,.35);transform:translateY(-1px)}
.nav-spacer{height:var(--nav-h)}

/* ========== TYPO HERO ========== */
.typo-hero{
  padding:48px 0 56px;
  display:grid;
  grid-template-columns:1fr 240px;
  gap:40px;
  align-items:center;
  position:relative;
}
.typo-hero .main-title{
  font-size:clamp(2.6rem,6vw,4.2rem);
  font-weight:900;
  line-height:1.05;
  margin:0 0 12px;
  letter-spacing:-1.5px;
}
.typo-hero .main-title .hl{
  background:linear-gradient(135deg,#ef4444,#f43f5e);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.typo-hero .sub{
  font-size:.92rem;color:var(--text-soft);margin:0;
  line-height:1.7;max-width:380px;
}
.typo-hero .hero-img{
  border-radius:12px;overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.12);
  transform:rotate(2deg);
  transition:transform .3s;
}
.typo-hero .hero-img:hover{transform:rotate(0deg) scale(1.02)}
.typo-hero .hero-img img{width:100%;aspect-ratio:3/4;object-fit:cover}
.typo-hero .hero-deco{
  position:absolute;bottom:0;left:0;
  width:120px;height:4px;
  background:linear-gradient(90deg,var(--red),var(--rose),transparent);
  border-radius:2px;
}

@media(max-width:720px){
  .typo-hero{grid-template-columns:1fr;gap:24px;padding:32px 0}
  .typo-hero .hero-img{max-width:160px;transform:none}
}

/* ========== COLOR BLOCK SECTION ========== */
.color-block{
  width:100vw;
  margin-left:calc(-50vw + 50%);
  padding:40px 0;
}
.color-block.red{
  background:linear-gradient(135deg,#fef2f2,#fff5f5);
  border-top:1px solid var(--border-light);
  border-bottom:1px solid var(--border-light);
}
.color-block.amber{
  background:linear-gradient(135deg,#fffbeb,#fefce8);
  border-top:1px solid var(--border-light);
  border-bottom:1px solid var(--border-light);
}
.color-block.sky{
  background:linear-gradient(135deg,#f0f9ff,#e0f2fe);
  border-top:1px solid var(--border-light);
  border-bottom:1px solid var(--border-light);
}
.color-block.violet{
  background:linear-gradient(135deg,#f5f3ff,#ede9fe);
  border-top:1px solid var(--border-light);
  border-bottom:1px solid var(--border-light);
}
.color-block .block-label{
  font-size:clamp(3rem,8vw,6rem);
  font-weight:900;
  line-height:1;
  color:var(--gray-200);
  user-select:none;
  margin:0 0 -8px;
}
.color-block.red .block-label{color:rgba(239,68,68,.12)}
.color-block.amber .block-label{color:rgba(245,158,11,.12)}
.color-block.sky .block-label{color:rgba(14,165,233,.12)}
.color-block.violet .block-label{color:rgba(139,92,246,.12)}
.color-block .block-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:20px;
}
.color-block .block-head h3{
  font-size:1.15rem;font-weight:800;margin:0;
  letter-spacing:-.3px;
}
.color-block .block-head a{
  font-size:.75rem;font-weight:600;color:var(--text-soft);
  transition:color .2s;
}
.color-block .block-head a:hover{color:var(--red)}

/* ========== NUMBERED LIST ========== */
.num-list{display:flex;flex-direction:column;gap:4px}
.num-item{
  display:flex;align-items:center;gap:14px;
  padding:10px 14px;
  background:var(--bg-card);
  border:1px solid var(--border-light);
  border-radius:8px;
  transition:all .2s;
  cursor:pointer;
}
.num-item:hover{
  border-color:var(--gray-300);
  box-shadow:var(--shadow);
  transform:translateX(4px);
}
.num-item .n{
  font-size:1.3rem;font-weight:800;
  min-width:36px;text-align:center;
  color:var(--gray-300);
  font-feature-settings:"tnum";
}
.num-item .ni-img{
  width:48px;height:64px;
  border-radius:6px;overflow:hidden;flex-shrink:0;
  background:var(--gray-100);
  box-shadow:var(--shadow-sm);
}
.num-item .ni-img img{width:100%;height:100%;object-fit:cover}
.num-item .ni-info{flex:1;min-width:0}
.num-item .ni-info .t{font-weight:700;font-size:.88rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.num-item .ni-info .m{font-size:.72rem;color:var(--text-muted);margin-top:2px}
.num-item .ni-r{display:flex;align-items:center;gap:8px;flex-shrink:0}
.num-item .ni-r .score{font-weight:700;font-size:.82rem;}
.num-item .ni-r .tag{
  font-size:.6rem;font-weight:600;padding:3px 10px;
  background:var(--gray-100);border-radius:20px;
  color:var(--text-soft);
}

/* ========== FREE GRID ========== */
.free-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  gap:16px;
}
.free-item{
  cursor:pointer;transition:all .3s cubic-bezier(.22,1,.36,1);
  background:var(--bg-card);
  border:1px solid var(--border-light);
  border-radius:10px;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}
.free-item:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-lg);
  border-color:transparent;
}
.free-item .fi-img{
  aspect-ratio:3/4;
  overflow:hidden;
  background:var(--gray-100);
}
.free-item .fi-img img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .5s ease;
}
.free-item:hover .fi-img img{transform:scale(1.08)}
.free-item .fi-body{padding:10px 12px 12px}
.free-item .fi-body .fi-title{font-size:.82rem;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3;min-height:2.1em}
.free-item .fi-body .fi-meta{font-size:.7rem;color:var(--text-muted);margin-top:4px;display:flex;align-items:center;gap:6px}
.free-item .fi-body .fi-meta .dot{
  display:inline-block;width:5px;height:5px;
  border-radius:50%;background:var(--emerald);
}

@media(max-width:480px){
  .free-grid{grid-template-columns:repeat(2,1fr);gap:10px}
}

/* ========== DETAIL ========== */
.detail-wrap{
  display:grid;
  grid-template-columns:200px 1fr;
  gap:32px;
  padding:28px 0;
}
.detail-wrap .dc-cover{
  border-radius:12px;overflow:hidden;
  box-shadow:0 8px 30px rgba(0,0,0,.12);
  background:var(--gray-100);
}
.detail-wrap .dc-cover img{width:100%}
.detail-wrap .dc-h1{
  font-size:1.8rem;font-weight:900;margin:0 0 6px;
  letter-spacing:-.5px;
}
.detail-wrap .dc-sub{
  font-size:.8rem;color:var(--text-muted);margin-bottom:10px;
}
.detail-wrap .dc-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.detail-wrap .dc-tags span{
  font-size:.7rem;font-weight:600;padding:3px 12px;
  background:var(--gray-100);border-radius:20px;color:var(--text-soft);
}
.detail-wrap .dc-desc{
  font-size:.88rem;color:var(--text-soft);line-height:1.8;margin-bottom:14px;max-width:520px;
}
.detail-wrap .dc-stats{display:flex;gap:20px;margin-bottom:16px}
.detail-wrap .dc-stats .s{}
.detail-wrap .dc-stats .s .num{
  font-size:1.1rem;font-weight:800;display:block;line-height:1.2;
}
.detail-wrap .dc-stats .s .lbl{
  font-size:.6rem;color:var(--text-muted);font-weight:600;text-transform:uppercase;letter-spacing:.5px;
}

/* ========== BUTTONS ========== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:9px 22px;font-family:var(--font);
  font-size:.82rem;font-weight:600;border:none;border-radius:8px;
  cursor:pointer;transition:all .25s;line-height:1.3;
}
.btn-primary{
  background:linear-gradient(135deg,#ef4444,#f43f5e);
  color:var(--white);
  box-shadow:0 2px 8px rgba(239,68,68,.25);
}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(239,68,68,.35);color:var(--white)}
.btn-ghost{
  background:transparent;color:var(--text-soft);
  border:1.5px solid var(--gray-200);
}
.btn-ghost:hover{border-color:var(--red);color:var(--red)}
.btn-sm{padding:5px 14px;font-size:.75rem;border-radius:6px}

/* ========== FORMS ========== */
.form-group{margin-bottom:1rem}
.form-label{display:block;font-size:.78rem;font-weight:600;color:var(--text-soft);margin-bottom:4px}
.form-control{
  width:100%;padding:10px 14px;
  background:var(--white);border:1.5px solid var(--gray-200);
  border-radius:8px;color:var(--text);
  font-family:var(--font);font-size:.88rem;outline:none;transition:all .2s;
}
.form-control:focus{border-color:var(--red);box-shadow:0 0 0 3px rgba(239,68,68,.1)}

/* ========== AUTH ========== */
.auth-wrap{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 60px);padding:40px 20px;background:linear-gradient(135deg,#fef2f2,#fff5f5)}
.auth-box{width:100%;max-width:380px;padding:36px 32px;background:var(--white);border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.08)}
.auth-box h1{font-size:1.4rem;font-weight:900;text-align:center;margin:0 0 4px;background:linear-gradient(135deg,#ef4444,#f43f5e);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.auth-box .sub{text-align:center;color:var(--text-muted);font-size:.82rem;margin-bottom:24px}
.auth-box .af{text-align:center;margin-top:18px;font-size:.8rem;color:var(--text-muted)}
.auth-box .af a{color:var(--red);font-weight:600}

/* ========== PAGINATION ========== */
.pg{display:flex;align-items:center;justify-content:center;gap:4px;margin:24px 0}
.pg a,.pg span{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;height:34px;padding:0 8px;
  border-radius:6px;font-size:.8rem;font-weight:600;
  color:var(--text-soft);background:var(--white);
  border:1.5px solid var(--gray-200);transition:all .2s;
}
.pg a:hover{border-color:var(--red);color:var(--red);background:rgba(239,68,68,.04)}
.pg .cur{background:linear-gradient(135deg,#ef4444,#f43f5e);border-color:transparent;color:var(--white)}

/* ========== BREADCRUMB ========== */
.bread{display:flex;align-items:center;gap:6px;padding:12px 0;font-size:.76rem;color:var(--text-muted)}
.bread a{color:var(--text-muted)}
.bread a:hover{color:var(--red)}
.bread .sep{color:var(--gray-300)}

/* ========== CHAPTER ========== */
.chapter-box{background:var(--white);border:1px solid var(--border);border-radius:12px;overflow:hidden;margin-bottom:20px}
.chapter-tabs{display:flex;gap:2px;padding:10px 16px 0;background:var(--gray-100);border-bottom:1px solid var(--border);overflow-x:auto}
.chapter-tab{
  padding:7px 18px;font-size:.78rem;font-weight:600;color:var(--text-muted);
  border:1px solid transparent;border-bottom:none;border-radius:6px 6px 0 0;
  cursor:pointer;transition:.2s;white-space:nowrap;background:transparent;
}
.chapter-tab:hover{color:var(--text)}
.chapter-tab.active{color:var(--text);background:var(--white);border-color:var(--border)}
.chapter-body{padding:20px}
.chapter-body img{max-width:100%;display:block;margin:0 auto;border-radius:6px}

/* ========== COMMENT ========== */
.cm-box{background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:20px;margin-bottom:24px}
.cm-box .cm-hd{font-size:1rem;font-weight:800;margin-bottom:16px}
.cm-item{padding:14px 0;border-bottom:1px solid var(--border-light)}
.cm-item:last-child{border-bottom:none}
.cm-hdr{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.cm-hd img{width:20px;height:20px;border-radius:50%;object-fit:cover}
.cm-hdr .nm{font-size:.82rem;font-weight:600}
.cm-hdr .dt{font-size:.66rem;color:var(--text-muted);margin-left:auto}
.cm-bd{font-size:.84rem;color:var(--text-soft);margin:0 0 6px 36px;line-height:1.6}
.cm-rp{font-size:.72rem;color:var(--sky);cursor:pointer;margin-left:36px;font-weight:600;transition:.2s}
.cm-rp:hover{color:var(--red)}
.cm-sub{margin-left:36px;padding:10px 14px;background:var(--bg);border-radius:8px;margin-top:6px;border:1px solid var(--border-light)}

.modal-overlay{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.4);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:20px}
.modal-box{width:100%;max-width:420px;background:var(--white);border-radius:16px;padding:28px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative}
.modal-close{position:absolute;top:14px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--gray-100);border:none;color:var(--text-muted);cursor:pointer;font-size:.9rem;transition:.2s}
.modal-close:hover{background:var(--red);color:var(--white)}

/* ========== PAGE BANNER ========== */
.page-banner{
  position:relative;padding:48px 0;margin-bottom:20px;
  background:linear-gradient(135deg,#ef4444,#f43f5e);overflow:hidden;
}
.page-banner img{position:absolute;inset:0;object-fit:cover;width:100%;height:100%;opacity:.2}
.page-banner::after{content:'';position:absolute;inset:0;background:linear-gradient(135deg,rgba(239,68,68,.92),rgba(244,63,94,.7))}
.page-banner .bc{position:relative;z-index:2}
.page-banner h1{font-size:1.6rem;font-weight:800;margin:0 0 4px;color:var(--white);letter-spacing:.5px}
.page-banner p{color:rgba(255,255,255,.7);font-size:.82rem;margin:0;letter-spacing:2px}

/* ========== CONTENT ========== */
.content-page{max-width:660px;margin:0 auto;padding:24px 0}
.content-page h1{font-size:1.5rem;font-weight:900;margin-bottom:6px}
.content-page .cm{color:var(--text-muted);font-size:.76rem;margin-bottom:16px}
.content-page .cb{font-size:.88rem;color:var(--text-soft);line-height:2;word-wrap:break-word;overflow-wrap:break-word;word-break:break-all}
.content-page .cb img{max-width:100%;border-radius:8px;margin:12px 0;box-shadow:var(--shadow)}
.content-page .pn{display:flex;justify-content:space-between;margin-top:20px;padding-top:14px;border-top:1px solid var(--border);font-size:.8rem;color:var(--text-muted)}

/* ========== FILTER ========== */
.filter-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:12px 0;margin-bottom:16px}
.filter-row .fl{font-size:.75rem;font-weight:600;color:var(--text-muted);min-width:36px}
.filter-row .fo{display:flex;flex-wrap:wrap;gap:4px}
.f-btn{
  padding:4px 14px;font-size:.72rem;font-weight:600;
  border:1.5px solid var(--gray-200);border-radius:20px;
  background:var(--white);color:var(--text-soft);
  cursor:pointer;transition:all .2s;
}
.f-btn:hover{border-color:var(--red);color:var(--red)}
.f-btn.active{background:linear-gradient(135deg,#ef4444,#f43f5e);border-color:transparent;color:var(--white);box-shadow:0 2px 8px rgba(239,68,68,.2)}

/* ========== SEARCH ========== */
.search-hero{text-align:center;padding:36px 0 28px}
.search-hero h1{font-size:1.6rem;font-weight:900;margin:0}
.search-hero p{color:var(--text-muted);font-size:.82rem;margin:4px 0 20px}
.search-form{display:flex;gap:8px;max-width:440px;margin:0 auto 28px}
.search-form input{flex:1}

/* ========== MEMBER ========== */
.member-layout{display:grid;grid-template-columns:180px 1fr;gap:20px;margin:24px 0}
.member-sidebar{background:var(--white);border:1px solid var(--border);border-radius:12px;padding:16px;height:fit-content}
.member-sidebar a{display:block;padding:8px 12px;font-size:.8rem;font-weight:600;color:var(--text-soft);border-radius:6px;transition:.2s}
.member-sidebar a:hover,.member-sidebar a.active{background:var(--gray-100);color:var(--text)}
.member-sidebar .dv{height:1px;background:var(--border);margin:6px 0}

.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse}
th,td{padding:8px 12px;font-size:.8rem;text-align:left;border-bottom:1px solid var(--border-light)}
th{color:var(--text-muted);font-weight:600;font-size:.68rem;text-transform:uppercase;letter-spacing:1px;background:var(--gray-100)}
tr:hover td{background:var(--gray-100)}

/* ========== FOOTER ========== */
.footer{
  margin-top:48px;padding:40px 0 24px;
  background:var(--text);color:rgba(255,255,255,.4);
}
.footer .fg{display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px;margin-bottom:24px}
.footer h3{font-size:.9rem;font-weight:700;margin:0 0 8px;color:rgba(255,255,255,.9)}
.footer p,.footer a{font-size:.74rem;color:rgba(255,255,255,.35);line-height:1.6}
.footer a:hover{color:var(--red)}
.footer .fb{padding-top:16px;border-top:1px solid rgba(255,255,255,.06);text-align:center;font-size:.7rem}
.footer .fl{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-bottom:8px}
.footer .fl a{font-size:.72rem}

/* ========== RELATED ========== */
.rel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}
.rel-item{cursor:pointer;transition:all .3s;text-align:center}
.rel-item:hover{transform:translateY(-4px)}
.rel-item img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:8px;margin-bottom:6px;box-shadow:var(--shadow-sm)}
.rel-item .t{font-size:.75rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rel-item .a{font-size:.64rem;color:var(--text-muted)}

/* ========== RESPONSIVE ========== */
@media(max-width:768px){
  .detail-wrap{grid-template-columns:1fr;gap:20px}
  .detail-wrap .dc-cover{max-width:160px}
  .member-layout{grid-template-columns:1fr}
  .footer .fg{grid-template-columns:1fr;gap:24px}
  .top-bar nav a{padding:6px 10px;font-size:.72rem}
}

/* ========== DONATION MODAL ========== */
.avatar-sm{width:18px!important;height:18px!important;border-radius:3px;object-fit:cover}
.hide-box{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.4);display:none}
