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

html, body { overscroll-behavior: none; }   /* tắt hiệu ứng nảy -> không lộ khoảng đen khi kéo quá đà */
html { background: #000; }

:root {
  --red: #e0182d;
  --red-dark: #a50f1f;
  --bg: #000000;
  --card: #141414;
  --card-2: #1c1c1c;
  --line: #2a2a2a;
  --text: #ffffff;
  --muted: #9a9a9a;
  --gold: #f5c451;
}

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

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

/* ===== Phone frame ===== */
.phone {
  width: 100%;
  max-width: 390px;
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,.6);
}

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

/* ===== Header ===== */
.header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 12px;
}
.icon-btn {
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 4px; display: flex;
}
.icon-btn svg { width: 24px; height: 24px; }

.logo { display: flex; align-items: center; gap: 6px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  object-fit: cover; display: block;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-size: 15px; font-weight: 700; }
.logo-name b { color: var(--red); }
.logo-sub { font-size: 6.5px; color: var(--muted); letter-spacing: .5px; margin-top: 2px; }

.search {
  display: flex; align-items: center; gap: 6px;
  background: var(--card-2); border-radius: 20px;
  padding: 8px 12px; min-width: 0;
}
.search-ic { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 12px; width: 100%;
}
.search input::placeholder { color: var(--muted); }

.bell-btn { position: relative; }
.badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--red); color: #fff; font-size: 10px;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; padding: 0 4px;
}

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #222);
  overflow: hidden; flex-shrink: 0;
  border: 2px solid #333;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Content ===== */
.content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 14px 76px;   /* chừa chỗ cho thanh nav cố định ở đáy */
  scrollbar-width: none;        /* Firefox: ẩn thanh cuộn */
  -ms-overflow-style: none;     /* IE/Edge cũ */
}
.content::-webkit-scrollbar { width: 0; height: 0; display: none; }  /* Chrome/Safari */

/* ===== Placeholders (ảnh để trống) ===== */
.placeholder {
  background: repeating-linear-gradient(
    45deg, #f3f3f3, #f3f3f3 12px, #e9e9e9 12px, #e9e9e9 24px);
  border: 1px dashed #c4c4c4;
  color: #8a8a8a;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 4px;
  border-radius: 12px;
}
.placeholder span { font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.placeholder small { font-size: 10px; }

/* ===== Hero banner ===== */
.hero-banner { position: relative; margin-bottom: 16px; }
.banner-placeholder { height: 190px; }
/* class sẵn cho ảnh thật khi bạn thay vào */
.hero-img { width: 100%; height: auto; object-fit: contain; border-radius: 12px; display: block; }
.ai-img { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.ai-btn-img { width: 96px; height: 40px; object-fit: cover; border-radius: 8px; flex-shrink: 0; cursor: pointer; }
.proj-img { width: 100%; height: 100px; object-fit: cover; display: block; }
.hero-dots {
  position: absolute; bottom: 10px; left: 14px;
  display: flex; gap: 5px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.25); }
.dot.active { width: 16px; border-radius: 4px; background: var(--red); }

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

/* ===== Wallet ===== */
.wallet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: linear-gradient(135deg, #2a0c10, #160405);
  border: 1px solid #3a1418;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}
.wallet-title {
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  display: flex; align-items: center; gap: 6px;
}
.wallet-title .eye { width: 15px; height: 15px; color: var(--muted); }
.wallet-label { font-size: 10px; color: var(--muted); margin-top: 10px; }
.wallet-balance { font-size: 24px; font-weight: 800; margin: 2px 0 12px; }
.wallet-actions { display: flex; gap: 8px; }

.btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; border: none; border-radius: 9px;
  padding: 9px 8px; font-size: 11px; font-weight: 700;
  cursor: pointer; color: #fff; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-red { background: var(--red); }
.btn-outline { background: transparent; border: 1px solid #555; }

.wallet-right { display: flex; flex-direction: column; gap: 10px; }
.wallet-quick {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  background: rgba(255,255,255,.04);
  border-radius: 12px; padding: 10px 4px;
}
.quick {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; font-size: 8px; line-height: 1.15; color: #ccc; cursor: pointer;
  text-align: center; min-width: 0;
}
.quick svg { width: 16px; height: 16px; color: #eaeaea; flex-shrink: 0; }

.drpoint {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.04); border-radius: 12px;
  padding: 10px 12px; cursor: pointer;
}
.drpoint-label { font-size: 10px; color: var(--muted); }
.drpoint-value { font-size: 16px; font-weight: 800; color: var(--gold); }
.drpoint-value span { font-size: 10px; font-weight: 500; color: var(--muted); }
.drpoint .chev { width: 18px; height: 18px; color: var(--muted); }

/* ===== AI banner (chỉ ảnh + 1 nút CHAT NGAY) ===== */
.ai-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}
.ai-banner-img {
  width: 100%;
  display: block;
  border-radius: 16px;
}
.chat-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 16px;
  padding: 6px 11px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.chat-btn svg { width: 13px; height: 13px; }
.chat-btn:active { transform: scale(.96); }
.chat-btn { text-decoration: none; }

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

/* ===== Projects ===== */
.projects {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.projects::-webkit-scrollbar { display: none; }
.project-card {
  position: relative; flex: 0 0 150px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.project-img { height: 100px; border-radius: 0; border: none; border-bottom: 1px dashed #c4c4c4; }
.project-tag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 10px; padding: 3px 8px; border-radius: 6px;
}
.bookmark {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.55); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bookmark svg { width: 15px; height: 15px; }
.project-body { padding: 10px; }
.project-name { font-size: 13px; font-weight: 700; }
.project-loc {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--muted); margin: 5px 0 8px;
}
.project-loc svg { width: 12px; height: 12px; flex-shrink: 0; }
.project-price { font-size: 13px; font-weight: 800; color: var(--red); }

/* ===== Trust ===== */
.trust {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 8px;
  margin-bottom: 10px;
}
.trust-item {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px;
}
.trust-item svg { width: 26px; height: 26px; color: var(--red); }
.trust-item b { font-size: 9px; line-height: 1.2; }
.trust-item small { font-size: 7.5px; color: var(--muted); line-height: 1.2; }

.bottom-space { height: 24px; }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 390px; z-index: 50;   /* neo cố định vào đáy màn hình */
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  background: #0c0c0c;
  border-top: 1px solid var(--line);
  padding: 8px 4px 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));  /* tránh thanh home iOS */
}
.nav-item {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: var(--muted); font-size: 9px;
  min-width: 0; padding: 0;            /* mỗi item rộng đúng 1/7, căn đều 2 bên */
  white-space: nowrap;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--red); }

.nav-fab {
  background: var(--red);
  border: none;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  margin: 0 auto;                    /* nằm gọn trong thanh nav, không nhô lên */
  box-shadow: 0 4px 10px rgba(224,24,45,.4);
  overflow: hidden; text-decoration: none;
}
.nav-fab svg { width: 24px; height: 24px; }
.fab-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
