:root {
  --bg: #0f1420; --bg2: #161d2e; --card: #1b2438; --line: #2a3550;
  --text: #e8ecf5; --muted: #93a0b8; --accent: #ffb300; --accent2: #ff5722;
  --green: #4caf50; --red: #f44336; --blue: #2196f3;
  --input-bg: #0d1322; --th-bg: #141b2e; --hover-bg: #0d1322;
  --on-accent: var(--on-accent); --hero-glow: #2a1f3d; --step-bg: #0a0f1c88;
  --ticker-bg: #10182b;
  --alert-err-bg: #3d1414; --alert-err-text: #ffb4ab;
  --alert-ok-bg: #12341a; --alert-ok-text: #b9f0c0;
  --badge-warn-bg: #3a2c10; --badge-info-bg: #10324a; --badge-info-text: #7cc7ff;
  --badge-ok-bg: #12341a; --badge-ok-text: #7de08a;
  --badge-err-bg: #3d1414; --badge-err-text: #ff9d94;
  --notif-unread-bg: #241b0d;
}
/* Giao dien sang */
[data-theme="light"] {
  --bg: #f2f5fa; --bg2: #ffffff; --card: #ffffff; --line: #dde4f0;
  --text: #1a2333; --muted: #5b6b84;
  --input-bg: #eef1f7; --th-bg: #e9edf5; --hover-bg: #e9edf5;
  --hero-glow: #ffe3b3; --step-bg: #ffffffd9; --ticker-bg: #e6ebf4;
  --alert-err-bg: #fdecea; --alert-err-text: #b3261e;
  --alert-ok-bg: #e6f4ea; --alert-ok-text: #137333;
  --badge-warn-bg: #fef3d8; --badge-info-bg: #e3f2fd; --badge-info-text: #0b62a4;
  --badge-ok-bg: #e6f4ea; --badge-ok-text: #137333;
  --badge-err-bg: #fdecea; --badge-err-text: #b3261e;
  --notif-unread-bg: #fff7e0;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Be Vietnam Pro', 'Segoe UI', system-ui, -apple-system, sans-serif; min-height: 100vh;
  display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; width: 100%; flex: 1; }
.narrow { max-width: 620px; margin: 0 auto; }

