/* =====================================================================
   HTRAVEL GROUP – He sinh thai du lich Web3 (giao dien mobile)
   - Toan trang BI KHOA truot ngang + doc; chi .screen cuon doc ben trong
   - Anh trong /public deu la PNG XAM placeholder, chi can thay file
   - Banner: chi code KHUNG + NUT, phan con lai la ANH (theo ti le anh)
   - Khoi nhieu o -> truot ngang
   - Hieu ung vien neon CHAY + CHOP (tone tim/xanh)
   ===================================================================== */

:root {
  --maxw: 440px;
  --bg: #080a1e;
  --purple: #a855f7;
  --blue: #3b82f6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --gold: #f5a623;
  --line: rgba(150,110,255,.42);
  --glow: rgba(130,90,255,.30);
  --neon: #b98bff;          /* vet sang chay tren vien */
  --card: rgba(16,16,42,.55);
  --txt: #eef0ff;
  --muted: #a3a8d4;
}

* { 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: var(--bg) 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 {
  height: 100%;
  padding: 12px 12px calc(92px + 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; }

/* ===== khung the chung ===== */
.card, .card-banner {
  border: 1.5px solid var(--line);
  background-color: var(--card);
  box-shadow: 0 0 12px var(--glow), inset 0 0 18px rgba(130,90,255,.08);
  backdrop-filter: blur(3px);
}

/* ======================= Header (gon tren 1 hang) ======================= */
.topbar { display: flex; align-items: center; gap: 7px; }
.menu-btn { flex: 0 0 auto; display: grid; gap: 4px; align-content: center; width: 26px; height: 30px; }
.menu-btn span { width: 20px; height: 2px; border-radius: 99px; background: #dfe2ff; box-shadow: 0 0 8px rgba(160,120,255,.7); }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; flex: 0 1 auto; }
.brand-logo { height: 28px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 0 8px rgba(150,110,255,.5)); }
.brand-slogan { font-size: 5.5px; font-weight: 700; letter-spacing: .6px; color: var(--muted); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; }
.bell-btn { position: relative; width: 30px; height: 30px; display: grid; place-items: center; }
.bell-btn svg { width: 20px; height: 20px; color: #dfe2ff; filter: drop-shadow(0 0 6px rgba(160,120,255,.6)); }
.bell-badge {
  position: absolute; top: 0; right: -1px; min-width: 14px; height: 14px; padding: 0 2px;
  border-radius: 99px; background: var(--pink); color: #fff; font-size: 8.5px; font-weight: 800;
  line-height: 14px; text-align: center; box-shadow: 0 0 8px rgba(236,72,153,.8);
}

/* vi pill (nho gon) */
.wallet-pill {
  display: flex; align-items: center; gap: 5px; padding: 4px 8px 4px 4px;
  border-radius: 99px; border: 1.5px solid var(--line);
  background: linear-gradient(90deg, rgba(40,20,80,.6), rgba(20,30,70,.6));
  box-shadow: 0 0 10px var(--glow);
}
.pill-coin { width: 22px; height: 22px; border-radius: 50%; }
.pill-amt { font-size: 11px; font-weight: 800; line-height: 1.05; }
.pill-amt small { font-size: 8.5px; color: var(--gold); }
.chev { font-style: normal; color: var(--muted); font-size: 13px; }

/* ===================== HERO BANNER ===================== */
.hero-banner { position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden; }
.hb-img { width: 100%; height: auto; display: block; }   /* theo ti le anh */
.hb-btn {
  position: absolute; left: 18px; bottom: 22px;
  height: 17px; padding: 0 9px; border-radius: 11px;   /* kich co con 50% */
  background: linear-gradient(90deg, var(--purple), var(--blue));
  color: #fff; font-size: 6px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 3px;
  box-shadow: 0 0 14px rgba(130,90,255,.6);
}
.hb-btn i, .see-all, .gem { font-style: normal; }
.dots { position: absolute; left: 18px; bottom: 10px; display: flex; gap: 5px; }
.dots span { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.4); }
.dots .on { width: 16px; background: #fff; }

/* ===================== Vi HTravel ===================== */
.wallet { margin-top: 12px; border-radius: 16px; padding: 12px; }
/* ep tat ca tren 1 hang: thong tin | luc giac | 4 nut */
.wallet-top { display: flex; align-items: center; gap: 9px; }
.wallet-info { flex: 0 1 auto; min-width: 0; }
.wallet-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.eye { width: 15px; height: 10px; border: 2px solid var(--muted); border-radius: 50%; position: relative; }
.eye::after { content: ""; position: absolute; inset: 2px 4px; border-radius: 50%; background: var(--muted); }
.wallet-balance { margin-top: 6px; font-size: 20px; font-weight: 900; line-height: 1; white-space: nowrap;
  background: linear-gradient(90deg, #c9b6ff, #7fb0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wallet-balance small { font-size: 11px; -webkit-text-fill-color: var(--muted); }
.wallet-usd { margin-top: 5px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.wallet-art {
  flex: 0 0 auto;
  width: 56px; height: 56px; object-fit: cover;
  /* hinh LUC GIAC DUNG (dinh nhon tren - duoi) */
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  filter: drop-shadow(0 0 10px var(--glow));
}
.wallet-actions { display: flex; gap: 7px; margin-left: auto; flex: 0 0 auto; }
.action { display: grid; justify-items: center; gap: 4px; }
.action-ic {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); background: rgba(40,30,80,.4);
  box-shadow: 0 0 10px var(--glow);
}
.action-ic svg { width: 19px; height: 19px; color: #cdb6ff; }
.action small { font-size: 9.5px; color: #d6daff; font-weight: 600; }

/* ===================== Dich vu (5 icon) ===================== */
.services { margin-top: 12px; border-radius: 16px; padding: 14px 6px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.svc { display: grid; justify-items: center; gap: 5px; text-align: center; }
/* icon dich vu = ANH PNG TRON */
.svc-ic { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 12px var(--glow); }
.svc-ic img { width: 100%; height: 100%; object-fit: cover; }
.svc strong { font-size: 11px; font-weight: 700; color: #e9ebff; }
.svc small { font-size: 9px; color: var(--muted); }

/* ===================== Tim kiem thong minh ===================== */
.search { margin-top: 12px; border-radius: 16px; padding: 14px; }
.search-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.search-title { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; }
.search-title svg { width: 18px; height: 18px; color: var(--purple); }
.ai-badge {
  font-size: 10px; font-weight: 700; color: #e7d6ff; padding: 4px 9px; border-radius: 99px;
  border: 1px solid rgba(168,85,247,.6); background: rgba(168,85,247,.18);
}
/* 4 field tren 1 hang */
.fields { display: flex; gap: 6px; margin-bottom: 11px; }
.field {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: flex-start; gap: 5px; padding: 2px;
}
.field-ic { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; color: var(--cyan); margin-top: 1px; }
.field-ic svg { width: 16px; height: 16px; }
.field > div { min-width: 0; }
.field small { display: block; font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field strong { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.15; }
.field em { font-style: normal; font-size: 8px; color: var(--muted); }
.search-btn {
  width: 100%; height: 46px; border-radius: 12px; margin-top: 3px;
  background: linear-gradient(90deg, #f5a623, #ec4899 45%, #7c3aed);
  color: #fff; font-size: 15px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 0 16px rgba(236,72,153,.5);
}
.search-btn svg { width: 20px; height: 20px; }

/* ===================== Tieu de section ===================== */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 10px; }
.sec-head h2 { font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.gem { color: var(--purple); font-size: 13px; }
.see-all { font-size: 11.5px; color: var(--blue); font-weight: 600; }

/* ===================== Uu dai (2 promo) ===================== */
.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
/* banner uu dai = ANH chiem toan bo, chi con NUT noi tren (khong chu) */
.promo {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1.5px solid var(--line); box-shadow: 0 0 12px var(--glow);
}
.promo-bg { width: 100%; height: auto; display: block; }   /* theo ti le anh */
.promo-btn {
  position: absolute; left: 12px; bottom: 2.4px;   /* gap day con 20% */
  padding: 3px 7px; border-radius: 4px;             /* kich co con 50% */
  background: linear-gradient(90deg, var(--purple), var(--blue));
  color: #fff; font-size: 5.5px; font-weight: 800; box-shadow: 0 0 8px rgba(130,90,255,.5);
}
.promo-btn.alt { background: linear-gradient(90deg, var(--gold), var(--pink)); }

/* ===================== Diem den (truot ngang) ===================== */
.dests, .tech {
  display: flex; gap: 9px;
  overflow-x: auto; overflow-y: hidden;
  touch-action: pan-x; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px;
}
.dests::-webkit-scrollbar, .tech::-webkit-scrollbar { height: 0; }
.dest { position: relative; flex: 0 0 auto; width: 116px; border-radius: 14px; overflow: hidden; }
.dest > img { width: 100%; height: auto; display: block; }   /* theo ti le anh */
.heart {
  position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10,10,30,.55); color: #fff; font-size: 13px; display: grid; place-items: center;
  backdrop-filter: blur(3px);
}
.dest-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(6,8,24,.92)); }
.dest-meta strong { display: block; font-size: 13px; font-weight: 800; }
.dest-meta small { display: block; font-size: 10px; color: var(--muted); }

/* ===================== Cong nghe (truot ngang) ===================== */
.tech-title { font-size: 14px; font-weight: 800; margin: 16px 2px 10px; }
.tech-item { flex: 0 0 auto; width: 92px; display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 12px 6px; border-radius: 14px;
  border: 1.5px solid var(--line);
  background: rgba(16,16,42,.5);
  box-shadow: 0 0 12px var(--glow); }
/* icon cong nghe = ANH PNG */
.tech-ic { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; }
.tech-ic img { width: 100%; height: 100%; object-fit: cover; }
.tech-item strong { font-size: 10.5px; font-weight: 700; color: #e9ebff; line-height: 1.15; }
.tech-item small { font-size: 9px; color: var(--muted); }

/* ===================== BOTTOM NAV (nut H luc giac o giua) ===================== */
.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,38,.86), rgba(7,8,22,.98));
  border-top: 1px solid rgba(150,110,255,.30);
  padding: 8px 6px calc(12px + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #6c6fa0; font-size: 10.5px; }
.nav-item svg { width: 23px; height: 23px; color: currentColor; }
.nav-item.active { color: var(--purple); }
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(168,85,247,.7)); }
.nav-center { position: relative; }
.nav-center-hex {
  width: 62px; height: 62px; margin-top: -28px;
  background: url("public/nav-center-btn.png") center / cover no-repeat;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  filter: drop-shadow(0 0 12px rgba(168,85,247,.7));
}

/* =====================================================================
   HIEU UNG VIEN NEON CHAY + CHOP (tone tim) tren cac KHOI/BANNER/NUT chinh
   ===================================================================== */
@property --neon-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.hero-banner, .card, .promo, .search-btn, .wallet-pill { position: relative; }

.hero-banner::after, .card::after, .promo::after, .search-btn::after, .wallet-pill::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--neon-a),
    transparent 0deg 55deg,
    rgba(185,139,255,.35) 80deg,
    var(--neon) 104deg,
    #ffffff 118deg,
    var(--neon) 132deg,
    rgba(120,170,255,.45) 156deg,
    transparent 185deg 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: neon-run 2.8s linear infinite;
  pointer-events: none; z-index: 5;
  filter: drop-shadow(0 0 4px var(--neon));
}
.card:nth-of-type(2)::after { animation-delay: -.5s; }
.card:nth-of-type(3)::after { animation-delay: -1.0s; }
.card:nth-of-type(4)::after { animation-delay: -1.5s; }
.promo:nth-of-type(2)::after { animation-delay: -.8s; }

.hero-banner, .card, .promo { animation: neon-blink 2.8s ease-in-out infinite; }
.card:nth-of-type(2) { animation-delay: -.5s; }
.card:nth-of-type(3) { animation-delay: -1.0s; }
.card:nth-of-type(4) { animation-delay: -1.5s; }
.promo:nth-of-type(2) { animation-delay: -.8s; }

@keyframes neon-run { to { --neon-a: 360deg; } }
@keyframes neon-blink {
  0%, 100% { box-shadow: 0 0 10px var(--glow), inset 0 0 16px rgba(130,90,255,.08); }
  50%      { box-shadow: 0 0 18px rgba(150,110,255,.7), inset 0 0 20px rgba(130,90,255,.16); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-banner, .card, .promo { animation: none; }
  .hero-banner::after, .card::after, .promo::after, .search-btn::after, .wallet-pill::after { animation: none; }
}
