/* 路径：/app/static/home/butong_home.css */
:root{
  --ds-bg:#0b0f17;
  --ds-panel:#0f1624;
  --ds-text:#eaf0ff;
  --ds-muted:rgba(234,240,255,.72);
  --ds-line:rgba(234,240,255,.12);
  --ds-accent:#ff7a18;
  --ds-accent-2:#ffb86b;
  --ds-shadow:0 16px 60px rgba(0,0,0,.45);
  --ds-radius:18px;
}
/* =========================
   Fix: 首页仍有白色留白（左右/顶部）
   原因：
   - base.css 的 .container 默认 width:90% + margin:auto + padding
     把首页包进“居中容器”，容器外露出 body 背景色 => 白边
   - 仅在出现 .ds-home 的页面做覆盖，避免影响后台/业务页
   ========================= */

/* 仅当页面里有 .ds-home 才生效（不污染其它页面） */
body:has(.ds-home){
  background: var(--ds-bg);
  overflow-x: hidden; /* 兜底防横向抖动/白缝 */
}

/* 覆盖 base.css 的 .container：让首页内容真正全宽铺开 */
body:has(.ds-home) > .container{
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-bottom: 0 !important;
  max-width: none !important;
}

/* 兜底：确保 ds-home 自身也按视口宽度铺满 */
.ds-home{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 仅作用于官网首页，避免影响后台/业务页 */
.ds-home{
  /* 100vh 舞台（移动端优先用 svh，避免地址栏抖动） */
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ds-text);
  background:
    radial-gradient(1000px 600px at 50% -120px, rgba(255,122,24,.22), transparent 60%),
    radial-gradient(900px 520px at 15% 20%, rgba(90,168,255,.14), transparent 55%),
    radial-gradient(900px 520px at 85% 30%, rgba(196,90,255,.12), transparent 55%),
    var(--ds-bg);
  overflow: hidden;
}