/* topbar */
.topbar { background: var(--bg2); border-bottom: 1px solid var(--line);
  padding: 12px 20px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px; position: sticky; top: 0; z-index: 10; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar nav a:not(.btn) { color: var(--muted); }
.topbar nav a:not(.btn):hover { color: var(--text); }
.admin-link { color: var(--accent2) !important; font-weight: 700; }
.balance { background: var(--input-bg); border: 1px solid var(--line); padding: 5px 12px; border-radius: 20px; font-size: .9rem; }
.balance b { color: var(--green); }
.hello { color: var(--muted); font-size: .9rem; }

/* buttons */
.btn { display: inline-block; padding: 10px 22px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 1rem; font-weight: 600; background: var(--line); color: var(--text); }
.btn:hover { text-decoration: none; filter: brightness(1.15); }
.btn.primary { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: var(--on-accent); }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.full { width: 100%; }

/* hero */
.hero { text-align: center; padding: 40px 16px; background: radial-gradient(ellipse at top, var(--hero-glow), var(--bg));
  border-radius: 16px; margin-bottom: 28px; border: 1px solid var(--line); }
.hero h1 { margin: 0 0 8px; font-size: 2rem; }
.hero p { color: var(--muted); }
.hero-steps { display: flex; justify-content: center; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.hero-steps div { background: var(--step-bg); padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); }
.hero-steps span { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 1rem; line-height: 1; margin-right: 10px; }

.section-title { margin: 30px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card.service h3 { margin-top: 0; color: var(--accent); }
.card.stat { text-align: center; }
.card.stat span { color: var(--muted); font-size: .9rem; }
.card.stat b { display: block; font-size: 1.8rem; margin: 8px 0; }
.price { color: var(--green); font-weight: 700; }
.price.big { font-size: 1.6rem; }
.warn { color: var(--accent) !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.card.service .btn { margin-top: 12px; }

/* forms */
.auth-box { max-width: 420px; margin: 40px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.form-card { background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px; margin-bottom: 20px; }
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .95rem; }
input, textarea, select { width: 100%; margin-top: 6px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--input-bg);
  color: var(--text); font-size: 1rem; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input { width: auto; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.alert { padding: 12px 16px; border-radius: 8px; margin: 12px 0; }
.alert.error { background: var(--alert-err-bg); border: 1px solid var(--red); color: var(--alert-err-text); }
.alert.success { background: var(--alert-ok-bg); border: 1px solid var(--green); color: var(--alert-ok-text); }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--th-bg); color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }
code { background: var(--input-bg); padding: 2px 8px; border-radius: 6px; font-size: .85rem; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.st-cho_xu_ly { background: var(--badge-warn-bg); color: var(--accent); }
.st-dang_lam { background: var(--badge-info-bg); color: var(--badge-info-text); }
.st-hoan_thanh { background: var(--badge-ok-bg); color: var(--badge-ok-text); }
.st-da_huy { background: var(--badge-err-bg); color: var(--badge-err-text); }
.rc-cho_duyet { background: var(--badge-warn-bg); color: var(--accent); }
.rc-da_duyet { background: var(--badge-ok-bg); color: var(--badge-ok-text); }
.rc-tu_choi { background: var(--badge-err-bg); color: var(--badge-err-text); }

/* admin */
.admin-layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; align-items: start; }
/* Trang admin: cho body nở theo nội dung rộng (bảng), header/footer full theo */
body.fit-wide { width: fit-content; min-width: 100%; }
.admin-nav { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.admin-nav a { padding: 10px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.admin-nav a:hover { background: var(--hover-bg); text-decoration: none; color: var(--text); }
.searchbar, .filterbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.searchbar input { width: 300px; margin: 0; }
.filterbar a { padding: 6px 14px; border-radius: 16px; border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.filterbar a.active, .filterbar a:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); text-decoration: none; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0; }
.inline-form input, .inline-form select { width: auto; margin: 0; padding: 6px 10px; font-size: .85rem; }
.w-110 { width: 110px !important; } .w-140 { width: 140px !important; }
/* Thanh lưu tất cả: dính đáy khi cuộn */
.savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-top: 16px;
  box-shadow: 0 -4px 18px rgba(0,0,0,.35); }

.footer { text-align: center; padding: 24px; color: var(--muted); border-top: 1px solid var(--line);
  margin-top: 40px; font-size: .9rem; }
.footer p { margin: 4px 0; }

@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .row2 { grid-template-columns: 1fr; }
}

/* ===== Hiệu ứng sinh động ===== */
.hero-sub { font-size: 1.1rem; }
.hero-sub b { color: var(--accent); }

/* Khung phát sáng chạy vòng quanh hero */
.fx-frame { position: relative; }
.fx-frame::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 2px;
  background: conic-gradient(from var(--a, 0deg), #ffb300, #ff5722, #7c4dff, #00e5ff, #ffb300);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-border 5s linear infinite; pointer-events: none;
}
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin-border { to { --a: 360deg; } }

/* Tiêu đề bay nhẹ */
.float { animation: floaty 3s ease-in-out infinite; display: inline-block; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Card dịch vụ: hover nổi lên + phát sáng */
.card.service { transition: transform .25s ease, box-shadow .25s ease; }
.card.service:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 14px 34px #ff572233, 0 0 0 1px var(--accent), 0 0 24px #ffb30033;
}
.hero-steps div { transition: transform .2s, box-shadow .2s; cursor: default; }
.hero-steps div:hover { transform: translateY(-3px); box-shadow: 0 6px 18px #ffb30044; border-color: var(--accent); }

/* Nút bấm: hover sáng + nhấn nảy */
.btn { transition: transform .15s, filter .15s, box-shadow .15s; }
.btn:hover { box-shadow: 0 4px 16px #ffb30055; }
.btn:active { transform: scale(.96); }

/* Hiệu ứng click chuột */
.click-fx {
  position: fixed; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid var(--accent);
  pointer-events: none; z-index: 9999;
  animation: click-pop .65s ease-out forwards;
}
@keyframes click-pop {
  from { transform: scale(.3); opacity: 1; }
  to { transform: scale(3.2); opacity: 0; }
}
.click-star {
  position: fixed; font-size: 16px; pointer-events: none; z-index: 9999;
  animation: star-fly .9s ease-out forwards;
}
@keyframes star-fly {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to { transform: translateY(-46px) scale(.4) rotate(40deg); opacity: 0; }
}

/* ===== Thông báo & badge số lượng ===== */
.count-badge {
  display: inline-block; background: var(--red); color: #fff;
  font-size: .75rem; font-weight: 700; min-width: 20px; height: 20px;
  line-height: 20px; text-align: center; border-radius: 10px;
  padding: 0 6px; margin-left: 6px; vertical-align: middle;
}
.bell { position: relative; font-size: 1.25rem; }
.bell:hover { text-decoration: none; }
.bell .count-badge { position: absolute; top: -8px; right: -12px; margin: 0; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.notif {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; color: var(--text);
}
.notif:hover { text-decoration: none; border-color: var(--accent); }
.notif.unread { border-color: var(--accent); background: var(--notif-unread-bg); box-shadow: 0 0 12px #ffb30033; }
.notif p { margin: 0 0 6px; }


/* ===== Menu kiểu mới ===== */
.topbar { border-bottom: 2px solid #ff5722; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { padding: 10px 16px; border-radius: 8px; color: var(--muted);
  font-weight: 700; font-size: .92rem; white-space: nowrap; }
.mainnav a:hover, .mainnav a.active { color: var(--accent); background: rgba(255,179,0,.08); text-decoration: none; }
.userbox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.login-btn {
  background: linear-gradient(135deg, #f44336, #c62828); color: #fff !important;
  font-weight: 800; padding: 10px 30px; border: none; cursor: pointer; font-size: .95rem;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.login-btn:hover { filter: brightness(1.2); text-decoration: none; color: #fff !important; }

/* ===== Thanh chạy đơn hoàn thành ===== */
.ticker { overflow: hidden; background: var(--ticker-bg); border-bottom: 1px solid var(--line);
  margin: 0 -16px 20px; }
.ticker-track { display: inline-flex; white-space: nowrap; padding: 9px 0;
  animation: ticker-scroll 40s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { padding: 0 30px; font-size: .88rem; color: var(--muted); border-right: 1px solid var(--line); }
.ticker-item i { font-style: normal; opacity: .35; margin: 0 4px; }
.ticker-item .done { color: #4caf50; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Footer 3 cột ===== */
.footer3 { background: #0b1120; border-top: 2px solid #ff5722; margin-top: 44px; padding: 36px 20px 14px; }
.footer-grid { max-width: 1100px; margin: 0 auto 18px; display: grid;
  grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: #fff; margin: 0 0 10px; font-size: .98rem; letter-spacing: 1px; }
.footer-grid p { margin: 8px 0; color: var(--muted); }
.flogo { font-family: 'Arial Black', 'Segoe UI', sans-serif; font-weight: 900; font-size: 1.1rem;
  background: linear-gradient(180deg, #fffbe8, #ffb300 55%, #ff7b00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(255,150,0,.5)); margin-bottom: 8px; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
  .mainnav a { padding: 8px 10px; font-size: .82rem; }
}

.service-img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; display: block; }
.zalo-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.zalo-link:hover { text-decoration: underline; }

.logo img { height: 54px; width: auto; display: block; border-radius: 8px; }
.hero-logo { width: min(560px, 94%); height: auto; border-radius: 12px; display: block; margin: 0 auto; }
.flogo img { max-width: 300px; width: 100%; height: auto; border-radius: 10px; display: block; }

/* ===== Logo chữ tĩnh: rõ nét như hình mẫu, không ảnh, không hiệu ứng ===== */
.logo-text {
  font-weight: 900; font-size: 1.45rem; letter-spacing: 2px; white-space: nowrap;
  background: linear-gradient(180deg, #fff3c4, #ffcf40 55%, #ff9500);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-text:hover { text-decoration: none; }
.hero-logo-text {
  font-weight: 900; font-size: clamp(1.2rem, 7vw, 3.2rem); letter-spacing: 0.05em;
  text-align: center; white-space: nowrap; line-height: 1.2;
  background: linear-gradient(180deg, #fff3c4, #ffcf40 55%, #ff9500);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 760px) {
  .logo-text { font-size: 1.02rem; letter-spacing: 1px; }
  .hero-logo-text { letter-spacing: 0.05em; }
}
/* Cum tu khong tach dong (vd: TỰ ĐỘNG) */
.logo-fire-sub .nw { white-space: nowrap; }

/* ===== MODAL HƯỚNG DẪN SỬ DỤNG ===== */
.guide-modal {
  position: fixed; inset: 0; z-index: 1002;
  background: rgba(5,8,16,.82);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.guide-modal[hidden] { display: none; }
.guide-box {
  position: relative; width: min(540px, 94vw); max-height: 92vh;
  display: flex; flex-direction: column;
  background: linear-gradient(170deg, #1d2540, #12172a 60%, #0d1120);
  border-radius: 20px; color: #e8ecf5;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 44px rgba(255,170,0,.16);
}
.guide-scroll { overflow-y: auto; padding: 30px 26px 24px; border-radius: 20px;
  scrollbar-width: none; -ms-overflow-style: none; }
.guide-scroll::-webkit-scrollbar { display: none; }
.guide-head { text-align: center; }
.guide-box::before {
  content: ''; position: absolute; inset: 0; border-radius: 20px; padding: 2px;
  background: conic-gradient(from 20deg, #ffb300, #ff5722, #7c4dff, #00e5ff, #ffb300);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.guide-modal:not([hidden]) .guide-box { animation: guide-in .45s cubic-bezier(.2,.9,.3,1.15); }
@keyframes guide-in { from { transform: translateY(30px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.guide-close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: #aab6cf;
  width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer;
}
.guide-close:hover { color: #fff; background: rgba(255,255,255,.16); }
.guide-emoji { font-size: 3.4rem; line-height: 1; animation: guide-bounce 1.8s ease-in-out infinite; }
@keyframes guide-bounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-9px) scale(1.07); } }
.guide-head h2 { margin: 10px 0 6px; font-size: 1.4rem; letter-spacing: 1px; color: #fff; }
.gold-text {
  background: linear-gradient(180deg, #fff3c4, #ffcf40 55%, #ff9500);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255,160,0,.45));
}
.guide-head > p { margin: 0 0 4px; color: #93a0b8; }
.guide-steps { position: relative; text-align: left; margin: 20px 0 10px; }
.guide-steps::before {
  content: ''; position: absolute; left: 25px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #ffb300, #ff572280, #ffb30022);
}
.gstep {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; position: relative;
}
.gnum {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; position: relative; z-index: 1;
  background: linear-gradient(135deg, #ffc93c, #ff9d00 60%, #ff7300);
  color: #3a2200; font-weight: 900; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(255,170,0,.6), inset 0 1px 0 rgba(255,255,255,.55);
}
.gbody {
  flex: 1; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 12px 14px;
}
.gbody h4 { margin: 0 0 6px; color: #ffcf40; font-size: 1rem; }
.gbody p { margin: 0; font-size: .9rem; line-height: 1.6; color: #dbe2f0; }
.gbody p b { color: #fff; }
.gtip {
  margin-top: 9px !important; background: rgba(255,179,0,.1);
  border: 1px dashed rgba(255,179,0,.55); border-radius: 9px; padding: 8px 10px; font-size: .85rem;
}
.guide-noshow {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #93a0b8; font-size: .85rem; margin: 8px 0 14px; cursor: pointer; font-weight: 400;
}
.guide-noshow input { width: auto; margin: 0; accent-color: #ffb300; }
.guide-cta { width: 100%; font-size: 1.08rem; padding: 14px; position: relative; overflow: hidden; }
.guide-cta::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  animation: cta-shine 2.8s ease-in-out infinite; pointer-events: none;
}
@keyframes cta-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@media (max-width: 760px) {
  .guide-box { display: flex; }
  .guide-scroll { padding: 26px 16px 20px; }
  .guide-head h2 { font-size: 1.15rem; }
  .guide-emoji { font-size: 2.8rem; }
  .gnum { width: 38px; height: 38px; font-size: 1.1rem; }
  .guide-steps::before { left: 22px; }
  .gbody h4 { font-size: .95rem; }
  .gbody p { font-size: .85rem; }
}

/* ===== VÒNG QUAY MAY MẮN ===== */
.spin-float {
  position: fixed; left: 18px; bottom: 86px; width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #2a1f3d, #161226);
  border: 2px solid #ffb300; cursor: pointer; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(255,150,0,.5);
  animation: spin-glow 2s infinite;
}
.spin-float:hover { transform: scale(1.1); }
.spin-mini-wheel {
  width: 38px; height: 38px; border-radius: 50%; position: relative; flex-shrink: 0;
  background: conic-gradient(#f44336 0 36deg, #ff9800 36deg 72deg, #ffc107 72deg 108deg, #4caf50 108deg 144deg, #2196f3 144deg 180deg, #9c27b0 180deg 216deg, #ff5722 216deg 252deg, #00bcd4 252deg 288deg, #8bc34a 288deg 324deg, #e91e63 324deg 360deg);
  border: 2px solid rgba(255,255,255,.4);
  animation: mini-spin 7s linear infinite;
}
.spin-mini-wheel::after {
  content: ''; position: absolute; inset: 11px; border-radius: 50%;
  background: #1b2438; border: 2px solid #ffb300;
}
@keyframes mini-spin { to { transform: rotate(360deg); } }
@keyframes spin-glow {
  0% { box-shadow: 0 0 0 0 rgba(255,170,0,.55); }
  70% { box-shadow: 0 0 0 14px rgba(255,170,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,170,0,0); }
}
.spin-count {
  position: absolute; top: -8px; right: -8px; background: var(--red); color: #fff;
  font-size: .75rem; font-weight: 700; min-width: 22px; height: 22px; line-height: 22px;
  text-align: center; border-radius: 11px; padding: 0 5px;
}
.spin-modal {
  position: fixed; inset: 0; z-index: 1001; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.spin-modal[hidden] { display: none; }
.spin-box {
  background: var(--card); border: 1px solid var(--accent); border-radius: 18px;
  padding: 22px 18px; width: min(440px, 94vw); max-height: 94vh; overflow-y: auto; overflow-x: hidden;
  position: relative; text-align: center;
  box-shadow: 0 0 40px rgba(255,170,0,.25);
  scrollbar-width: none; -ms-overflow-style: none;
}
.spin-box::-webkit-scrollbar { display: none; }
.spin-box h3 { margin: 0 0 6px; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff3c4, #ffcf40 55%, #ff9500);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.spin-close {
  position: absolute; top: 8px; right: 10px; background: transparent; border: none;
  color: var(--muted); font-size: 1.3rem; cursor: pointer; padding: 6px;
}
.spin-close:hover { color: var(--text); }
.spin-wheel-wrap { position: relative; width: min(78vw, 340px); margin: 10px auto; }
.spin-wheel-clip { overflow: hidden; border-radius: 50%; box-shadow: 0 0 30px rgba(255,170,0,.35); }
.spin-wheel-clip canvas { width: 100%; height: auto; display: block; border-radius: 50%; will-change: transform; }
.spin-pointer {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 22px solid #ffb300; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
}
.spin-go { width: 100%; margin-top: 12px; font-size: 1.1rem; padding: 12px; }
.spin-go:disabled { opacity: .5; cursor: not-allowed; }
.spin-result { min-height: 1.6em; font-weight: 700; font-size: 1.05rem; margin: 12px 0 4px; }
.spin-result.show { animation: result-pop .4s ease; }
.spin-result.win { color: var(--accent); font-size: 1.15rem; }
@keyframes result-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 760px) {
  .spin-float { left: 12px; bottom: 80px; width: 50px; height: 50px; font-size: 1.5rem; }
}


/* ===== BANG TOP NAP ===== */
.home-main { max-width: 1100px; margin: 0 auto; }
.lb-crown { font-size: 64px; text-align: center; position: relative; display: block; width: fit-content; margin: 0 auto; }
.lb-crown .trophy { display: inline-block; filter: drop-shadow(0 0 16px rgba(255,180,0,.9)); animation: crown-bounce 2.4s ease-in-out infinite; }
.lb-crown .spark { position: absolute; font-size: 24px; opacity: 0; animation: sparkle 3s ease-in-out infinite; pointer-events: none; }
.lb-crown .spark.s1 { top: -8px; left: -18px; }
.lb-crown .spark.s2 { top: 8px; right: -20px; animation-delay: 1s; }
.lb-crown .spark.s3 { bottom: -6px; left: 14px; animation-delay: 2s; }
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(-20deg); } 50% { opacity: 1; transform: scale(1.2) rotate(20deg); } }
@keyframes crown-bounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(4deg); } }
.lb-title {
  text-align: center; margin: 8px 0 2px; font-size: 25px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(180deg, #fff8d6, #ffd54f 45%, #ff9d00 70%, #ff6d00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255,140,0,.5));
}
.leaderboard {
  width: 290px;
  background: linear-gradient(165deg, #261b05 0%, #161226 55%, #0d0b14 100%);
  border: 1px solid rgba(255, 200, 60, .55);
  border-radius: 16px; padding: 20px 14px 16px;
  box-shadow: 0 0 35px rgba(255, 170, 0, .20), inset 0 0 40px rgba(255,170,0,.06);
  overflow: hidden;
}
.lb-sub { text-align: center; color: #d3ab60; font-size: 12px; letter-spacing: 2px; margin-bottom: 14px; }
.lb-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.lb-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); border-radius: 10px; padding: 8px 10px; }
.lb-rank { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; border-radius: 50%; background: #242133; color: #8f8fa3; }
.lb-row.rank-1 { background: linear-gradient(90deg, rgba(255,200,40,.25), rgba(255,200,40,.06)); border-color: rgba(255,200,40,.7); box-shadow: 0 0 16px rgba(255,190,30,.4); }
.lb-row.rank-1 .lb-rank { background: radial-gradient(circle at 30% 30%, #ffe082, #ffb300 60%, #ff8f00); color: #4a2c00; font-size: 21px; box-shadow: 0 0 12px rgba(255,190,0,.8); }
.lb-row.rank-2 { background: linear-gradient(90deg, rgba(200,210,220,.18), rgba(200,210,220,.05)); border-color: rgba(200,210,220,.5); box-shadow: 0 0 10px rgba(200,210,220,.25); }
.lb-row.rank-2 .lb-rank { background: radial-gradient(circle at 30% 30%, #ffffff, #b0bec5 60%, #78909c); color: #37474f; font-size: 21px; box-shadow: 0 0 10px rgba(200,210,220,.6); }
.lb-row.rank-3 { background: linear-gradient(90deg, rgba(205,127,50,.20), rgba(205,127,50,.05)); border-color: rgba(205,127,50,.55); box-shadow: 0 0 10px rgba(205,127,50,.3); }
.lb-row.rank-3 .lb-rank { background: radial-gradient(circle at 30% 30%, #ffcf9e, #cd7f32 60%, #8d5524); color: #3a2506; font-size: 21px; box-shadow: 0 0 10px rgba(205,127,50,.6); }
.lb-user { flex: 1; min-width: 0; font-weight: 700; color: #ffe9b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-total { font-weight: 800; color: #7CFC00; font-size: 14px; white-space: nowrap; text-shadow: 0 0 8px rgba(124,252,0,.4); }
.lb-empty { text-align: center; color: #9a865c; padding: 16px 6px; line-height: 1.7; }
.lb-cta { margin-top: 4px; }
/* Bang top nap nam trong banner hero, ben phai */
.hero-cols { display: flex; gap: 26px; align-items: stretch; }
.hero-left { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero .leaderboard { width: 300px; flex-shrink: 0; }
@media (max-width: 900px) {
  .hero-cols { flex-direction: column; }
  .hero .leaderboard { width: 100%; max-width: 430px; margin: 0 auto; }
}
.lb-vacant { color: #8a7a55; font-style: italic; font-weight: 400; }

/* 3 buoc xep doc, canh trai */
.hero-left { align-items: stretch; }
.logo-fire-wrap { text-align: center; }
.logo-fire-sub {
  margin-top: 12px; font-weight: 800; letter-spacing: 4px;
  font-size: clamp(.8rem, 2.6vw, 1.2rem);
  background: linear-gradient(180deg, #fff3c4, #ffcf40 55%, #ff9500);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255,160,0,.5));
}
.hero-steps { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 28px; padding-left: 9%; padding-right: 9%; flex-wrap: nowrap; }
.hero-steps div { display: flex; align-items: center; }

/* ===== VIP upgrade ===== */
.btn.primary {
  background: linear-gradient(135deg, #ffc93c, #ff9d00 55%, #ff7300);
  color: #3a2200; font-weight: 800; letter-spacing: .3px;
  border: 1px solid rgba(255,210,100,.65);
  box-shadow: 0 4px 18px rgba(255,150,0,.35), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn.primary:hover { box-shadow: 0 6px 26px rgba(255,150,0,.55), inset 0 1px 0 rgba(255,255,255,.45); filter: brightness(1.06); }
.card.service { transition: transform .25s, box-shadow .25s, border-color .25s; }
.card.service:hover { transform: translateY(-5px); border-color: rgba(255,180,0,.55);
  box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 22px rgba(255,170,0,.18); }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255,180,0,.55), transparent); }
input:focus, textarea:focus, select:focus { border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(255,179,0,.18); outline: none; }
.topbar { box-shadow: 0 4px 22px rgba(0,0,0,.4); }
.hero { background:
  radial-gradient(ellipse at 25% 12%, rgba(255,170,0,.13), transparent 55%),
  radial-gradient(ellipse at 82% 92%, rgba(0,180,255,.09), transparent 50%),
  radial-gradient(ellipse at top, var(--hero-glow), var(--bg)); }

/* ===== Header mobile: 1 dong gon + menu hamburger ===== */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .logo img { height: 36px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--line); color: var(--text);
    font-size: 1.25rem; line-height: 1; padding: 7px 12px; border-radius: 8px; cursor: pointer;
  }
  .topbar .mainnav, .topbar .userbox { display: none; flex-basis: 100%; }
  .topbar.open .mainnav { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .topbar.open .userbox { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .topbar.open .mainnav a { padding: 12px 10px; }
  .topbar.open .userbox .btn { text-align: center; }
}

/* Card dich vu deu nhau, khong nhay len xuong */
.grid { align-items: stretch; }
.card.service { display: flex; flex-direction: column; height: 100%; }
.service-img { flex-shrink: 0; }
.card.service h3 { min-height: 2.9em; line-height: 1.45; margin-bottom: 8px; }
.card.service > p.muted { flex: 1 0 auto; }
.card.service .price { margin: 10px 0 12px; }
.card.service .btn { margin-top: auto; align-self: flex-start; }

/* Phân trang (lịch sử giao dịch) */
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 12px 0 2px; }
.pager .btn.small { min-width: 36px; text-align: center; }
.pager-dots { padding: 0 2px; opacity: .6; }
