/* =====================================================================
   HDNA – giao dien mobile (quoc gia phi tap trung Web11)
   - 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(245, 196, 81, .35);
  --glow: rgba(155, 92, 246, .35);
  --gold: #f5c451;
  --cyan: #38bdf8;
  --purple: #9b5cf6;
  --pink: #ec4899;
  --green: #34d399;
  --txt: #f1eefc;
  --muted: #a99fc7;
}

* { 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: #07050f 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, menu+chuong TU CODE de len tren ===== */
.hero-banner { position: relative; border-radius: 18px; overflow: hidden; margin: -12px -14px 0; }
.hero-banner img { width: 100%; height: auto; display: block; }
.menu-btn {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  display: grid; gap: 5px; place-content: center; width: 36px; height: 36px;
}
.menu-btn span { width: 22px; height: 2.5px; border-radius: 99px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }
.bell-btn { position: absolute; right: 14px; top: 14px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; }
.bell-btn svg { width: 20px; height: 20px; color: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.5)); }
.bell-dot {
  position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%;
  background: #ef3b3b; box-shadow: 0 0 8px rgba(239,59,59,.8);
}

/* ===== 3 chi so: gop chung 1 cum, chia vach doc giua cac cot ===== */
.stat-cluster {
  display: flex; margin-top: 12px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: rgba(14,10,28,.6); box-shadow: 0 0 10px var(--glow);
  overflow: hidden;
}
.stat-col {
  position: relative; flex: 1 1 0; min-width: 0; padding: 10px 8px;
  border-left: 1px solid rgba(245,196,81,.25);
}
.stat-col:first-child { border-left: none; }
.stat-ic { display: block; width: 20px; height: 20px; margin-bottom: 4px; }
.stat-ic.gold { color: var(--gold); }
.stat-ic.cyan { color: var(--cyan); }
.stat-label { display: block; font-size: 6.5px; font-weight: 700; color: var(--muted); letter-spacing: .2px; }
.stat-col strong { display: block; font-size: 13px; font-weight: 900; margin-top: 2px; }
.stat-sub { display: block; font-size: 7px; color: var(--muted); margin-top: 1px; }
.stat-sub.up { color: var(--green); }
.mini-line { position: absolute; right: 6px; bottom: 8px; width: 34px; height: 14px; color: var(--green); }

/* ===== Luoi 15 icon: moi o la 1 anh PNG day du ===== */
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; }
.gtile { display: grid; justify-items: center; gap: 5px; text-align: center; }
.gtile img { width: 100%; height: auto; display: block; border-radius: 14px; }
.gtile strong { font-size: 8px; font-weight: 800; letter-spacing: .1px; color: var(--txt); line-height: 1.25; }
.gtile strong.gold { color: var(--gold); }
/* the giua noi bat: hien thi hinh tron */
.gtile-center img { border-radius: 50%; border: 1.5px solid var(--gold); box-shadow: 0 0 14px rgba(245,196,81,.5); }

/* ===== 2 banner tro ly: cung 1 hang ===== */
.assist-row { display: flex; gap: 8px; margin-top: 16px; }
.assist-bar { flex: 1 1 0; min-width: 0; border-radius: 13px; overflow: hidden; }
.assist-bar img { width: 100%; height: auto; display: block; }

/* ============== 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(14,10,26,.92), rgba(6,4,12,.98));
  border-top: 1px solid #2a2148;
  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: #83799f; font-size: 8px; font-weight: 700; letter-spacing: .2px;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--gold); }
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(245,196,81,.6)); }
.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(245,196,81,.6);
}
