/* =====================================================================
   HCloud – giao dien mobile (luu tru phi tap trung Web10)
   - 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, .40);
  --glow: rgba(56, 189, 248, .40);
  --cyan: #38bdf8;
  --purple: #9b5cf6;
  --green: #34d399;
  --txt: #eef6ff;
  --muted: #9db3d6;
}

* { 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;
  /* anh nen PNG cho toan bo web (thay public/bg-app.png de doi nen) */
  background: #05070f 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; }

/* ======================= Header: banner full ngang, avatar + chuong de len tren ======================= */
.topbar { position: relative; }
.header-banner { width: 100%; height: auto; }

.profile-mini {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  display: grid; justify-items: center; gap: 3px; width: 62px;
}
.profile-mini-avatar {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--cyan); box-shadow: 0 0 10px rgba(56,189,248,.55);
}
.profile-mini strong {
  font-size: 10px; font-weight: 800; letter-spacing: .2px; text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
}
.hni-tag {
  font-size: 8.5px; font-weight: 700; color: var(--purple);
  background: rgba(5,7,15,.6);
  border: 1px solid rgba(155,92,246,.55); border-radius: 99px; padding: 0 7px;
}

.bell-btn {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  width: 36px; height: 36px; display: grid; place-items: center;
}
.bell-ic { width: 22px; height: 22px; color: #eef6ff; filter: drop-shadow(0 0 7px rgba(255,255,255,.5)); }
.bell-dot {
  position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: #ef3b3b; box-shadow: 0 0 8px rgba(239,59,59,.8);
}

/* ===== The dung luong: banner CO DINH chieu ngang + chieu cao (hinh chu nhat), anh tu thu nho theo chieu cao banner ===== */
.storage-card {
  display: flex; align-items: stretch;
  height: 150px; width: 100%;
  margin-top: 14px; border-radius: 18px; overflow: hidden;
  border: 1.5px solid var(--line);
  background: #000;
  box-shadow: 0 0 12px var(--glow);
}
/* anh scale theo chieu cao co dinh cua banner (khong crop, khong lam phinh banner) */
.storage-art { flex: 0 0 auto; height: 100%; width: auto; pointer-events: none; }
.storage-data { flex: 1 1 auto; min-width: 0; padding: 10px 12px 10px 10px; display: grid; gap: 3px; overflow: hidden; }
.storage-label { font-size: 9px; font-weight: 800; letter-spacing: .3px; color: var(--muted); }
.storage-value { font-size: 20px; font-weight: 900; line-height: 1; }
.storage-value small { font-size: 11px; font-weight: 800; }
.storage-total { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.storage-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.10); margin-top: 3px; overflow: hidden; }
.storage-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--purple), #f5c451); }
.storage-pct { font-size: 9px; font-weight: 800; color: var(--cyan); text-align: right; }
.network-label { margin-top: 6px; }
.network-stats { display: flex; gap: 10px; margin-top: 3px; }
.net-stat { display: flex; align-items: center; gap: 5px; }
.net-stat img { width: 20px; height: 20px; flex: 0 0 auto; }
.net-stat strong { display: block; font-size: 11px; font-weight: 800; }
.net-stat small { display: block; font-size: 7px; color: var(--muted); letter-spacing: .2px; }

/* ===== Banner Quantum Shield + nut TU CODE ===== */
.shield-banner { position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden; }
.shield-banner img { width: 100%; height: auto; }
.shield-btn {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  height: 32px; padding: 0 18px; border-radius: 99px;
  background: rgba(8,14,28,.55); border: 1.5px solid var(--cyan); color: #eaf7ff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  box-shadow: 0 0 10px rgba(56,189,248,.6); backdrop-filter: blur(3px);
}

/* ===== Luoi 12 icon (moi icon la 1 anh PNG day du) ===== */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.gicon img { width: 100%; height: auto; border-radius: 14px; }

/* ===== 2 the lon: 1 anh PNG + nut tron mui ten TU CODE ===== */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.feature-card { position: relative; border-radius: 16px; overflow: hidden; }
.feature-card img { width: 100%; height: auto; }
.feature-go {
  position: absolute; right: 10px; bottom: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(8,14,28,.6); border: 1.5px solid var(--cyan); color: #eaf7ff;
  font-size: 15px; font-weight: 900; display: grid; place-items: center;
  box-shadow: 0 0 10px rgba(56,189,248,.6); backdrop-filter: blur(3px);
}

/* ============== BOTTOM NAV (5 muc, port tu hgo/hvote) ============== */
.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(8,14,28,.92), rgba(4,7,15,.98));
  border-top: 1px solid #14243c;
  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: #7189ad; font-size: 10px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--cyan); }
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(56,189,248,.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(56,189,248,.6);
}
