/* ─── Loading Screen ─────────────────────────────────────── */
#loading-screen {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.loader-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 40px var(--accent-glow);
}
.loader-spinner {
  width: 28px; height: 28px;
  border: 2.5px solid rgba(255,255,255,.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loader-text { font-size: 14px; color: var(--text2); letter-spacing: .3px; }

/* ─── Header ──────────────────────────────────────────────── */
#app-header {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 20px 10px;
  background: rgba(10,10,18,.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.header-title { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.header-sub   { font-size: 11px; color: var(--text2); margin-top: 1px; }
.header-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 20px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; color: #fff;
  animation: floatBadge 3s ease-in-out infinite;
}

/* ─── Page container ──────────────────────────────────────── */
.page { display: none; padding: 16px 16px 0; }
.page.active { display: block; }

/* ─── Tab bar ─────────────────────────────────────────────── */
#tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(12,12,20,.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-around;
  padding-top: 8px;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 16px; border-radius: 12px; cursor: pointer;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
  border: none; background: none;
}
.tab-item:active { background: rgba(255,255,255,.06); }
.tab-icon  { font-size: 22px; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.tab-label { font-size: 10px; font-weight: 500; color: var(--text3); transition: color .2s; }
.tab-item.active .tab-icon  { transform: scale(1.18); }
.tab-item.active .tab-label { color: var(--accent); }
.tab-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); margin-top: -2px;
  display: none;
}
.tab-item.active .tab-dot { display: block; }
