/* QQHIBT REBUILD CLEAN WHITE-BLUE UI */
/* 只负责 UI，不改业务逻辑 */

/* ================= 全局基础 ================= */
*{
  box-sizing:border-box;
}

html{
  scrollbar-gutter:stable;
}

html,
body{
  margin:0!important;
  min-height:100%!important;
  background:
    radial-gradient(circle at 95% 0%,rgba(37,99,235,.12),transparent 260px),
    linear-gradient(180deg,#f8fbff 0%,#f3f7fc 46%,#eef4fb 100%)!important;
  color:#071226!important;
  font-family:Arial,"Microsoft YaHei",sans-serif!important;
  overflow-x:hidden!important;
}

a{
  text-decoration:none!important;
}

:root{
  --qq-side:304px;
  --qq-blue:#2563eb;
  --qq-blue2:#38bdf8;
  --qq-dark:#071226;
  --qq-text:#0f172a;
  --qq-muted:#475569;
  --qq-soft:#eaf4ff;
  --qq-soft2:#f8fbff;
  --qq-border:#dbe5f2;
  --qq-card:#ffffff;
  --qq-green:#059669;
}

/* ================= 左侧菜单统一 ================= */
/* 兼容不同页面的旧顶部结构：.top / .nav / .qqh-topbar / header */
body > .top,
body > .nav,
body > .qqh-topbar,
body > header{
  position:fixed!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  z-index:1000!important;
  width:var(--qq-side)!important;
  min-width:var(--qq-side)!important;
  max-width:var(--qq-side)!important;
  height:100vh!important;
  min-height:100vh!important;
  max-height:100vh!important;
  padding:30px 18px!important;
  background:#fff!important;
  border-right:1px solid var(--qq-border)!important;
  box-shadow:12px 0 34px rgba(15,23,42,.05)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:0!important;
  overflow:hidden!important;
}

/* 品牌区 */
body > .top > .logo,
body > .nav > .brand,
body > .nav > a.logo,
body > .qqh-topbar > .qqh-brand,
body > header > .brand,
body > header > .logo{
  width:100%!important;
  height:72px!important;
  min-height:72px!important;
  max-height:72px!important;
  margin:0 0 34px!important;
  padding:0 14px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  gap:13px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

/* Q 图标统一大小 */
.logo-badge,
.qqh-logo,
body > .nav > .brand .logo,
body > .nav > .brand .logo-badge,
body > header .logo-badge,
body > header .logo{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  min-height:54px!important;
  max-width:54px!important;
  max-height:54px!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,var(--qq-blue),var(--qq-blue2))!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:28px!important;
  line-height:1!important;
  font-weight:900!important;
  box-shadow:0 14px 30px rgba(37,99,235,.22)!important;
  flex:0 0 54px!important;
}

/* 如果某些旧页面是 <a class="logo">，不再用旧图片/旧文本撑坏 */
body > .nav > a.logo{
  font-size:0!important;
  color:transparent!important;
}

body > .nav > a.logo::before{
  content:"Q"!important;
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,var(--qq-blue),var(--qq-blue2))!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:28px!important;
  font-weight:900!important;
}

/* 品牌文字统一 */
body > .top > .logo > div:not(.logo-badge),
body > .nav > .brand > div:not(.logo):not(.logo-badge),
body > .nav > .brand-text,
.qqh-brand-text,
body > header .brand-text{
  display:block!important;
  width:176px!important;
  max-width:176px!important;
  color:#0f172a!important;
  font-size:18px!important;
  line-height:1.22!important;
  font-weight:900!important;
  letter-spacing:-.2px!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow:hidden!important;
}

