/* ================================================================
   AIDDUN.COM - 全局移动端响应式样式表 v20260711
   配合 bundle.js 内联样式，提供完整的移动端适配
   底色 #090E1A，鎏金主色 #E6C26E / #F0D080
   ================================================================ */

*{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px}
html,body,header,nav,section,div,footer,main,article,aside{writing-mode:horizontal-tb!important}
body{
  background:#090E1A;
  color:#F0D080;
  font-size:16px;
  line-height:1.6;
  font-family:system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  -webkit-font-smoothing:antialiased;
  /* 安全区域适配 */
  padding-bottom:env(safe-area-inset-bottom,0px);
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:calc(env(safe-area-inset-bottom,0px) + 60px);
}
a{color:#F0D080;text-decoration:none;transition:color .2s}
a:hover{color:#FDE68A}
.card{background:rgba(255,255,255,0.05)}
.page-wrap{max-width:1200px;margin:0 auto;overflow-x:hidden}
.page-wrap h1,.page-wrap h2,.page-wrap h3{font-size:24px;font-weight:700;line-height:1.4}
.page-wrap p,.page-wrap li,.page-wrap td,.page-wrap th{font-size:14px;line-height:1.7}
.page-wrap h2{font-size:24px}
.page-wrap h3{font-size:20px}

/* ===== 禁止横向滚动 ===== */
html,body{
  max-width:100vw;
  overflow-x:hidden;
}

/* ===== 平板端 768px-1200px ===== */
@media(min-width:768px) and (max-width:1200px){
  .container,.page-wrap{max-width:90vw;padding:0 2vw}
  .nav-links{gap:16px}
  .nav-links a{font-size:1.1rem}
  .nav-l span{font-size:2rem}
  .nav-l{gap:8px}
  .nav-r .btn-p{padding:7px 14px;font-size:.8rem}
}

/* ================================================================
   移动端适配 640px 断点
   ================================================================ */
@media(max-width:640px){
  html{font-size:14px}
  body{
    font-size:14px;
    line-height:1.5;
    padding-bottom:env(safe-area-inset-bottom,18px);
  }

  /* Hero 首屏顶部留白 - 防止状态栏裁切 */
  section:first-of-type,
  #root > div > section:first-child,
  [id^="hero"]{
    padding-top:calc(env(safe-area-inset-top,0px) + 3.5rem)!important;
  }

  /* 导航栏 */
  .nav{height:44px!important;padding:0 12px!important;display:flex!important;align-items:center!important}
  .nav-links{display:none!important}
  .ham{display:flex!important;position:relative;left:auto;z-index:110;width:44px;height:44px;flex-shrink:0}
  .nav-l{position:relative;left:auto;transform:none;gap:8px;flex-shrink:0}
  .nav-l span{font-size:1.5rem}
  .nav-l img{height:32px;margin-right:0}
  .nav-r{display:none!important}

  /* 主容器 */
  .container,.page-wrap{max-width:95vw;padding:0 2.5vw}

  /* 字体缩放 */
  h1{font-size:1.4rem!important;line-height:1.3}
  h2{font-size:1.15rem!important;line-height:1.3}
  h3{font-size:1rem!important;line-height:1.4}
  p,li,td,th{font-size:0.8rem!important;line-height:1.6}

  /* 卡片单列 */
  .grid-29,.creator-grid,.user-grid,.agent-grid,.infra-grid,.stat-grid,.industry-grid{grid-template-columns:1fr!important}

  /* 按钮最小44px触控区域 */
  button,.btn-o,.btn-p,a[onclick],.social-btn,.gear-item{min-height:44px;min-width:44px}
  .auth-submit{min-height:48px}
  button:active,.btn-o:active,.btn-p:active,.gear-item:active{background:rgba(230,194,110,.12)!important;transition:background .15s}

  /* 输入框键盘适配 */
  input,textarea,select{font-size:16px!important}

  /* 汉堡菜单右间距 */
  header{padding-right:12px!important}
  header button[class*="md:hidden"]{margin-right:4px!important}

  /* 下拉菜单防溢出 */
  [class*="dropdown"],
  .dun-nav-dropdown,
  [class*="nav-dropdown"]{
    max-width:calc(100vw - 24px)!important;
    right:8px!important;
  }

  /* Footer 底部安全区 */
  footer,.footer{
    padding-bottom:calc(1.5rem + env(safe-area-inset-bottom,12px))!important;
  }

  /* 卡片副标题对比度增强 */
  .dun-v1-feature-card p,
  [class*="feature-card"] p,
  .card-subtitle{
    color:rgba(240,208,128,0.88)!important;
    font-size:0.82rem!important;
    line-height:1.5!important;
  }
  .dun-site-card p{
    color:rgba(240,208,128,0.88)!important;
    font-size:0.82rem!important;
    line-height:1.5!important;
  }
  .dun-site-card h3{
    font-size:1rem!important;
    line-height:1.3!important;
  }
  /* AI悬浮面板安全区 */
  .dun-ai-float-panel{
    bottom:calc(80px + env(safe-area-inset-bottom, 12px))!important;
    max-height:calc(100vh - 120px - env(safe-area-inset-bottom, 12px))!important;
  }
}

/* ================================================================
   超小屏断点 414px (iPhone 11/XR/XS Max 等)
   ================================================================ */
@media(max-width:414px){
  html{font-size:13.5px}
  section:first-of-type,
  #root > div > section:first-child,
  [id^="hero"]{
    padding-top:calc(env(safe-area-inset-top,0px) + 2.5rem)!important;
  }
  h1{font-size:1.2rem!important;line-height:1.25}
  h2{font-size:1.05rem!important;line-height:1.25}
  h3{font-size:0.92rem!important;line-height:1.3}
  p,li,td,th{font-size:0.75rem!important;line-height:1.5}
  .container,.page-wrap{max-width:96vw;padding:0 2vw}
}

/* ================================================================
   超小屏断点 375px (iPhone SE/6/7/8)
   ================================================================ */
@media(max-width:375px){
  html{font-size:13px}
  section:first-of-type,
  #root > div > section:first-child,
  [id^="hero"]{
    padding-top:calc(env(safe-area-inset-top,0px) + 2rem)!important;
  }
  h1{font-size:1.1rem!important;line-height:1.2}
  h2{font-size:1rem!important;line-height:1.2}
  h3{font-size:0.88rem!important;line-height:1.25}
  p,li,td,th{font-size:0.72rem!important;line-height:1.45}
  .container,.page-wrap{max-width:97vw;padding:0 1.5vw}
}

/* ================================================================
   超小屏断点 360px (小屏安卓设备)
   ================================================================ */
@media(max-width:360px){
  html{font-size:12.5px}
  section:first-of-type,
  #root > div > section:first-child,
  [id^="hero"]{
    padding-top:calc(env(safe-area-inset-top,0px) + 1.5rem)!important;
  }
  h1{font-size:1.05rem!important;line-height:1.2}
  h2{font-size:0.95rem!important;line-height:1.2}
  p,li,td,th{font-size:0.7rem!important;line-height:1.4}
  .container,.page-wrap{max-width:98vw;padding:0 1vw}
}
