:root{
  --bg:#0b0f17;
  --card:#111827;
  --muted:#9aa4b2;
  --text:#e6edf6;
  --border:rgba(255,255,255,.10);
  --brand:#7c3aed;
  --brand2:#22c55e;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f6f7fb;
    --card:#ffffff;
    --muted:#5b6472;
    --text:#0b1220;
    --border:rgba(15,23,42,.12);
    --shadow:0 10px 30px rgba(15,23,42,.10);
  }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 30% 0%, rgba(124,58,237,.25), transparent 55%),
              radial-gradient(900px 600px at 80% 10%, rgba(34,197,94,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}

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

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.footer{
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
}
.footer-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 14px 22px;
}
.footer-cards{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px){
  .footer-cards{grid-template-columns: 1fr 1fr 1fr;}
}
.footer-card{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}
.footer-toggle{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  letter-spacing: .2px;
  padding: 2px 2px 10px;
  cursor: pointer;
}
.footer-toggle-icon{color: var(--muted); font-weight: 900;}
.footer-panel{padding-top: 0;}
.footer-title{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: 10px;
}
.footer-links{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.footer-link{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  font-size: 13px;
}
.footer-link2{
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.footer-link-title{font-weight: 800;}
.footer-link-sub{font-size: 12px;}
.footer-btn{
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.footer-link:hover{border-color: color-mix(in srgb, var(--brand) 50%, var(--border));}

.legal-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.55);
  z-index: 9998;
}
.legal-modal.open{display:flex;}
.legal-modal-card{
  width: min(680px, 92vw);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.legal-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.legal-modal-title{
  font-weight: 900;
  letter-spacing: .2px;
}
.legal-modal-close{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.legal-modal-body{
  padding: 12px;
  line-height: 1.55;
}
#legal-modal-body {
  width: 95%;
  max-width: 95%;
  height:80%;
  max-height: 800px;
  overflow-y: auto;
  overflow-x: hidden; /* 隐藏水平滚动条 */
  white-space: pre-line;
  /*border: 1px solid #ccc;*/
  padding: 10px;
  /* 优化滚动体验 */
  scrollbar-width: thin; /* 火狐：细滚动条 */
  scroll-behavior: smooth; /* 平滑滚动 */
}

/* Chrome/Edge/Safari 自定义滚动条样式 */
#legal-modal-body::-webkit-scrollbar {
  width: 6px; /* 滚动条宽度 */
}
#legal-modal-body::-webkit-scrollbar-thumb {
  background-color: #ccc; /* 滚动条滑块颜色 */
  border-radius: 3px; /* 滑块圆角 */
}
#legal-modal-body::-webkit-scrollbar-thumb:hover {
  background-color: #999; /* 鼠标悬停滑块颜色 */
}
.legal-modal-actions{
  padding: 0 12px 12px;
}

.header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.header a{color:inherit}
.logo{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}
.logo img{width: 28px; height: 28px;}

.nav-btn{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.nav-btn:active{transform: translateY(1px);}
.nav-btn-icon{color: var(--muted); font-weight: 900;}

.nav-overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
  background: rgba(0,0,0,.55);
  z-index: 9997;
}
.nav-overlay.open{display:flex;}
.nav-panel{
  width: min(980px, 100%);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.nav-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.nav-title{font-weight: 900; letter-spacing: .2px;}
.nav-close{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.nav-links{
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding: 12px;
}
.nav-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  font-weight: 800;
}
.nav-link:hover{border-color: color-mix(in srgb, var(--brand) 50%, var(--border));}
.nav-link.active{
  border-color: color-mix(in srgb, var(--brand) 65%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent) inset;
}
.nav-link.active::after{
  content: "Current";
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}

.topbar-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 12px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.brand h1{
  margin:0;
  font-size: 16px;
  letter-spacing: .2px;
}
.brand .sub{
  font-size:12px;
  color:var(--muted);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
}
.pill input{
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
  width:min(52vw, 320px);
  font-size:14px;
}
.pill .hint{color:var(--muted); font-size:12px}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 720px){
  .grid{grid-template-columns: 1fr 1fr;}
}