/* 菜单容器 */
body > .top > .nav,
body > .nav > .links,
body > .qqh-topbar > .qqh-links,
body > header > .links,
body > header > nav{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:10px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

/* 菜单项：固定宽高，点击不移动 */
body > .top > .nav a,
body > .nav > .links a,
body > .nav > a:not(.logo),
body > .qqh-topbar > .qqh-links a,
body > header > .links a,
body > header > nav a{
  width:100%!important;
  height:54px!important;
  min-height:54px!important;
  max-height:54px!important;
  margin:0!important;
  padding:0 16px!important;
  border-radius:13px!important;
  border:1px solid transparent!important;
  border-left:4px solid transparent!important;
  background:transparent!important;
  color:#334155!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  font-size:16px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:-.1px!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  opacity:1!important;
  visibility:visible!important;
}

/* 当前页高亮 */
body > .top > .nav a.active,
body > .top > .nav a.pay,
body > .nav > .links a.active,
body > .nav > .links a.pay,
body > .nav > a.active,
body > .nav > a.pay,
body > .qqh-topbar > .qqh-links a.active,
body > .qqh-topbar > .qqh-links a.pay,
body > .qqh-topbar > .qqh-links a.qqh-active,
body > header a.active,
body > header a.pay{
  background:var(--qq-soft)!important;
  color:var(--qq-blue)!important;
  border-color:#d7e8ff!important;
  border-left-color:var(--qq-blue)!important;
  box-shadow:none!important;
}

/* ================= 主体布局统一 ================= */
body > .wrap,
body > .container,
body > main,
body > .main,
body > .page,
body > .content{
  width:calc(100% - var(--qq-side))!important;
  max-width:none!important;
  margin-left:var(--qq-side)!important;
  padding:38px 48px 76px!important;
}

/* 内层容器不要重复偏移 */
.wrap .wrap,
.container .container,
main .container,
.main .container{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  padding:0!important;
}

/* ================= Hero 区 ================= */
.hero{
  width:100%!important;
  max-width:none!important;
  min-height:168px!important;
  margin:0 0 34px!important;
  padding:40px 44px!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 98% 0%,rgba(37,99,235,.13) 0,rgba(37,99,235,.13) 78px,transparent 80px),
    linear-gradient(135deg,#fff 0%,#f8fbff 58%,#edf6ff 100%)!important;
  border:1px solid var(--qq-border)!important;
  box-shadow:0 18px 46px rgba(15,23,42,.075)!important;
  color:var(--qq-text)!important;
  overflow:hidden!important;
}

.hero h1{
  margin:0 0 14px!important;
  color:var(--qq-dark)!important;
  font-size:38px!important;
  line-height:1.16!important;
  font-weight:900!important;
  letter-spacing:-.6px!important;
}

.hero p{
  max-width:1000px!important;
  margin:0!important;
  color:#334155!important;
  font-size:17px!important;
  line-height:1.72!important;
  font-weight:500!important;
}

/* ================= 卡片统一 ================= */
.card,
.panel,
section.card,
form.card,
.stat,
.plan,
.step{
  background:#fff!important;
  border:1px solid var(--qq-border)!important;
  border-radius:18px!important;
  box-shadow:0 12px 30px rgba(15,23,42,.055)!important;
  color:var(--qq-text)!important;
}

.card,
.panel,
section.card,
form.card{
  padding:28px!important;
}

.card.green{
  background:#fff!important;
  border-color:var(--qq-border)!important;
}

/* 标题和正文 */
h1,
h2,
h3,
.card h1,
.card h2,
.card h3,
.panel h1,
.panel h2,
.panel h3{
  color:var(--qq-dark)!important;
  font-weight:900!important;
  letter-spacing:-.35px!important;
}

h2,
section h2{
  font-size:28px!important;
  line-height:1.25!important;
}

.card h3{
  font-size:24px!important;
  line-height:1.3!important;
}

p,
li,
.card p,
.panel p,
.step p{
  color:#475569!important;
  font-size:16px!important;
  line-height:1.72!important;
}

.small,
.muted,
.url{
  color:#64748b!important;
  font-size:14px!important;
  line-height:1.55!important;
}

.url{
  word-break:break-all!important;
}

/* ================= 按钮统一 ================= */
.btn,
button,
input[type="submit"],
.loginbtn,
.copybtn{
  min-height:44px!important;
  padding:0 22px!important;
  border-radius:12px!important;
  border:1px solid #bfdbfe!important;
  background:linear-gradient(135deg,var(--qq-blue),var(--qq-blue2))!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:900!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-shadow:0 10px 24px rgba(37,99,235,.15)!important;
  cursor:pointer!important;
}

.btn.white,
.btn.gray{
  background:#fff!important;
  color:var(--qq-blue)!important;
  border:1px solid #cfe0f5!important;
  box-shadow:0 8px 20px rgba(15,23,42,.04)!important;
}

.hero-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:12px!important;
  margin-top:22px!important;
}