/* 角落极简导航：叠在首屏上，不切割布局高度 */
.ds-corners{
  position: fixed;
  left: 18px;
  right: 18px;
  top: calc(env(safe-area-inset-top) + 14px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none; /* 容器不吃点击 */
}
.ds-corner-brand,
.ds-corner-login{
  pointer-events: auto; /* 恢复按钮/链接可点 */
}
.ds-corner-brand{
  text-decoration: none;
  color: var(--ds-text);
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .95;
}
.ds-corner-brand:hover{opacity:1;}
.ds-corner-login{
  appearance:none;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(234,240,255,.16);
  color: var(--ds-text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 14px;
  backdrop-filter: blur(8px);
}
.ds-corner-login:hover{
  border-color: rgba(234,240,255,.28);
  background: rgba(255,255,255,.06);
}

/* 公告条：同样固定叠放，不切割首屏 */
.ds-announce{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top) + 58px);
  z-index: 19;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--ds-line);
  backdrop-filter: blur(10px);
}
.ds-announce-inner{
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 18px;
  /* 让 NEW + 文案作为“一个整体”严格居中 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-announce-center{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.ds-announce-badge{
  font-size: 12px;
  letter-spacing: .08em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,122,24,.18);
  color: var(--ds-accent-2);
  border: 1px solid rgba(255,122,24,.28);
}
.ds-announce-link{
  color: var(--ds-text);
  text-decoration: none;
  opacity: .92;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
}
.ds-announce-link:hover{opacity:1; text-decoration: underline;}

/* 主视觉 */
.ds-hero{
  /* 真·首屏：填满视口，并给顶部叠放 UI 留出安全空间 */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    /* 让公告条与 logo 的空隙更紧凑：顶部安全间距减少 50% */
    calc(env(safe-area-inset-top) + clamp(20px, 3vh, 40px))
    18px
    calc(env(safe-area-inset-bottom) + clamp(64px, 10vh, 120px));
}
.ds-hero-inner{
  max-width: 1080px;
  margin: 0 auto;
  display:flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ds-hero-logo img{
  /* Logo 更有冲击力：随屏幕自适应，避免过大/过小 */
  width: clamp(190px, 18vw, 320px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
}
.ds-hero-title{
  margin: 30px 0 30px;
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -.01em;
  /* 覆盖 base.css 的全局 h1/h2 绿色：首页主标题必须是白色 */
  color: #d0d5d1 !important;
}
.ds-hero-sub{
  margin: 0 0 22px;
  color: var(--ds-muted);
  max-width: 720px;
  line-height: 1.6;
}

/* 双 CTA 卡片 */
.ds-cta-grid{
  width: 150%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px; /* 两个卡片间距 50px */
  margin-top: 8px;
}
.ds-card{
  /* 让整张卡变成可点击入口（a 标签） */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;

  /* 让左右两张卡都用“主 CTA（橙色强调）”的视觉效果 */
  border: 1px solid rgba(255,122,24,.35);
  background: linear-gradient(180deg, rgba(255,122,24,.12), rgba(255,255,255,.03) 45%);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow);
  padding: 12px 16px 12px; /* 视觉更紧凑 */
  text-align: left;
  display:flex;
  flex-direction: column;
  justify-content: center;
  min-height: 118px; /* 高度缩小约 30%（168 * 0.7 ≈ 118） */
  backdrop-filter: blur(8px);
}
.ds-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,122,24,.55);
}
.ds-card:focus-visible{
  outline: 2px solid rgba(255,122,24,.55);
  outline-offset: 2px;
}
.ds-card-primary{
  border-color: rgba(255,122,24,.35);
  background: linear-gradient(180deg, rgba(255,122,24,.12), rgba(255,255,255,.03) 45%);
}
.ds-card-title{
  margin:0 0 6px;
  font-size: 20px;
  /* 提升对比度：更接近纯白 */
  color: rgba(255,255,255,.70);
  /* 视觉更“硬”一点 */
  font-weight: 800;
  /* 深色玻璃背景上增加可读性（很轻的阴影/描边感） */
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.ds-card-desc{margin:0; color: var(--ds-muted); line-height: 1.55;}
.ds-card-foot{margin-top: 14px; display:flex; flex-direction: column; gap: 10px;}

/* 登录弹窗 */
.ds-modal{position: fixed; inset: 0; display:none; z-index: 9999;}
.ds-modal.is-open{display:block;}
.ds-modal-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.55);}
.ds-modal-panel{
  position: relative;
  width: min(420px, calc(100vw - 28px));
  margin: 10vh auto 0;
  border-radius: 16px;
  background: #0c121f;
  border: 1px solid rgba(234,240,255,.14);
  box-shadow: var(--ds-shadow);
  overflow: hidden;
}
.ds-modal-close{
  position:absolute;
  right: 10px;
  top: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(234,240,255,.16);
  background: rgba(255,255,255,.03);
  color: var(--ds-text);
  cursor: pointer;
  font-size: 22px;
  line-height: 32px;
}
.ds-modal-close:hover{background: rgba(255,255,255,.06);}
.ds-modal-title{
  padding: 14px 48px 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(234,240,255,.12);
}
.ds-modal-body{padding: 10px 10px 10px;}
.ds-login-iframe{
  width: 100%;
  height: 380px; /* 聚焦二维码 */
  border: 0;
  border-radius: 12px;
  opacity: 0;
  transition: opacity .12s ease;
}
.ds-login-iframe.is-ready{
  opacity: 1;
}
.ds-modal-foot{padding: 10px 16px 14px;}
.ds-modal-note{font-size: 12px; color: rgba(234,240,255,.62);}

/* 响应式：移动端改单列 */
@media (max-width: 860px){
  .ds-cta-grid{grid-template-columns: 1fr;}
  .ds-hero{padding: 120px 14px 56px;}
  .ds-hero-logo img{width: clamp(170px, 42vw, 240px);}
  .ds-card{min-height: 0;}
}
