/* ==========================================================================
   GARENA365.VN — CORE & CLIENT STOREFRONT DESIGN SYSTEM (V10.5)
   ========================================================================== */
:root {
  --brand: #e11d48;
  --brand-dark: #be123c;
  --brand-soft: #fff1f2;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --gradient: linear-gradient(135deg, #e11d48 0%, #ea580c 100%);
  --gradient-blue: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-dark: linear-gradient(125deg, #0f172a 0%, #1e1b4b 55%, #31102f 100%);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.14);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    "Be Vietnam Pro",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button:active,
.btn:active {
  transform: scale(0.98);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.9px;
  font-weight: 800;
}

h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  font-weight: 800;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 700;
}

svg {
  vertical-align: middle;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  max-width: 1320px;
  padding: 0 24px;
  margin: 0 auto;
  width: 100%;
}

/* Boot Screen */
.boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: radial-gradient(circle at top, #fff1f2 0%, #f4f6fb 65%);
}

.boot-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 40px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}

.boot-box strong {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.8px;
}

.boot-box span {
  font-size: 13px;
  color: var(--muted);
}

/* ==========================================================================
   CLIENT TOPBAR & HEADER WITH 3-BAR SERVICE NAVIGATION
   ========================================================================== */
.topbar {
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: #e2e8f0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar .container {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.topbar-badge {
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.topbar-right a:hover {
  color: #fff;
}

.topbar b {
  color: #4ade80;
}

.header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.header-main {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 3-Bar Navigation Button (Nút 3 gạch nav hiện dịch vụ) */
.menu-3bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.menu-3bar-btn:hover,
.menu-3bar-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.28);
}

.bars-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  height: 18px;
}

.bars-icon span {
  display: block;
  height: 2.2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-3bar-btn.active .bars-icon span:nth-child(1) {
  transform: translateY(6.2px) rotate(45deg);
}

.menu-3bar-btn.active .bars-icon span:nth-child(2) {
  opacity: 0;
}

.menu-3bar-btn.active .bars-icon span:nth-child(3) {
  transform: translateY(-6.2px) rotate(-45deg);
}

.brand {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.9px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  flex-shrink: 0;
}

.brand-domain {
  background: linear-gradient(135deg, #e11d48 0%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.22);
}

.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin-top: -3px;
  -webkit-text-fill-color: var(--muted);
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 14px;
  flex: 1;
  max-width: 440px;
  color: #64748b;
  transition: all 0.2s ease;
}

.searchbox:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.searchbox input {
  background: none;
  border: 0;
  outline: none;
  width: 100%;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
}

.searchbox kbd {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #334155;
  border-radius: 11px;
  position: relative;
  transition: all 0.18s ease;
}

.icon-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: #fecdd3;
}

.count {
  position: absolute;
  right: -4px;
  top: -4px;
  background: var(--brand);
  color: white;
  font-size: 10px;
  font-weight: 800;
  border-radius: 99px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  border: 2px solid #fff;
}

.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 8px 13px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}

.wallet-pill:hover {
  background: #d1fae5;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 13px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13px;
}

.profile-pill:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

/* Horizontal Quick Service Nav Bar below Header */
.nav {
  display: flex;
  gap: 8px;
  min-height: 48px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid #f1f5f9;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  padding: 7px 13px;
  border-radius: 9px;
  white-space: nowrap;
}

.nav a:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.nav .right {
  margin-left: auto;
  color: var(--blue);
  background: var(--blue-soft);
}

/* ==========================================================================
   3-BAR EXPANDABLE SERVICE DRAWER (HIỆN ĐẦY ĐỦ DỊCH VỤ SHOP Ở DƯỚI)
   ========================================================================== */
.service-drawer {
  display: none;
  background: #ffffff;
  border-bottom: 2px solid var(--brand);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
  padding: 24px 0;
  animation: fadeDown 0.2s ease;
}

.service-drawer.open {
  display: block;
}