/* ================= 网格：不同页面分别处理 ================= */

/* 用户中心统计卡：尽量一排展示 */
.grid:has(> .stat){
  display:grid!important;
  grid-template-columns:repeat(5,minmax(145px,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
}

.grid:has(> .stat) > .stat{
  min-height:118px!important;
  padding:22px 24px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  gap:12px!important;
}

/* 下载页插件卡：强制两列，不挤窄 */
.grid:has(> .card),
.plugins,
.plugin-grid,
.download-grid,
.cards:has(> .card),
.card-grid:has(> .card){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(320px,1fr))!important;
  gap:24px!important;
  align-items:stretch!important;
}

.grid:has(> .card) > .card,
.plugins > .card,
.plugin-grid > .card,
.download-grid > .card,
.cards:has(> .card) > .card,
.card-grid:has(> .card) > .card{
  width:100%!important;
  min-width:0!important;
  min-height:245px!important;
}

/* 教程步骤 */
.grid:has(> .step),
.steps,
.flow{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:16px!important;
}

.step{
  min-height:112px!important;
  padding:24px 28px!important;
}

/* ================= 统计卡文字 ================= */
.stat > span,
.stat label,
.stat .label{
  color:#52647a!important;
  font-size:15px!important;
  font-weight:850!important;
}

.stat b,
.stat .value{
  color:var(--qq-dark)!important;
  font-size:21px!important;
  line-height:1.22!important;
  font-weight:900!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

/* 到期时间不要过大 */
.stat b{
  max-width:100%!important;
}

/* 状态标签 */
.stat .pill,
.pill,
.pill.ok,
.pill.good{
  min-height:32px!important;
  min-width:86px!important;
  width:auto!important;
  padding:0 14px!important;
  border-radius:999px!important;
  background:#dcfce7!important;
  border:1px solid #86efac!important;
  color:#047857!important;
  font-size:15px!important;
  line-height:1!important;
  font-weight:900!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* ================= 用户中心详情区 ================= */
.layout{
  display:grid!important;
  grid-template-columns:minmax(0,2fr) minmax(360px,1fr)!important;
  gap:24px!important;
  align-items:start!important;
}

.info-row,
.row{
  display:grid!important;
  grid-template-columns:150px minmax(0,1fr)!important;
  gap:16px!important;
  padding:15px 0!important;
  border-bottom:1px solid var(--qq-border)!important;
}

.info-row b,
.row b{
  color:#334155!important;
  font-size:15px!important;
  font-weight:900!important;
}

.info-row span,
.row span{
  color:var(--qq-text)!important;
  font-size:15px!important;
  font-weight:750!important;
  min-width:0!important;
  word-break:break-word!important;
}

/* 右侧会员信息避免过大换行丑 */
.layout > *:last-child .row,
.layout > *:last-child .info-row{
  grid-template-columns:120px minmax(0,1fr)!important;
}

.layout > *:last-child .row span,
.layout > *:last-child .info-row span{
  font-size:14px!important;
  line-height:1.5!important;
}

/* 邀请码 / 邀请链接 */
.copybox{
  width:100%!important;
  background:#f8fbff!important;
  border:1px solid #cfe0f5!important;
  border-radius:14px!important;
  padding:8px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:10px!important;
  align-items:center!important;
}

.copybox code{
  color:#0f172a!important;
  font-size:15px!important;
  line-height:1.45!important;
  font-weight:800!important;
  background:transparent!important;
  padding:0 12px!important;
  word-break:break-all!important;
}

/* ================= 表单 / API 页面 ================= */
input,
textarea,
select{
  width:100%!important;
  background:#f8fbff!important;
  border:1px solid #cfe0f5!important;
  color:#0f172a!important;
  border-radius:14px!important;
  font-size:15px!important;
  font-weight:700!important;
  outline:none!important;
}

input,
select{
  min-height:46px!important;
  padding:0 14px!important;
}

textarea{
  min-height:170px!important;
  padding:16px!important;
  line-height:1.55!important;
  resize:vertical!important;
}

input::placeholder,
textarea::placeholder{
  color:#64748b!important;
  opacity:1!important;
  font-weight:600!important;
}

.notice,
.msg,
.alert,
.warn,
.ok,
.err,
.bad{
  border-radius:14px!important;
  padding:14px 16px!important;
  font-size:15px!important;
  line-height:1.6!important;
  font-weight:800!important;
}

.notice,
.msg{
  background:#eff6ff!important;
  border:1px solid #bfdbfe!important;
  color:#1d4ed8!important;
}

.warn{
  background:#fff7ed!important;
  border:1px solid #fed7aa!important;
  color:#9a3412!important;
}

.err,
.bad{
  background:#fef2f2!important;
  border:1px solid #fecaca!important;
  color:#991b1b!important;
}

/* API 顶部小统计卡 */
.card .badge,
.badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  border-radius:999px!important;
  padding:0 12px!important;
  background:#eff6ff!important;
  color:#2563eb!important;
  border:1px solid #bfdbfe!important;
  font-weight:900!important;
}

/* ================= 表格 ================= */
table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden!important;
  border:1px solid var(--qq-border)!important;
  border-radius:14px!important;
  background:#fff!important;
}

th{
  background:#f1f6ff!important;
  color:#334155!important;
  font-size:14px!important;
  font-weight:900!important;
}

td{
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:700!important;
}

th,
td{
  padding:13px 14px!important;
  border-bottom:1px solid #e5edf7!important;
}

/* ================= 充值套餐 ================= */
.plan h2,
.plan h3{
  font-size:24px!important;
}

.plan .price,
.price,
.value{
  color:#2563eb!important;
  font-size:30px!important;
  line-height:1.15!important;
  font-weight:900!important;
}

/* ================= 下载页细节 ================= */
hr{
  border:0!important;
  border-top:1px solid var(--qq-border)!important;
  margin:28px 0!important;
}

/* 安装说明文字清晰 */
ol,
ul{
  color:#475569!important;
}

ol li,
ul li{
  margin:8px 0!important;
}

/* ================= 响应式 ================= */
@media(max-width:1280px){
  :root{
    --qq-side:264px;
  }

  body > .top,
  body > .nav,
  body > .qqh-topbar,
  body > header{
    width:264px!important;
    min-width:264px!important;
    max-width:264px!important;
    padding:28px 16px!important;
  }

  body > .wrap,
  body > .container,
  body > main,
  body > .main,
  body > .page,
  body > .content{
    width:calc(100% - 264px)!important;
    margin-left:264px!important;
    padding:30px 30px 60px!important;
  }

  .grid:has(> .stat){
    grid-template-columns:repeat(3,minmax(160px,1fr))!important;
  }
}

@media(max-width:980px){
  body > .top,
  body > .nav,
  body > .qqh-topbar,
  body > header{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:auto!important;
    max-height:none!important;
    padding:18px!important;
  }

  body > .top > .logo,
  body > .nav > .brand,
  body > .nav > a.logo,
  body > .qqh-topbar > .qqh-brand,
  body > header > .brand,
  body > header > .logo{
    margin-bottom:16px!important;
  }

  body > .top > .nav,
  body > .nav > .links,
  body > .qqh-topbar > .qqh-links,
  body > header > .links,
  body > header > nav{
    flex-direction:row!important;
    flex-wrap:wrap!important;
  }

  body > .top > .nav a,
  body > .nav > .links a,
  body > .nav > a:not(.logo),
  body > .qqh-topbar > .qqh-links a,
  body > header > .links a,
  body > header > nav a{
    width:auto!important;
    height:42px!important;
    min-height:42px!important;
    font-size:14px!important;
  }

  body > .wrap,
  body > .container,
  body > main,
  body > .main,
  body > .page,
  body > .content{
    width:100%!important;
    margin-left:0!important;
    padding:20px 14px 50px!important;
  }

  .hero{
    padding:28px!important;
  }

  .hero h1{
    font-size:30px!important;
  }

  .grid:has(> .stat),
  .grid:has(> .card),
  .plugins,
  .plugin-grid,
  .download-grid,
  .cards:has(> .card),
  .card-grid:has(> .card),
  .layout{
    grid-template-columns:1fr!important;
  }

  .info-row,
  .row{
    grid-template-columns:1fr!important;
  }
}

