/* ── Splash Screen ─────────────────────────────────── */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#splash-screen.splash-fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  animation: splashFadeIn 0.8s ease both;
}

.splash-logo {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.splash-logo span {
  color: #6366f1;
}

.splash-tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 12px;
  letter-spacing: 0.5px;
  animation: splashFadeIn 0.8s ease 0.3s both;
}

.splash-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  animation: splashFadeIn 0.8s ease 0.6s both;
}

.splash-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.5);
  animation: splashPulse 1.4s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splashPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); background: #6366f1; }
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
}

#screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--safe-top);
  scroll-behavior: smooth;
}

/* ── Scrollbar ──────────────────────────────────────── */
#screen-container::-webkit-scrollbar { width: 0; }

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-body); font-weight: 700; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ── Tab Bar ────────────────────────────────────────── */
#tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  padding: 0 0 var(--safe-bottom);
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  justify-content: center;
  flex: 1;
}

.tab-item.active { color: var(--primary); }
.tab-item svg { width: 22px; height: 22px; }

.tab-badge {
  position: absolute;
  top: 2px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Header ─────────────────────────────────────────── */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  background: rgba(15, 15, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 5;
  border-bottom: 1px solid var(--border-accent);
}

.screen-header h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
}

.header-back {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.header-actions button svg,
.header-actions button i {
  pointer-events: none;
}

.logo-text {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo-text span { color: var(--primary); }

/* ── Screen Content ─────────────────────────────────── */
.screen { padding: 0 16px 24px; }
.screen-padded { padding: 16px; }

