/* ============================================================
   Aurent App — 壳层（状态栏 / 顶部栏 / 滚动视图 / 底部标签栏 / 抽屉 / 吐司）
   ============================================================ */

#app { min-height: 100vh; min-height: 100dvh; position: relative; }

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(760px 420px at 82% -12%, rgba(79,140,255,.16), transparent 62%),
    radial-gradient(560px 340px at -10% 18%, rgba(45,212,191,.08), transparent 66%),
    var(--bg);
  background-attachment: fixed;
}

/* ---------- 状态栏（模拟原生） ---------- */
.statusbar {
  height: calc(var(--status-bar-height) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--fg);
  flex: none;
  user-select: none;
}
.statusbar .sb-right { display: inline-flex; align-items: center; gap: 6px; }
.sb-bar { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.sb-bar i { width: 3px; border-radius: 1px; background: var(--fg); opacity: .9; }
.sb-bar i:nth-child(1) { height: 4px; }
.sb-bar i:nth-child(2) { height: 6px; }
.sb-bar i:nth-child(3) { height: 8px; }
.sb-bar i:nth-child(4) { height: 10px; opacity: .45; }
.sb-batt { width: 22px; height: 11px; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; padding: 1.5px; }
.sb-batt i { display: block; height: 100%; width: 74%; background: var(--fg); border-radius: 1.5px; }

/* ---------- 顶部栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  flex: none;
  background: rgba(8,9,12,.72);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--edge-2);
}
.navbar-in {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline: var(--pad);
}
.nav-title { font-family: var(--font-disp); font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.nav-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--fg-2);
  transition: background-color .16s ease, color .16s ease;
}
.nav-btn:hover { background: var(--glass); color: var(--fg); }
.nav-btn svg { width: 19px; height: 19px; }
.nav-act { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase;
}
.nav-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; }

/* ---------- 滚动视图 ---------- */
.view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 18px);
}
.page { padding: 16px var(--pad) 8px; }
.page-hd { padding: 4px 0 14px; }
.page-hd h1 { font-size: 25px; }
.page-hd p { margin-top: 6px; color: var(--fg-2); font-size: 13.5px; }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: calc(var(--tabbar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(10,12,16,.86);
  backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid var(--edge-2);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  letter-spacing: .01em;
  color: var(--fg-3);
  transition: color .18s ease;
}
.tab svg { width: 22px; height: 22px; stroke-width: 1.7; }
.tab.active { color: var(--brand-2); }
.tab.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 2px; border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
}
.tab-badge {
  position: absolute; top: 8px; left: calc(50% + 8px);
  min-width: 15px; height: 15px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--down); color: #1a0509;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
}

/* ---------- 侧边抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
  animation: fadeIn .22s ease both;
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 51;
  width: min(84vw, 330px);
  padding: calc(var(--status-bar-height) + var(--safe-top) + 12px) 0 20px;
  background: linear-gradient(168deg, var(--bg-1), var(--bg-2));
  border-right: 1px solid var(--edge);
  box-shadow: var(--sh-2);
  animation: drawerIn .28s cubic-bezier(.22,.72,.24,1) both;
  display: flex; flex-direction: column;
}
@keyframes drawerIn { from { transform: translateX(-102%); } to { transform: none; } }
.drawer-brand { padding: 0 20px 18px; border-bottom: 1px solid var(--edge-2); }
.drawer-brand b { font-family: var(--font-disp); font-size: 19px; font-weight: 700; }
.drawer-brand b i { font-style: normal; color: var(--brand); }
.drawer-brand small { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; color: var(--fg-3); text-transform: uppercase; }
.drawer-list { flex: 1; overflow-y: auto; padding: 12px 10px; }
.drawer-it {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 12px;
  border-radius: var(--r-md);
  font-size: 14.5px; color: var(--fg-2);
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}
.drawer-it:hover { background: var(--glass); color: var(--fg); }
.drawer-it svg { width: 18px; height: 18px; }
.drawer-it.on { background: var(--glass-2); color: var(--fg); font-weight: 600; }
.drawer-foot { padding: 12px 20px 0; border-top: 1px solid var(--edge-2); font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); }

/* ---------- 吐司 ---------- */
.toast-host {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 16px);
  z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 86vw;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20,23,30,.96);
  border: 1px solid var(--edge);
  box-shadow: var(--sh-2);
  font-size: 13.5px;
  color: var(--fg);
  animation: pop .26s cubic-bezier(.22,.72,.24,1) both;
}
.toast.ok { border-color: rgba(52,211,153,.4); }
.toast.err { border-color: rgba(251,113,133,.4); }

/* ---------- 启动屏 ---------- */
.splash {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background:
    radial-gradient(700px 420px at 50% 8%, rgba(79,140,255,.20), transparent 62%),
    var(--bg);
  animation: fadeIn .3s ease both;
}
.splash.out { animation: fadeOut .42s ease both; }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
.splash-in { text-align: center; }
.splash-mark {
  width: 76px; height: 76px; margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--brand), #7dd3fc);
  box-shadow: 0 22px 60px -26px rgba(79,140,255,.95);
  animation: pop .5s cubic-bezier(.22,.72,.24,1) both;
}
.splash-mark svg { width: 40px; height: 40px; color: #041018; }
.splash h1 { font-size: 26px; letter-spacing: .01em; }
.splash p { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--fg-3); text-transform: uppercase; }
.splash-bar { width: 132px; height: 3px; margin: 26px auto 0; border-radius: 2px; background: var(--edge-2); overflow: hidden; }
.splash-bar i {
  display: block; height: 100%; width: 40%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}

/* ---------- 桌面预览：约束到手机宽度 ---------- */
@media (min-width: 720px) {
  body { background: #050609; }
  .shell {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100dvh;
    border-left: 1px solid var(--edge-2);
    border-right: 1px solid var(--edge-2);
  }
  .tabbar { max-width: 460px; left: 50%; transform: translateX(-50%); }
  .toast-host { max-width: 460px; left: 50%; transform: translateX(-50%); }
  .drawer { max-width: 330px; }
}