.service-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.service-drawer-head h3 {
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.service-drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-group-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.service-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-group-links {
  display: grid;
  gap: 6px;
}

.service-group-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #eef2f6;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.16s ease;
}

.service-group-links a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  transform: translateX(3px);
}

.service-group-links a small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

/* ==========================================================================
   BUTTONS, TAGS & COMMON COMPONENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--brand);
  color: white;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.25);
}

.btn.gradient {
  background: var(--gradient);
}

.btn.blue {
  background: var(--blue);
}

.btn.outline {
  border: 1px solid #cbd5e1;
  background: white;
  color: #1e293b;
}

.btn.outline:hover {
  border-color: var(--ink);
  background: #f8fafc;
  box-shadow: none;
}

.btn.ghost {
  background: var(--brand-soft);
  color: var(--brand);
}

.btn.ghost:hover {
  background: #ffe4e6;
  box-shadow: none;
}

.btn.danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn.full {
  width: 100%;
}

.btn.sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  border-radius: 6px;
  padding: 3px 8px;
  line-height: 1.3;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.tag.orange {
  background: #fff7ed;
  color: #ea580c;
}

.tag.green {
  background: #ecfdf5;
  color: #059669;
}

.tag.red {
  background: #fff1f2;
  color: #e11d48;
}

.tag.purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.demo-note {
  background: #fffbeb;
  color: #92400e;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 16px;
  border-bottom: 1px solid #fde68a;
}

/* ==========================================================================
   CLIENT STOREFRONT SECTIONS (HERO, CATEGORIES, PRODUCTS, MINIGAME, FOOTER)
   ========================================================================== */
.page {
  padding-top: 24px;
  padding-bottom: 64px;
  animation: fade 0.2s ease;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 360px;
  background: var(--gradient-dark);
  color: white;
  padding: 42px;
  isolation: isolate;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0f172a 10%, rgba(15, 23, 42, 0.82) 55%, rgba(15, 23, 42, 0.2) 100%);
  z-index: -1;
}

