/* =====================================================
   base.css — Reset & Global
   Expense Tracker v0.2.0
   ===================================================== */

/* ══════════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════════ */
#splashScreen {
  position: fixed; inset: 0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  pointer-events: none;
}
#splashScreen.fade-out {
  opacity: 0;
  transition: opacity .55s ease;
}
#splashScreen.hidden { display: none; }

.splash-content { text-align: center; }

/* 아이콘 — scale+fade 등장 */
.splash-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(.55);
  transition: opacity .7s cubic-bezier(.22,1,.36,1),
              transform .7s cubic-bezier(.22,1,.36,1);
}
.splash-icon-wrap.show { opacity: 1; transform: scale(1); }

/* 기본 이모지 아이콘 (커스텀 이미지로 교체 가능) */
.splash-emoji { font-size: 88px; line-height: 1; }

/* 커스텀 이미지 아이콘 (이미지 파일 사용 시) */
.splash-icon-wrap img {
  width: 96px; height: 96px;
  object-fit: contain; border-radius: 22px;
}

/* 브랜드 텍스트 — slide-up+fade 등장 */
.splash-brand {
  margin-top: 28px;
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.splash-brand.show { opacity: 1; transform: translateY(0); }

.splash-brand-name {
  font-size: 28px; font-weight: 900;
  color: #111; letter-spacing: -.5px;
  font-family: var(--font-sans);
}
.splash-brand-en {
  font-size: 10px; font-weight: 700;
  color: #bbb; letter-spacing: 4px;
  margin-top: 8px; text-transform: uppercase;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  padding-bottom: var(--bottom-nav);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none; /* Android Chrome pull-to-refresh 앱 전체 차단 */
}

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
}

img { max-width: 100%; display: block; }

a { color: var(--c-primary); text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 4px; }

/* ── Page container ── */
.content {
  padding: var(--sp-4);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── Page visibility ── */
.page { display: none; }
.page.active { display: block; animation: fadeIn .2s ease; }

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

/* ── Section title ── */
.section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: var(--c-text2); text-transform: uppercase;
  margin-bottom: var(--sp-3);
  display: flex; align-items: center; gap: var(--sp-2);
}

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 52px var(--sp-5);
  color: var(--c-text3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: var(--sp-3); }
.empty-state p { font-size: 14px; }

/* ── Spinner ── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  margin: 0 auto var(--sp-3);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
}

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--c-text3); font-size: 12px; margin: var(--sp-4) 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--c-border);
}

/* ── Utility ── */
.mt4  { margin-top: var(--sp-1); }
.mt8  { margin-top: var(--sp-2); }
.mt12 { margin-top: var(--sp-3); }
.mt16 { margin-top: var(--sp-4); }
.w100 { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap8 { gap: var(--sp-2); }
.gap12 { gap: var(--sp-3); }
.mono { font-family: var(--font-mono); }
