/* ===== Reset & base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #070b16;
  --bg-2: #0c1322;
  --card: #111a2e;
  --card-2: #16203a;
  --line: #1f2b45;
  --text: #ffffff;
  --muted: #8893ab;
  --gold: #e8b552;
  --gold-2: #f4cf7d;
  --green: #29c46a;
  --blue: #3b82f6;
  --purple: #8b6bff;
  --orange: #f59e3c;
  --pink: #ec5b8a;
  --teal: #2dd4bf;
  --cyan: #38bdf8;
}

html, body {
  overflow-x: hidden;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #050810;
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.phone {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, #0e1730 0%, var(--bg) 55%);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,.6);
}

.ic { width: 16px; height: 16px; fill: currentColor; }

/* ===== Status bar ===== */
.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 20px 4px; font-size: 14px; font-weight: 600;
}
.status-icons { display: flex; gap: 6px; align-items: center; }

/* ===== Header ===== */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 14px;
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  color: #1a1205; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px;
  box-shadow: 0 4px 14px rgba(232,181,82,.35);
}
/* logo giờ là ảnh PNG (bạn tự chèn) */
.logo-mark-img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-size: 20px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-sub { font-size: 6.5px; color: var(--muted); letter-spacing: 1px; margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  background: none; border: none; color: #cfd6e4; cursor: pointer;
  padding: 6px; display: flex; position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.badge {
  position: absolute; top: 0; right: 0;
  background: #e0182d; color: #fff; font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ===== Content ===== */
.content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 14px;
}

/* ===== Greeting + asset ===== */
.greeting { display: flex; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.greet-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--gold); flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.greet-hello { font-size: 12px; color: var(--muted); }
.greet-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.vip {
  font-size: 9px; font-weight: 700; color: #1a1205;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  padding: 2px 7px; border-radius: 6px;
}

.asset-card {
  flex: 1; display: flex; gap: 8px; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.asset-label {
  font-size: 9px; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
}
.asset-label .eye { width: 12px; height: 12px; }
.asset-value { font-size: 17px; font-weight: 800; color: var(--gold-2); margin-top: 2px; }
.asset-unit { font-size: 9px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.coin-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  color: #1a1205; font-size: 8px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.asset-btns { display: flex; gap: 6px; }
.mini-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  border: none; border-radius: 10px; padding: 8px 12px;
  font-size: 11px; font-weight: 700; color: #fff; cursor: pointer;
}
.mini-btn svg { width: 16px; height: 16px; }
.mini-btn.green { background: rgba(41,196,106,.16); color: var(--green); border: 1px solid rgba(41,196,106,.4); }
.mini-btn.blue { background: rgba(59,130,246,.16); color: var(--blue); border: 1px solid rgba(59,130,246,.4); }

/* ===== Coin card ===== */
.coin-card {
  background: linear-gradient(135deg, #14203a, #0d1525);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.coin-head { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.coin-logo {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  color: #1a1205; font-weight: 900; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(232,181,82,.35);
}
.coin-title { font-size: 10px; color: var(--muted); font-weight: 600; }
.coin-amount { font-size: 17px; font-weight: 800; line-height: 1.15; }
.coin-amount span { font-size: 11px; color: var(--gold); }
.coin-vnd { font-size: 9px; color: var(--muted); }

.coin-actions { display: flex; gap: 8px; }
.coin-act {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 9px; color: #d4dae6; cursor: pointer;
}
.ca-ic {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.ca-ic svg { width: 18px; height: 18px; }
.ca-ic.green { background: rgba(41,196,106,.14); color: var(--green); }
.ca-ic.blue { background: rgba(59,130,246,.14); color: var(--blue); }
.ca-ic.purple { background: rgba(139,107,255,.14); color: var(--purple); }
.ca-ic.gold { background: rgba(232,181,82,.14); color: var(--gold); }

/* ===== AI banner ===== */
.ai-banner {
  position: relative; border-radius: 18px; overflow: hidden;
  margin-bottom: 18px;
}
.ai-banner-img { width: 100%; display: block; }
.ai-cta {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #6d4bff, #8b6bff);
  color: #fff; border: none; border-radius: 18px;
  padding: 7px 12px; font-size: 10.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(109,75,255,.45);
}
.ai-cta svg { width: 13px; height: 13px; }
.ai-cta:active { transform: scale(.97); }
.ai-cta, .nav-fab { text-decoration: none; }

/* ===== Services ===== */
.services {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px 6px; margin-bottom: 20px;
}
.service {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; cursor: pointer;
}
.svc-ic {
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .15s;
}
.svc-ic svg { width: 26px; height: 26px; }
.service:active .svc-ic { transform: scale(.92); }
/* ảnh thay cho nút dịch vụ (chiếm trọn 1 nút) */
.svc-ic-img {
  width: 52px; height: 52px; border-radius: 15px;
  object-fit: cover; display: block; transition: transform .15s;
}
.service:active .svc-ic-img { transform: scale(.92); }
.service b { font-size: 10.5px; font-weight: 700; }
.service small { font-size: 8px; color: var(--muted); line-height: 1.2; }

.svc-ic.gold { color: var(--gold); }
.svc-ic.purple { color: var(--purple); }
.svc-ic.green { color: var(--green); }
.svc-ic.orange { color: var(--orange); }
.svc-ic.pink { color: var(--pink); }
.svc-ic.blue { color: var(--blue); }
.svc-ic.teal { color: var(--teal); }
.svc-ic.cyan { color: var(--cyan); }
.svc-ic.gray { color: var(--muted); }

/* ===== Section head ===== */
.section-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.section-head h3 { font-size: 16px; font-weight: 800; }
.see-all {
  display: flex; align-items: center; gap: 2px;
  font-size: 12px; color: var(--gold); cursor: pointer;
}
.see-all svg { width: 14px; height: 14px; }

/* ===== Projects ===== */
.projects {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 22px; scrollbar-width: none;
}
.projects::-webkit-scrollbar { display: none; }
.project-card {
  flex: 0 0 170px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
}
.project-thumb { position: relative; }
.proj-img { width: 100%; height: 110px; object-fit: cover; display: block; }
.heart {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(8,12,22,.55); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.heart svg { width: 16px; height: 16px; }
.heart.saved { color: var(--pink); }
.project-body { padding: 10px 11px 12px; }
.project-name { font-size: 13.5px; font-weight: 800; }
.project-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.project-price { font-size: 13px; font-weight: 800; color: var(--gold-2); margin: 6px 0 5px; }
.project-loc {
  display: flex; align-items: center; gap: 3px;
  font-size: 9.5px; color: var(--muted);
}
.project-loc svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ===== News ===== */
.news { display: flex; gap: 10px; margin-bottom: 10px; }
.news-item {
  flex: 1.3; display: flex; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
}
.news-img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.news-body { display: flex; flex-direction: column; }
.news-title { font-size: 12px; font-weight: 700; line-height: 1.3; }
.news-desc { font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.news-meta { font-size: 9px; color: #5f6b85; margin-top: auto; padding-top: 5px; }

.coin-stat {
  flex: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
}
.cs-head { font-size: 10px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.cs-row { display: flex; align-items: center; gap: 8px; }
.cs-canvas { flex: 1; height: 52px; width: 100%; display: block; }
.cs-right { text-align: right; flex-shrink: 0; }
.cs-price { font-size: 17px; font-weight: 800; transition: color .2s; }
.cs-change { font-size: 11px; font-weight: 700; color: var(--green); }
.cs-change.down { color: #f06363; }

.bottom-space { height: 20px; }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: sticky; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: #080d18; border-top: 1px solid var(--line);
  padding: 8px 6px 10px;
}
.nav-item {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 10px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--gold); }

.nav-fab {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
/* nút AI tròn giờ là ảnh PNG (bạn tự chèn) */
.fab-img {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; display: block;
  transform: translateY(-16px);
  box-shadow: 0 0 18px rgba(123,75,255,.7), 0 0 4px rgba(123,75,255,.9);
}
.fab-label { font-size: 10px; font-weight: 700; color: var(--purple); transform: translateY(-12px); }
