/* ====================================================
 * 安聊 · A 风格设计系统(v5.0)
 * 粉紫渐变 + 深紫主色 + 玻璃白卡 + 大圆角
 * 所有 var(--xxx) 已映射到 A 调性
 * ==================================================== */

:root {
  /* === A 调色板 === */
  --bg: #fde7ed;
  --bg-2: #f3e0eb;
  --surface: #ffffff;
  --surface-glass: rgba(255,255,255,0.72);
  --surface-glass-soft: rgba(255,255,255,0.55);
  --primary: #9751d3;            /* 品牌渐变紫 */
  --primary-2: #b957f1;           /* 亮紫 */
  --primary-deep: #30113f;        /* 主品牌深紫(CTA / accent)*/
  --primary-soft: #f2e5fb;        /* 浅紫底(图标容器)*/
  --primary-softer: #f7effb;
  --pink-accent: #ff6c78;         /* 粉红强调 */
  --ink: #241331;                 /* 主标题深紫黑 */
  --ink-2: #6f607a;               /* 正文灰紫 */
  --ink-3: #8b7d99;               /* 辅助灰紫 */
  --line: #eadff1;                /* 浅紫边框 */
  --line-strong: #d9c7f5;

  --grad: linear-gradient(135deg, #9751d3, #b957f1);
  --grad-cta: linear-gradient(135deg, #30113f 0%, #6b2d8f 100%);

  --page-bg:
    radial-gradient(circle at 20% 0%, #ffd6e4 0%, transparent 35%),
    linear-gradient(180deg, #f9d4e4 0%, #f5d4f2 45%, #d9dcff 100%);

  --shadow-card: 0 24px 70px rgba(58,27,75,0.12);
  --shadow-card-soft: 0 14px 38px rgba(58,27,75,0.07);
  --shadow-cta: 0 18px 44px rgba(48,17,63,0.22);
  --shadow-chip: 0 12px 30px rgba(48,17,63,0.18);
  --shadow-tabbar: 0 20px 60px rgba(58,27,75,0.16);
}

/* === 全局背景 + 自然滚动(用 !important 覆盖各页面 inline) === */
html {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100% !important;
}
html, body {
  background: var(--page-bg) !important;
  background-attachment: fixed !important;
  color: var(--ink);
}
body {
  overflow: visible !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ========================================================
 * v06 拆除"手机外壳样机"残留(.phone / .statusbar / .scroll)
 * 这些是原型 v1 留下的桌面"手机预览样机"包装
 * 真实 App 页面不需要黑边框 / 9:41 假状态栏 / 内部假滚动
 * ======================================================== */
.statusbar { display: none !important; }

/* .phone 从"手机壳"还原成"普通流式容器" */
.phone {
  width: 100% !important;
  max-width: 430px !important;
  margin: 0 auto !important;
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible !important;
  display: block !important;
  padding: 0 !important;
}

/* .scroll 从"内部滚动容器"还原成"自然流"(让 body 自然滚)*/
.scroll {
  flex: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: auto !important;
  padding-bottom: 120px !important;
}

/* body 桌面端别再 flex-center 居中(.phone 已经 margin auto 居中),也别给灰底 */
@media (min-width: 480px) {
  body {
    display: block !important;
    padding: 0 !important;
    background: var(--page-bg) !important;
    background-attachment: fixed !important;
  }
}

/* === A 工具类(各页面手动加 class 即可启用) === */

/* 主卡片(玻璃)*/
.a-card {
  background: var(--surface-glass);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px;
}

/* 小卡片 */
.a-card-soft {
  background: var(--surface-glass-soft);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 24px;
  box-shadow: var(--shadow-card-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
}

/* 主 CTA 按钮 */
.a-btn-primary {
  background: var(--primary-deep);
  color: #fff;
  border-radius: 24px;
  padding: 16px 20px;
  font-weight: 900;
  font-size: 16px;
  border: none;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
  transition: transform .12s;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.a-btn-primary:active { transform: scale(0.97); }
.a-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* 次级按钮 */
.a-btn-secondary {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.7);
  color: var(--primary-deep);
  border-radius: 24px;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform .12s;
}
.a-btn-secondary:active { transform: scale(0.97); }

/* 标签 / chip */
.a-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.a-chip.active,
.a-chip[data-active="true"] {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
  color: #fff;
  box-shadow: var(--shadow-chip);
}

/* 图标容器(浅紫底)*/
.a-ico-box {
  width: 40px; height: 40px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}

/* 浅紫推荐卡(付费页用)*/
.a-recommended {
  background: #f7f0ff;
  border: 1px solid #d9c7f5;
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(58,27,75,0.10);
  padding: 22px 20px;
}

/* 微信式聊天气泡 */
.a-bubble-her {
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 10px 14px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.a-bubble-me {
  background: #dff7c9;
  color: #26351e;
  border-radius: 16px;
  padding: 10px 14px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(95,194,139,0.10);
}

/* 玻璃底部导航(强力覆盖所有 .tabbar / .a-tabbar / .bottom-nav)*/
.tabbar,
.a-tabbar,
.bottom-nav {
  position: fixed !important;
  bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  top: auto !important;
  right: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 32px) !important;
  max-width: 430px !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  border-radius: 32px !important;
  background: rgba(255,255,255,0.78) !important;
  border: 1px solid rgba(255,255,255,0.82) !important;
  border-top: 1px solid rgba(255,255,255,0.82) !important;
  box-shadow: 0 20px 60px rgba(58,27,75,0.16) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  padding: 8px !important;
  padding-bottom: 8px !important;
  z-index: 50;
}
.tabbar .tab,
.a-tabbar .tab,
.a-tabbar .tab-item,
.bottom-nav .tab,
.bottom-nav a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border-radius: 20px !important;
  padding: 11px 4px !important;
  color: #8b7d99 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-align: center;
  text-decoration: none;
  background: transparent;
  transition: all .15s;
}
.tabbar .tab .ic,
.tabbar .tab .tab-ic,
.a-tabbar .tab .ic,
.a-tabbar .tab .tab-ic {
  font-size: 18px !important;
  line-height: 1 !important;
}
.tabbar .tab.active,
.a-tabbar .tab.active,
.a-tabbar .tab-item.active,
.bottom-nav .tab.active,
.bottom-nav a.active {
  background: #30113f !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(48,17,63,0.22) !important;
}

/* 输入框统一 */
.a-input,
.a-textarea {
  width: 100%;
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  padding: 14px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  resize: none;
  transition: border .15s, background .15s;
}
.a-input:focus,
.a-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

/* 页面容器(A 标准布局)*/
.a-page {
  max-width: 28rem;
  margin: 0 auto;
  padding: 24px 16px 112px;
}

/* 给所有"有 tabbar 的滚动区"留出底部安全距离 */
.scroll.a-with-tabbar,
.content.a-with-tabbar {
  padding-bottom: 120px !important;
}