.card{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.card:active{transform: scale(.99);}
.card:hover{border-color: color-mix(in srgb, var(--brand) 50%, var(--border));}

.thumb{
  aspect-ratio: 16/11;
  width:100%;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(34,197,94,.10));
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.thumb .ph{
  color:rgba(255,255,255,.75);
  font-size:12px;
}

.card-body{
  padding: 12px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}
.title{
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin:0;
}
.meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.badge{
  font-size: 12px;
  color: var(--muted);
  border:1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}
.badge strong{
  color: var(--text);
  font-weight: 700;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 35%, transparent), transparent);
}

.page-title{
  margin: 6px 0 6px;
  font-size: 22px;
  letter-spacing: .2px;
}
.muted{color:var(--muted)}

.detail{
  display:flex;
  flex-direction:column;
  gap: 14px;
  margin-top: 12px;
}

.hero{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.hero-img{
  aspect-ratio: 16/12;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(34,197,94,.10));
}
.hero-img img{width:100%;height:100%;object-fit:cover;display:block}
.hero-body{padding: 12px 12px 14px}
.hero-body h2{margin:0 0 8px;font-size:18px;line-height:1.25}
.hero-body .meta{margin-top:10px}

.section{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  padding: 12px;
}
.section h3{margin:0 0 10px;font-size:14px;letter-spacing:.2px}
.section p{margin:0;line-height:1.55}

.accordion{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.acc{
  border:1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: color-mix(in srgb, var(--card) 92%, transparent);
}
.acc button{
  width:100%;
  border:none;
  background:transparent;
  color:var(--text);
  text-align:left;
  padding: 12px;
  font-size:14px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.acc button .chev{color:var(--muted);font-weight:800}
.acc .panel{
  padding: 0 12px 12px;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
  line-height: 1.55;
  display:none;
}
.acc.open .panel{display:block}

.error{
  border: 1px solid color-mix(in srgb, #ef4444 55%, var(--border));
  background: color-mix(in srgb, #ef4444 12%, var(--card));
  border-radius: var(--radius);
  padding: 12px;
}
.error code{white-space:nowrap}

.footer-note{
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.45;
}

.fab{
  position: fixed;
  bottom: 18px;
  right: 16px;
  z-index: 9999;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #25D366;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.fab:active{transform: translateY(1px);}

.back-to-top {
  position: fixed;

  bottom: calc(18px + 80px); 
  right: 16px;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  background: #1877f2;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  cursor: pointer;
  transition: all 0.2s ease;
}
.back-to-top:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.back-to-top:hover {
  background: #166fe5;
}

/* Home */
.btn.ghost{
  background: color-mix(in srgb, var(--card) 92%, transparent);
}

.home,
.sections{
  display:flex;
  flex-direction:column;
  gap: 12px;
  padding-top: 8px;
}
.home-label,
.sec-label{
  margin: 0;
  line-height: 1.25;
  letter-spacing: .2px;
}
.home-label,
.sec-label{font-size: 16px; font-weight: 900; color: var(--text);}
.home-label-l,
.sec-label-l{font-size: 22px; font-weight: 950;}
.home-label-s,
.sec-label-s{font-size: 14px; font-weight: 800; color: var(--muted);}
.home-card,
.sec-card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.home-card-img,
.sec-card-img{
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(34,197,94,.10));
}
.home-card-img img,
.sec-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.home-card-body,
.sec-card-body{padding: 12px}
.home-card-title,
.sec-card-title{margin:0 0 8px; font-size: 15px; font-weight: 900; letter-spacing: .2px;}
.home-card-content,
.sec-card-content{margin:0; line-height: 1.55; color: color-mix(in srgb, var(--text) 92%, var(--muted));}
.sec-card-content{white-space: pre-line;}
.home-more,
.sec-more{margin-top: 10px;}
.home-cta,
.sec-cta{display:flex; justify-content:flex-start; margin-top: 4px;}

/* Generic modal (Home "More") */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.55);
  z-index: 9999;
}
.modal.open{display:flex;}
.modal-card{
  width: min(680px, 92vw);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.modal-title{font-weight: 900; letter-spacing: .2px;}
.modal-close{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.modal-body{padding: 12px; line-height: 1.55;}