.hero-art {
  position: absolute;
  right: -20px;
  top: -10%;
  width: 68%;
  height: 120%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.85;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fda4af;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.eyebrow:before {
  content: "";
  width: 7px;
  height: 7px;
  background: #f43f5e;
  border-radius: 50%;
  box-shadow: 0 0 10px #f43f5e;
}

.hero h1 {
  font-size: 40px;
  margin: 14px 0;
  max-width: 480px;
  color: #ffffff;
  line-height: 1.15;
}

.hero h1 span {
  background: linear-gradient(90deg, #fb7185, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 410px;
  font-size: 13.5px;
  color: #cbd5e1;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 42px;
  display: flex;
  gap: 6px;
}

.hero-dots i {
  height: 5px;
  width: 8px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

.hero-dots i:first-child {
  background: #f43f5e;
  width: 26px;
}

.side-promos {
  display: grid;
  gap: 16px;
}

.promo {
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.promo h3 {
  font-size: 19px;
  line-height: 1.25;
  margin: 8px 0 6px;
}

.promo p {
  font-size: 12px;
  margin: 0;
  max-width: 200px;
}

.promo a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 800;
}

.promo.purple {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #ddd6fe;
  color: #4c1d95;
}

.promo.orange {
  background: linear-gradient(135deg, #fff1f2 0%, #ffedd5 100%);
  border-color: #fecdd3;
  color: #9f1239;
}

.promo-symbol {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 56px;
  transform: rotate(12deg);
  opacity: 0.22;
  pointer-events: none;
}

/* Quick Service Bar under Hero */
.quick-services-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.quick-service-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.quick-service-item:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-service-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quick-service-item strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}

.quick-service-item small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 28px;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 12px;
  flex-shrink: 0;
}

.trust strong {
  font-size: 13px;
  display: block;
}

.trust small {
  font-size: 11px;
  color: var(--muted);
}

.section {
  margin: 32px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 22px;
  margin: 0;
}

.section-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 4px 0 0;
}

.section-head a:not(.btn) {
  font-size: 13px;
  color: var(--brand);
  white-space: nowrap;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.category {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.category:hover,
.category.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 11px;
  flex-shrink: 0;
}

.category strong {
  font-size: 12.5px;
  display: block;
  color: var(--ink);
}

.category small {
  font-size: 10.5px;
  color: var(--muted);
}

.flash {
  background: linear-gradient(120deg, #fff1f2 0%, #fff7ed 55%, #eff6ff 100%);
  border: 1.5px solid #fecdd3;
  border-radius: 20px;
  padding: 24px;
  margin-top: 32px;
}

.flash .section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #be123c;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #fda4af;
}

.product-image {
  aspect-ratio: 1.58;
  position: relative;
  overflow: hidden;
  background: #0f172a;
  display: block;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product:hover .product-image img {
  transform: scale(1.04);
}

.product-image .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #fde047;
  font-size: 9.5px;
}

.product-id {
  position: absolute;
  bottom: 8px;
  left: 10px;
  background: rgba(225, 29, 72, 0.9);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.product-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
}

.product h3 {
  font-size: 13.5px;
  margin: 5px 0 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}

.attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 11px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}

.attributes span {
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #eef2f6;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: auto;
}

.price {
  font-size: 18px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: -0.5px;
}

.old-price {
  color: #94a3b8;
  font-size: 11px;
  text-decoration: line-through;
  display: block;
}

.buy-small {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid #fecdd3;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 800;
  transition: all 0.16s ease;
}

.buy-small:hover {
  background: var(--brand);
  color: #fff;
}

.stock {
  font-size: 10px;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-weight: 600;
}

.stock:before {
  content: "";
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

/* Minigame Banner */
.minigame-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  background: linear-gradient(125deg, #111827 0%, #31102f 60%, #1e1b4b 100%);
  border-radius: 22px;
  padding: 34px 38px;
  color: white;
  overflow: hidden;
  gap: 24px;
}

.minigame-banner p {
  color: #cbd5e1;
  font-size: 13px;
  max-width: 400px;
}

.mini-games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mini-game {
  padding: 20px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.mini-game:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.mini-game b {
  display: block;
  font-size: 12px;
  margin-top: 8px;
}

.mini-game span {
  font-size: 34px;
  color: #fda4af;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.benefit {
  background: white;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.benefit h3 {
  font-size: 15px;
  margin-top: 12px;
}

.benefit p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

/* Client Storefront Footer */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  border-top: 3px solid var(--brand);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer p,
.footer a {
  font-size: 12.5px;
  color: #94a3b8;
}

.footer a:hover {
  color: #ffffff;
}

.footer h4 {
  font-size: 13px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 4px 0 14px;
}

.footer a {
  display: block;
  margin-bottom: 9px;
}

.footer .brand {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: #64748b;
}

.mobile-nav {
  display: none;
}

/* ==========================================================================
   AUTH UI (LOGIN / REGISTER / FORGOT / RESET — SPLIT CARD, CLEAR & MODERN)
   ========================================================================== */
.auth-wrapper {
  max-width: 960px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.auth-showcase {
  background: var(--gradient-dark);
  color: #ffffff;
  padding: 42px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-showcase h2 {
  font-size: 28px;
  color: #ffffff;
  line-height: 1.25;
  margin: 14px 0 12px;
}

.auth-showcase p {
  color: #cbd5e1;
  font-size: 13px;
}

.auth-perks {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 14px;
  border-radius: 12px;
}

.auth-perk strong {
  display: block;
  font-size: 13px;
  color: #fff;
}

.auth-perk small {
  font-size: 11px;
  color: #cbd5e1;
}

.auth-card {
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.auth-tabs a {
  text-align: center;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  color: #64748b;
}

.auth-tabs a.active {
  background: #ffffff;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.auth-success-banner {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: zoom 0.22s ease;
}

.pass-wrap {
  position: relative;
}

.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #f1f5f9;
  color: #475569;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-weight: 600;
}

/* ==========================================================================
   PANELS, FORMS, TABLES, GAMES & MODALS
   ========================================================================== */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #475569;
  font-weight: 600;
}

.page-heading {
  margin-bottom: 24px;
}

.page-heading h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.page-heading p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 24px;
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}

.field input,
.field select,
.field textarea,
.filters input,
.filters select {
  background: #f8fafc;
  border: 1.5px solid #dbe2ec;
  border-radius: 10px;
  padding: 11px 14px;
  color: #0f172a;
  width: 100%;
  outline: none;
  transition: all 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filters input:focus,
.filters select:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.field small {
  color: var(--muted);
  font-size: 11px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.filters input {
  flex: 1;
  min-width: 160px;
}

.filters select {
  width: auto;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.notice {
  padding: 13px 16px;
  background: var(--blue-soft);
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 11px;
  font-size: 12.5px;
  margin: 16px 0;
}

.notice.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.empty .icon {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  color: #94a3b8;
}

.empty h3 {
  color: #334155;
}

.tabs {
  display: flex;
  gap: 6px;
  background: #e2e8f0;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 22px;
  overflow-x: auto;
}

.tabs a,
.tabs button {
  padding: 9px 16px;
  border: 0;
  background: none;
  border-radius: 9px;
  color: #475569;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
}

.tabs .active {
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--brand);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #eef2f7;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
  white-space: nowrap;
}

th {
  text-align: left;
  color: #475569;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #eef2f7;
}

tbody tr:hover {
  background: #f8fafc;
}

td .btn {
  font-size: 11px;
  padding: 6px 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.stat strong {
  display: block;
  font-size: 26px;
  margin: 8px 0 0;
  letter-spacing: -0.8px;
}

.stat .icon {
  float: right;
  color: var(--brand);
}

.wallet {
  background: var(--gradient);
  color: white;
  border: 0;
}

.wallet small {
  color: #ffe4e6;
}

.wallet strong {
  font-size: 30px;
}

.wallet .btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  margin-top: 16px;
}

/* Minigame Stage */
.game-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}

.game-stage {
  min-height: 520px;
  background: radial-gradient(ellipse at top, #31102f, #0f172a 72%);
  border-radius: 22px;
  padding: 35px 20px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.game-stage h2 {
  color: white;
  font-size: 24px;
}

.wheel-wrap {
  position: relative;
  width: min(100%, 350px);
  aspect-ratio: 1;
  margin: 16px auto 24px;
  filter: drop-shadow(0 0 28px rgba(225, 29, 72, 0.4));
}

.wheel {
  width: 100%;
  height: 100%;
  border: 10px solid #fde047;
  border-radius: 50%;
  position: relative;
  transition: transform 4s cubic-bezier(0.12, 0.68, 0.1, 1);
  box-shadow: 0 0 0 6px #78350f, 0 0 0 10px rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  transform-origin: 0 0;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  padding-right: 22px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  width: 78px;
  height: 78px;
  background: white;
  color: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  font-size: 10px;
  font-weight: 900;
  border: 5px solid #fecdd3;
  text-align: center;
  padding: 4px;
}

.pointer {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 32px solid #fde047;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.prize-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
}

.prize-row .prize-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.prize-row b {
  font-size: 12.5px;
}

.prize-row small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.turn-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
}

.turn-box b {
  color: var(--brand);
  font-size: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  max-width: 430px;
  width: 100%;
  margin: 20px auto;
}

.flip-card {
  aspect-ratio: 0.74;
  border: 2px solid #fde68a;
  border-radius: 14px;
  background: linear-gradient(135deg, #e11d48, #ea580c);
  color: #fff;
  position: relative;
  transition: transform 0.6s;
  font-size: 28px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.flip-card.opened {
  transform: rotateY(360deg);
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  font-size: 13px;
  font-weight: 800;
}

.lottery-box {
  font-size: 130px;
  line-height: 1.4;
  margin: 16px;
}

.lottery-box.drawing {
  animation: shake 0.15s 12;
}

.detail-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.detail-title {
  font-size: 26px;
}

.detail-price {
  font-size: 32px;
  color: var(--brand);
  font-weight: 900;
}

.detail-attributes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.detail-attributes div {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  padding: 14px;
  border-radius: 12px;
}

.detail-attributes small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.detail-attributes b {
  font-size: 14.5px;
}

/* Modals & Toasts */
dialog {
  border: 0;
  border-radius: 20px;
  width: min(94vw, 520px);
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  max-height: 90vh;
  overflow: auto;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

dialog[open] {
  animation: zoom 0.18s ease;
}

dialog .close {
  float: right;
  margin: -8px -8px 0 0;
}

.modal-icon {
  font-size: 42px;
  margin: 8px 0;
  text-align: center;
}

.toast-item {
  background: #0f172a;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  border-left: 4px solid #10b981;
  animation: fade 0.2s;
}

.toast-item.error {
  background: #881337;
  border-left-color: #fb7185;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 200;
  max-width: calc(100vw - 40px);
}

.skeleton {
  height: 240px;
  background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 16px;
}

.inline-error {
  padding: 22px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  border-radius: 14px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.support-floating {
  position: fixed;
  bottom: 26px;
  right: 24px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
  z-index: 40;
}

.check-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0;
}

.wrap {
  white-space: normal;
  min-width: 180px;
  max-width: 300px;
}

.text-link {
  color: var(--brand);
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 700;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.hidden {
  display: none !important;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes zoom {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE — CHUẨN PC & MOBILE)
   ========================================================================== */
@media (max-width: 1120px) {
  .hero-layout {
    grid-template-columns: 1fr 290px;
  }
  .quick-services-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .categories {
    grid-template-columns: repeat(3, 1fr);
  }
  .service-drawer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .two-col,
  .game-layout {
    grid-template-columns: 1fr 320px;
  }
}

@media (max-width: 860px) {
  .container {
    padding: 0 16px;
  }
  .topbar-right {
    display: none;
  }
  .header-main {
    min-height: 68px;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .searchbox {
    order: 3;
    max-width: none;
    flex: 1 1 100%;
  }
  .searchbox kbd {
    display: none;
  }
  .hero-layout,
  .two-col,
  .game-layout,
  .auth-wrapper,
  .minigame-banner {
    grid-template-columns: 1fr;
  }
  .auth-showcase {
    padding: 28px 24px;
  }
  .auth-card {
    padding: 28px 24px;
  }
  .side-promos {
    grid-template-columns: 1fr 1fr;
  }
  .trust {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .service-grid,
  .benefits {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 580px) {
  body {
    font-size: 13px;
  }
  .menu-3bar-btn span.menu-label {
    display: none;
  }
  .menu-3bar-btn {
    padding: 9px 10px;
  }
  .brand {
    font-size: 18px;
    gap: 7px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand small {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions > a.icon-btn[href="#favorites"],
  .header-actions > a.btn.outline[href="#register"],
  .wallet-pill {
    display: none;
  }
  .header-actions .icon-btn {
    width: 36px;
    height: 36px;
  }
  .header-actions .btn.sm {
    padding: 7px 10px;
    font-size: 11.5px;
  }
  .service-drawer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .quick-services-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .hero {
    padding: 26px 20px;
    min-height: 290px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .side-promos {
    grid-template-columns: 1fr;
  }
  .categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product-body {
    padding: 11px;
  }
  .product h3 {
    font-size: 12px;
    min-height: 34px;
  }
  .price {
    font-size: 15.5px;
  }
  .buy-small {
    padding: 6px 9px;
    font-size: 10.5px;
  }
  .field-row,
  .service-grid,
  .benefits,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer {
    padding-bottom: 92px;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  }
  .mobile-nav a,
  .mobile-nav button {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background: none;
    border: 0;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 2px;
  }
  .mobile-nav a.active,
  .mobile-nav button.active {
    color: var(--brand);
  }
  .support-floating {
    bottom: 84px;
    right: 14px;
    width: 44px;
    height: 44px;
  }
  #toast {
    bottom: 84px;
    right: 12px;
  }
}
