/* =====================================================================
   Ke Toan 24H – giao dien mobile (Blockchain Quantum Web22)
   - Toan trang BI KHOA truot ngang + doc (rubber-band)
   - Chi vung .screen duoc cuon doc ben trong
   - Anh trong /public giu nguyen ten, chi can thay file
   ===================================================================== */

:root {
  --maxw: 440px;
  --line: rgba(56, 189, 248, .35);
  --glow: rgba(56, 189, 248, .30);
  --gold: #f5c451;
  --cyan: #38bdf8;
  --purple: #9b5cf6;
  --green: #34d399;
  --red: #f87171;
  --txt: #eef3ff;
  --muted: #9aa6c8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  color: var(--txt);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  touch-action: none;
  background: #05060f url("public/bg-app.png") center top / cover no-repeat;
}

a { text-decoration: none; color: inherit; }
button { border: 0; font: inherit; color: inherit; cursor: pointer; background: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.app {
  position: relative;
  width: min(100vw, var(--maxw));
  height: 100%;
  margin: 0 auto;
}

.screen {
  position: relative;
  height: 100%;
  padding: 12px 14px calc(86px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.screen::-webkit-scrollbar { width: 0; height: 0; }

/* ======================= Banner hero: 1 anh PNG lam nen, header de len tren ======================= */
.hero-wrap { position: relative; margin-top: 10px; border-radius: 18px; overflow: hidden; }
.hero-banner { width: 100%; height: auto; display: block; }

.topbar {
  position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.hd-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--cyan); box-shadow: 0 0 8px rgba(56,189,248,.5);
}
.hd-info { flex: 1 1 auto; min-width: 0; }
.hd-name { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.verify-check { width: 13px; height: 13px; color: var(--cyan); flex: 0 0 auto; }
.hd-biz {
  display: flex; align-items: center; gap: 3px; font-size: 10px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,.9);
}
.hd-biz svg { width: 12px; height: 12px; flex: 0 0 auto; }

.hd-ic { position: relative; flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; color: var(--txt); }
.hd-ic svg { width: 19px; height: 19px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.8)); }
.hd-badge {
  position: absolute; top: -2px; right: -2px; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 99px; background: #ef3b3b; color: #fff; font-size: 8.5px; font-weight: 800;
  line-height: 14px; text-align: center; box-shadow: 0 0 6px rgba(239,59,59,.8);
}
.ai-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(160deg, #38bdf8, #9b5cf6);
  color: #fff; font-size: 11px; font-weight: 900;
  border: 1.5px solid rgba(255,255,255,.4);
  box-shadow: 0 0 10px rgba(155,92,246,.6);
}

/* ===== 4 the tai chinh: icon tron to o giua, noi dung can giua ===== */
.fin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.fin-card {
  border-radius: 13px; padding: 12px 6px 10px;
  background: rgba(12,14,32,.6); box-shadow: 0 0 8px var(--glow);
  display: grid; justify-items: center; gap: 4px; text-align: center;
}
.fin-card.blue { border: 1.5px solid rgba(56,189,248,.5); }
.fin-card.green { border: 1.5px solid rgba(52,211,153,.5); }
.fin-card.purple { border: 1.5px solid rgba(155,92,246,.5); }
.fin-card.gold { border: 1.5px solid rgba(245,196,81,.5); }
.fin-ic {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 2px;
}
.fin-ic svg { width: 22px; height: 22px; }
.fin-card.blue .fin-ic { background: radial-gradient(circle, rgba(56,189,248,.25), transparent 70%); color: var(--cyan); box-shadow: 0 0 12px rgba(56,189,248,.6); }
.fin-card.green .fin-ic { background: radial-gradient(circle, rgba(52,211,153,.25), transparent 70%); color: var(--green); box-shadow: 0 0 12px rgba(52,211,153,.6); }
.fin-card.purple .fin-ic { background: radial-gradient(circle, rgba(155,92,246,.25), transparent 70%); color: var(--purple); box-shadow: 0 0 12px rgba(155,92,246,.6); }
.fin-card.gold .fin-ic { background: radial-gradient(circle, rgba(245,196,81,.25), transparent 70%); color: var(--gold); box-shadow: 0 0 12px rgba(245,196,81,.6); }
.fin-label { font-size: 7px; font-weight: 700; color: var(--muted); letter-spacing: .2px; }
.fin-card strong { font-size: 11px; font-weight: 900; }
.fin-sub { font-size: 7px; }
.fin-sub.up { color: var(--green); }
.fin-sub.down { color: var(--red); }

/* ===== Luoi 12 icon: anh PNG + chu chu thich TU CODE ===== */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.gtile { display: grid; justify-items: center; gap: 5px; text-align: center; }
.gtile img { width: 100%; height: auto; border-radius: 14px; display: block; }
.gtile strong { font-size: 8px; font-weight: 800; letter-spacing: .1px; color: var(--txt); line-height: 1.25; }
.gtile-center img { border-radius: 50%; border: 1.5px solid var(--cyan); box-shadow: 0 0 14px rgba(56,189,248,.6); }
.gtile strong.cyan { color: var(--cyan); }

.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.25); }
.dots span.active { background: var(--cyan); box-shadow: 0 0 6px rgba(56,189,248,.8); width: 16px; border-radius: 99px; }

/* ===== hang truot ngang chung ===== */
.hscroll {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.hscroll::-webkit-scrollbar { height: 0; }

/* ===== 3 the tinh nang: anh PNG + nut mui ten TU CODE de len tren ===== */
.feature-row { margin-top: 14px; }
.feature-card {
  position: relative; flex: 0 0 190px; border-radius: 14px; overflow: hidden;
  border: 1.5px solid var(--line); box-shadow: 0 0 8px var(--glow);
}
.feature-card img { width: 100%; height: auto; display: block; }
.feat-go {
  position: absolute; right: 10px; bottom: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(8,10,24,.6); border: 1.5px solid var(--cyan); color: #eaf7ff;
  font-size: 14px; display: grid; place-items: center;
  box-shadow: 0 0 10px rgba(56,189,248,.6); backdrop-filter: blur(3px);
}

/* ============== BOTTOM NAV (5 muc) ============== */
.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around; align-items: flex-end;
  background: linear-gradient(180deg, rgba(10,12,26,.92), rgba(4,5,12,.98));
  border-top: 1px solid #1c2440;
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: #7581a8; font-size: 10px;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--cyan); }
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(56,189,248,.6)); }
.nav-item-badge { position: relative; display: inline-flex; }
.nav-item-badge i {
  position: absolute; top: -10px; right: -10px; font-style: normal;
  min-width: 14px; height: 14px; border-radius: 99px; background: #ef3b3b; color: #fff;
  font-size: 8.5px; font-weight: 800; line-height: 14px; text-align: center;
}
.nav-center { position: relative; }
.nav-center-circle {
  width: 58px; height: 58px;
  margin-top: -24px;
  border-radius: 50%;
  background-image: url("public/nav-center-btn.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 16px rgba(56,189,248,.6);
}
.nav-center-label { margin-top: -2px; font-size: 9px; font-weight: 800; color: var(--cyan); }
