/* ==========================================================================
   Aimee H5 复刻 · base.css
   设计变量 / 基础重置 / 遮罩·Toast·弹窗 / Safari 外跳引导 / 登录页 / 少量克隆补充
   （页面级样式见 home.css / load.css / invite.css / share.css，均由原站自动改写）
   ========================================================================== */

:root {
  --a-bg: #0d0a1a;
  --a-bg-2: #100a1f;
  --a-card: #1c1533;
  --a-pink: #ff5ec4;
  --a-purple: #8b5cf6;
  --a-blue: #5b7fff;
  --a-green: #4ade80;
  --a-grad: linear-gradient(135deg, #ff5ec4, #8b5cf6);
  --a-grad-text: linear-gradient(90deg, #ff5ec4, #8b5cf6);
  --a-font: Poppins, Inter, "Segoe UI", Arial, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --a-safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--a-bg);
  color: #fff;
  font-family: var(--a-font);
  overscroll-behavior-y: none;
}

#app { min-height: 100vh; font-size: 16px; }

img { -webkit-user-drag: none; }

button { font-family: var(--a-font); }

input, select, textarea { font-family: var(--a-font); }

::-webkit-scrollbar { width: 0; height: 0; }

/* 遮罩层：等价原站 van-popup（center，半透明底） */
.aee-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .7);
  opacity: 0;
  transition: opacity .25s ease;
}
.aee-overlay--on { opacity: 1; }
.aee-overlay--z300 { z-index: 3000; }

/* Toast：等价原站 van-toast */
.aee-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(50, 50, 51, .88);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  word-break: break-word;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  z-index: 11000;   /* 必须盖在引导层(10000)、入口卡片(9999)、分享弹层(6500)之上 */
}
.aee-toast--on { opacity: 1; }
.aee-overlay--z300 { z-index: 3000; }

/* /share 顶部右侧容器（原站 CSS 里没有给它定义，靠 flex 自适应即可，这里补一条更稳的对齐） */
.right-controls { display: flex; align-items: center; }

/* 语言按钮展开态（JS 会加 .active，原站样式表里没有对应规则，补一个可见反馈） */
.language-selector-btn.active { opacity: .92; }
.language-selector-btn.active .lang-chevron { transform: rotate(180deg); }

/* /share 弹层：原站 CSS 里 .share-popup-root 是 z-index:1200，而顶部工具条是 6000、
   Share 按钮在 z-index:1 的容器里，导致弹层打开时顶部「返回 / 语言」还浮在遮罩之上、可以误触。
   这里把弹层提到 6500（仍低于 .share-btn 的 9000，但后者被父级 z-index:1 的层叠上下文限制，不会跑到弹层上面） */
body .share-popup-root { z-index: 6500; }

/* 语言下拉：限制高度并可滚动（原站为 body 下的绝对定位面板） */
.language-dropdown {
  max-height: 62vh;
  overscroll-behavior: contain;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}

/* /load 背景轮播淡入淡出（原站 bg-fade 过渡） */
.load-page .load-bg { transition: opacity 1s ease; }

/* 装饰图在原站也已 404，缺图时用渐变兜底 */
.invite-container,
.notfound-container { background-color: #05956b; }

/* --------------------------------------------------------------------------
   Safari 外跳引导（原站 safariGuide：微信 / Ins / TikTok 内置浏览器提示）
   -------------------------------------------------------------------------- */
.sg-mask {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 4, 14, .86);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  padding: 12px 16px calc(24px + var(--a-safe-bottom));
  opacity: 0;
  transition: opacity .3s ease;
}
.sg-mask--on { opacity: 1; }
.sg-top {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 132px;
}
.sg-arrow {
  width: 88px;
  height: 120px;
  color: #fff;
  margin-right: 6px;
}
.sg-card {
  margin-top: 6px;
  background: linear-gradient(180deg, #1e1638, #100a1f);
  border: 1px solid rgba(139, 92, 246, .22);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.sg-browser {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #ffffff8c;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 4px 10px;
  margin-bottom: 12px;
}
.sg-title { font-size: 17px; font-weight: 800; color: #fff; margin: 0 0 12px; }
.sg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-step { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: #ffffffcc; line-height: 1.5; }
.sg-step i {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--a-grad);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.sg-menu {
  margin: 14px 0 4px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  overflow: hidden;
}
.sg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sg-item:last-child { border-bottom: none; }
.sg-item--hl { background: rgba(139, 92, 246, .18); font-weight: 700; }
.sg-copy {
  margin-top: 14px;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--a-grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.sg-copy:active { opacity: .9; }
.sg-note { margin: 12px 0 0; font-size: 11px; color: #ffffff59; text-align: center; line-height: 1.5; }
.sg-close {
  margin-top: 14px;
  background: none;
  border: none;
  color: #ffffff73;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  align-self: center;
}

/* --------------------------------------------------------------------------
   登录页（/login）：原站用 Vant 组件，这里按同一视觉语言手写
   -------------------------------------------------------------------------- */
.lg-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, .3);
}
.lg-title { font-size: 20px; font-weight: 800; color: #111827; margin: 0; }
.lg-sub { font-size: 13px; color: #6b7280; margin: -8px 0 0; line-height: 1.5; }
.lg-link {
  background: none;
  border: none;
  color: var(--a-purple);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}
.lg-or { text-align: center; font-size: 12px; color: #9ca3af; }

/* RTL（阿拉伯语 / 希伯来语） */
[dir="rtl"] .sg-top { justify-content: flex-start; }
[dir="rtl"] .sg-arrow { margin-right: 0; margin-left: 6px; transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   PC 宽屏（≥900px）：原站本身就是响应式的（home 在 780px 以上是 900px 两栏、邀请/入口页是居中卡片），
   这里只补两处原站样式在宽屏下会"拉过头"的地方，其余保持原站断点行为。
   真实手机 / 窄窗口（<900px）不受影响。
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  body { background: #07050e; }
  /* 原站 .share-btn：width:60% + min-width:300px + position:fixed，宽屏会变成 700px+ 的巨型按钮 */
  #app .share-btn { width: 360px; max-width: 90%; }
  /* 分享页 5 个空位在宽屏用 100px 尺寸，配合 max-width 居中，避免贴边 */
  #app .invite-slots { max-width: 900px; margin-left: auto; margin-right: auto; }
  /* 404 / 分享页的底部装饰图在宽屏下不要横向拉满 */
  #app .money-bottom { max-width: 900px; margin: 0 auto; }
}
