/* ═══════════════════════════════════════════════════════════════
   Panel Bazaar BD — Base Styles & Reset
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

#app {
  position: relative;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  #app {
    max-width: 480px;
    box-shadow: -1px 0 0 rgba(139, 92, 246, 0.05), 1px 0 0 rgba(139, 92, 246, 0.05);
  }
  body {
    background:
      radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 50%, rgba(79, 70, 229, 0.02) 0%, transparent 50%),
      var(--bg-base);
  }
}

/* ── Typography System ── */
.headline-xl { font-weight: 900; font-size: 32px; letter-spacing: -0.04em; line-height: 1.1; }
.headline-lg { font-weight: 800; font-size: 24px; letter-spacing: -0.04em; line-height: 1.2; }
.headline-md { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; line-height: 1.2; }
.headline-sm { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; line-height: 1.3; }
.subheading  { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; }
.body-text   { font-weight: 400; font-size: 14px; line-height: 1.6; }
.caption     { font-weight: 500; font-size: 12px; line-height: 1.4; }
.overline    { font-weight: 700; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.mono        { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.price       { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-price); }
.taka::before { content: '\09F3'; }

/* ── Links ── */
a { color: var(--text-link); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }

/* ── Selection ── */
::selection { background: rgba(124, 58, 237, 0.3); color: #fff; }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* Smooth page container */
.page {
  display: none;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  min-height: 100dvh;
  animation: pageEnter 280ms var(--ease-out) forwards;
}
.page.active { display: block; }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* ── Utility Classes ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-xs { gap: 6px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }
.gap-xl { gap: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-dim { color: var(--text-muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
