/* ==========================================================================
   QUY11NPRO.COM - Exact Visual & Interactive Styling
   ========================================================================== */

:root {
  --bg-page: #e2e5ea;
  --bg-header: rgba(228, 231, 236, 0.92);
  --border-header: #cfd4dc;
  --primary-blue: #0062b0;
  --primary-blue-hover: #005296;
  --card-blue: #005ca3;
  --card-blue-dark: #005396;
  --card-divider: rgba(255, 255, 255, 0.14);
  --text-dark: #18212f;
  --text-muted: #4b5563;
  --text-card-sub: #b0d2f0;
  --badge-orange: #d46700;
  --chat-blue: #0068c9;
  --font-main: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: #cbd2dc;
  color: var(--text-dark);
}

body {
  background-color: var(--bg-page);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.12);
}

/* Allow wider responsive view on desktop while preserving the exact mobile-first look */
@media (min-width: 768px) {
  body {
    max-width: 460px;
  }
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-header);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  height: 62px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo img {
  height: 29px;
  width: auto;
  display: block;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-avatar-badge {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #38bdf8, #2563eb, #f59e0b);
  box-shadow: 0 2px 8px rgba(0, 98, 176, 0.35);
  flex-shrink: 0;
}

.header-avatar-badge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.header-avatar-badge .online-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #ffffff;
}

.btn-register {
  background: var(--primary-blue);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 50, 100, 0.15);
}

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

.btn-register:active {
  transform: scale(0.96);
}

.btn-menu {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #e3e6eb;
  border: 1px solid #c6ccd6;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}

.btn-menu:hover {
  background: #d8dce3;
}

.btn-menu:active {
  transform: scale(0.95);
}

/* Mobile Dropdown Menu */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  background: #edf0f5;
  border-bottom: 0 solid var(--border-header);
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), border-bottom-width 0.2s ease;
}

.mobile-nav.open {
  max-height: 340px;
  border-bottom-width: 1px;
}

.mobile-nav-inner {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 14.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(0, 98, 176, 0.1);
  color: var(--primary-blue);
}

.nav-divider {
  height: 1px;
  background: #cfd5df;
  margin: 8px 0;
}

.nav-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-nav-login,
.btn-nav-register {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-nav-login {
  background: #ffffff;
  border: 1px solid #c2c9d4;
  color: var(--text-dark);
}

.btn-nav-register {
  background: var(--primary-blue);
  border: 1px solid var(--primary-blue);
  color: #ffffff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 36px 18px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 65% at 55% 18%, rgba(162, 206, 244, 0.65) 0%, rgba(188, 220, 248, 0.35) 52%, rgba(226, 229, 234, 0) 100%),
    linear-gradient(180deg, #cfe2f3 0%, #dde8f3 48%, var(--bg-page) 100%);
}

.hero-container {
  max-width: 420px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(167, 206, 239, 0.65);
  border: 1px solid #8eb5d6;
  color: #09589b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(9, 88, 155, 0.06);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0062b0;
  display: inline-block;
}

.hero-title {
  font-size: 33px;
  line-height: 1.18;
  font-weight: 800;
  color: #1b2432;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: #495362;
  font-weight: 400;
  margin-bottom: 24px;
  padding: 0 4px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.btn-hero-primary,
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 9px;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-hero-primary {
  background: var(--primary-blue);
  color: #ffffff;
  border: 1px solid var(--primary-blue);
  box-shadow: 0 2px 6px rgba(0, 98, 176, 0.22);
}

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

.btn-hero-secondary {
  background: rgba(232, 236, 242, 0.85);
  color: #1a2230;
  border: 1px solid #c4ccd7;
}

.btn-hero-secondary:hover {
  background: #dde2ea;
}

.btn-hero-primary:active,
.btn-hero-secondary:active {
  transform: scale(0.96);
}

.hero-subnote {
  font-size: 12.5px;
  color: #4b5563;
  font-weight: 400;
}

/* ==========================================================================
   Main Content & Product Cards
   ========================================================================== */
.content-container {
  padding: 6px 15px 32px;
}

.catalog-section {
  margin-bottom: 32px;
  scroll-margin-top: 72px;
}

.minigame-section {
  scroll-margin-top: 72px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #18212f;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 14.2px;
  line-height: 1.48;
  color: #4b5563;
  margin-bottom: 16px;
}

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

.product-card {
  background: var(--card-blue);
  border-radius: 13px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(0, 45, 85, 0.14);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
  position: relative;
  user-select: none;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 55, 105, 0.24);
}

.product-card:active {
  transform: scale(0.975);
}

/* Card Banner with Synchronized Animated Lightning Burst */
.card-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 321 / 198;
  background: #042c54;
  overflow: hidden;
  border-bottom: 1px solid var(--card-divider);
}

.card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-burst {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  animation: electricBurst 2.6s infinite ease-in-out;
  animation-delay: var(--burst-delay, 0s);
}

@keyframes electricBurst {
  0%, 52%, 100% {
    opacity: 0;
  }
  62% {
    opacity: 0.96;
  }
  70% {
    opacity: 0.35;
  }
  78% {
    opacity: 1;
  }
  88% {
    opacity: 0;
  }
}

/* Razor-sharp Badge positioned directly over the card's badge slot */
.card-badge {
  position: absolute;
  left: 6.4%;
  bottom: 10.2%;
  min-width: 30%;
  height: 20%;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  letter-spacing: -0.01em;
}

.badge-orange {
  background: #d36800;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.badge-light {
  left: 6.4%;
  bottom: 10.2%;
  min-width: 44%;
  background: #d8dee6;
  color: #1e293b;
}

.badge-soft {
  left: 6.4%;
  bottom: 10.2%;
  min-width: 31%;
  background: #cddae8;
  color: #1e293b;
}

/* Card Body */
.card-body {
  padding: 13px 11px 13px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: linear-gradient(180deg, #005ea6 0%, #00579c 100%);
}

.card-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.card-desc {
  color: var(--text-card-sub);
  font-size: 12.6px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
  min-height: 17px;
}

.card-desc-empty {
  visibility: hidden;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: auto;
  margin-bottom: 5px;
}

.price-prefix {
  color: var(--text-card-sub);
  font-size: 12.5px;
  margin-right: 2px;
}

.price-val {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.price-val .currency {
  text-decoration: underline;
  font-weight: 700;
  font-size: 16px;
}

.price-unit {
  color: var(--text-card-sub);
  font-size: 12.5px;
  font-weight: 400;
}

.card-sold {
  color: var(--text-card-sub);
  font-size: 12.2px;
}

.card-sold strong {
  color: #ffffff;
  font-weight: 700;
}

/* Minigame Card Adjustments */
.minigame-section .section-title {
  margin-bottom: 14px;
}

/* ==========================================================================
   Vòng Quay Túi Mù 3D Section & Unboxing Effects
   ========================================================================== */
.lucky-wheel-section {
  margin-bottom: 32px;
  scroll-margin-top: 72px;
}

.wheel-hot-tag {
  display: inline-block;
  background: linear-gradient(90deg, #ea580c, #dc2626);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.wheel-card-arena {
  background:
    linear-gradient(180deg, rgba(2, 16, 38, 0.58) 0%, rgba(2, 20, 48, 0.85) 100%),
    url('assets/wheel-gaming-bg.png') center / cover no-repeat;
  border-radius: 18px;
  border: 2px solid #38bdf8;
  box-shadow:
    0 0 22px rgba(14, 165, 233, 0.35),
    0 12px 30px rgba(2, 28, 59, 0.45);
  position: relative;
  overflow: hidden;
}

.wheel-top-banner {
  width: 100%;
  border-bottom: 1.5px solid rgba(253, 224, 71, 0.55);
}

.wheel-top-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.wheel-arena-body {
  padding: 14px 14px 18px;
}

.wheel-tier-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
  position: relative;
  z-index: 5;
}

.wheel-tier-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 4px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.wheel-tier-btn.active {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.45);
}

.wheel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0 16px;
}

/* Floating 3D Orbiting Blind Bags */
.floating-bag {
  position: absolute;
  width: 68px;
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}

.floating-bag img {
  width: 100%;
  aspect-ratio: 321 / 198;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid #fde047;
}

.bag-glow-label {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 800;
  background: linear-gradient(90deg, #f59e0b, #dc2626);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 99px;
  white-space: nowrap;
}

.floating-bag.bag-left {
  left: 2px;
  top: 12px;
  animation: floatBagLeft 3.2s ease-in-out infinite;
}

.floating-bag.bag-right {
  right: 2px;
  bottom: 14px;
  animation: floatBagRight 3.2s ease-in-out infinite;
}

@keyframes floatBagLeft {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  50% { transform: translateY(-8px) rotate(4deg) scale(1.06); }
}

@keyframes floatBagRight {
  0%, 100% { transform: translateY(0) rotate(8deg) scale(1); }
  50% { transform: translateY(-9px) rotate(-5deg) scale(1.06); }
}

/* Wheel Pointer Needle */
.wheel-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  transform-origin: 50% 10px;
}

.wheel-pointer.ticking {
  animation: pointerTick 0.14s ease-in-out infinite alternate;
}

@keyframes pointerTick {
  from { transform: translateX(-50%) rotate(-18deg); }
  to { transform: translateX(-50%) rotate(8deg); }
}

/* Outer Golden Rim */
.wheel-outer-rim {
  width: 284px;
  height: 284px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 0deg, #f59e0b, #fde047, #b45309, #38bdf8, #fde047, #f59e0b);
  box-shadow:
    0 0 0 4px rgba(15, 23, 42, 0.9),
    0 0 32px rgba(245, 158, 11, 0.65),
    0 0 55px rgba(56, 189, 248, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 4.2s cubic-bezier(0.12, 0.82, 0.14, 1);
  will-change: transform;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.65);
}

.wheel-disc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Center Spin Hub with Uploaded Anime Avatar */
.wheel-center-hub {
  position: absolute;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid #fde047;
  background: #0f172a;
  padding: 0;
  cursor: pointer;
  z-index: 12;
  box-shadow:
    0 0 0 4px rgba(180, 83, 9, 0.85),
    0 6px 16px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  transition: transform 0.18s ease;
}

.wheel-center-hub:hover {
  transform: scale(1.07);
}

.wheel-center-hub:active {
  transform: scale(0.95);
}

.wheel-center-hub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hub-spin-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.92), rgba(234, 88, 12, 0.92));
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 0;
  letter-spacing: 0.05em;
}

/* 3D Blind Bag Unboxing Burst Overlay */
.unbox-burst-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0) 72%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.unbox-burst-overlay.active {
  opacity: 1;
}

.unbox-rays {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(253, 224, 71, 0.42) 0deg 12deg,
    transparent 12deg 24deg
  );
  animation: spinRays 5s linear infinite;
}

@keyframes spinRays {
  to { transform: rotate(360deg); }
}

.unbox-bag-3d {
  width: 165px;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid #fde047;
  box-shadow: 0 0 32px rgba(250, 204, 21, 0.9);
  transform: scale(0.3) rotateY(0deg);
}

.unbox-burst-overlay.active .unbox-bag-3d {
  animation: bag3dUnbox 1.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes bag3dUnbox {
  0% { transform: scale(0.3) rotateY(0deg) rotateZ(0deg); }
  45% { transform: scale(1.12) rotateY(360deg) rotateZ(-6deg); }
  65% { transform: scale(1.05) rotateY(360deg) rotateZ(6deg); }
  82% { transform: scale(1.18) rotateY(720deg) rotateZ(0deg); filter: brightness(1.5); }
  100% { transform: scale(1) rotateY(720deg) rotateZ(0deg); filter: brightness(1); }
}

.unbox-bag-3d img {
  width: 100%;
  display: block;
}

/* Controls & Prize Banner */
.wheel-controls {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-spin-main {
  width: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #ea580c 50%, #dc2626 100%);
  color: #ffffff;
  border: 1.5px solid #fde047;
  border-radius: 11px;
  padding: 12px 14px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
  transition: transform 0.14s ease, filter 0.18s ease;
}

.btn-spin-main:hover {
  filter: brightness(1.07);
}

.btn-spin-main:active {
  transform: scale(0.97);
}

.wheel-prize-banner {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.8px;
  line-height: 1.45;
  text-align: center;
}

/* Modal Mini Blind-Bag Gaming Wheel & Spinner */
.modal-spinner-wrap {
  position: relative;
  background:
    linear-gradient(180deg, rgba(2, 16, 38, 0.65) 0%, rgba(2, 20, 48, 0.9) 100%),
    url('assets/wheel-gaming-bg.png') center / cover no-repeat;
  border: 1.5px solid #38bdf8;
  border-radius: 14px;
  padding: 14px 10px;
  margin-bottom: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.35);
}

.modal-wheel-box {
  position: relative;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  padding: 5px;
  background: conic-gradient(from 0deg, #f59e0b, #fde047, #38bdf8, #fde047, #f59e0b);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 3.4s cubic-bezier(0.12, 0.82, 0.14, 1);
}

.modal-wheel-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-wheel-hub {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2.5px solid #fde047;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 4;
}

.modal-wheel-hub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-rotor-caption {
  color: #fde047;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.minigame-body {
  padding: 12px 11px 14px;
}

.minigame-title {
  font-size: 14.5px;
  line-height: 1.35;
  min-height: 39px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid #cfd5df;
  padding: 26px 15px 40px;
  background: var(--bg-page);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-avatar-wrap {
  margin-bottom: 12px;
}

.footer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
}

.footer-desc {
  font-size: 13.5px;
  line-height: 1.58;
  color: #4b5563;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 10px;
}

.footer-links a {
  text-decoration: none;
  color: #4b5563;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--primary-blue);
}

/* ==========================================================================
   Floating Chat Button & AssistiveTouch (from video)
   ========================================================================== */
.floating-chat-btn {
  position: fixed;
  right: max(18px, calc(50vw - 222px));
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--chat-blue);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 95;
  box-shadow:
    0 0 0 8px rgba(0, 104, 201, 0.16),
    0 6px 16px rgba(0, 72, 145, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.floating-chat-btn:hover {
  transform: scale(1.05);
}

.floating-chat-btn:active {
  transform: scale(0.94);
}

/* iOS AssistiveTouch (visible and draggable just like in the video) */
.assistive-touch {
  position: fixed;
  right: max(8px, calc(50vw - 232px));
  top: 52%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(35, 38, 43, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 120;
  touch-action: none;
  user-select: none;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
  transition: opacity 0.25s ease;
}

.assistive-touch:active {
  cursor: grabbing;
}

.assistive-ring-outer {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistive-ring-mid {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistive-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
}

/* AssistiveTouch Quick Menu */
.assistive-menu {
  position: fixed;
  right: max(18px, calc(50vw - 220px));
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  width: 255px;
  background: rgba(24, 33, 47, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  border-radius: 16px;
  padding: 12px;
  z-index: 125;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.assistive-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.assistive-menu-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 6px;
}

.assistive-action {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: background 0.14s ease;
}

.assistive-action:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   Modals (Product / Minigame & Auth)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow: hidden;
  visibility: hidden;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-dialog {
  width: 100%;
  max-width: 410px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #005ca3 0%, #00437a 100%);
  color: #ffffff;
}

.modal-badge {
  display: inline-block;
  background: #d46700;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.modal-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 14px;
}

.modal-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.modal-price {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary-blue);
}

.modal-sold {
  font-size: 12.5px;
  color: #64748b;
}

/* Interactive Flip Cards Grid inside Modal */
.flip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.flip-card {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #0062b0, #003d73);
  border-radius: 10px;
  border: 2px solid #60a5fa;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
  padding: 6px;
  text-align: center;
}

.flip-card:hover {
  transform: scale(1.03);
}

.flip-card.flipped {
  background: linear-gradient(145deg, #d97706, #b45309);
  border-color: #fde68a;
}

/* Package Selector inside Modal */
.pkg-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.pkg-item {
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 10px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
}

.pkg-item.active {
  border-color: var(--primary-blue);
  background: #eff6ff;
  color: var(--primary-blue);
}

.modal-cta {
  width: 100%;
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.modal-result-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 13px;
  line-height: 1.5;
  display: none;
}

.modal-result-box.show {
  display: block;
}

/* Auth Modal Specifics */
.auth-tabs {
  display: flex;
  gap: 8px;
}

.auth-tab {
  background: rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  background: #ffffff;
  color: var(--primary-blue);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.form-group input {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-family: var(--font-main);
  font-size: 14px;
}

.btn-submit-auth {
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 11px;
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.auth-note {
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* ==========================================================================
   Chat Support Widget
   ========================================================================== */
.chat-widget {
  position: fixed;
  right: max(16px, calc(50vw - 220px));
  bottom: 88px;
  width: calc(100vw - 32px);
  max-width: 340px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.25);
  z-index: 150;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-widget.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-widget-header {
  background: var(--primary-blue);
  color: #ffffff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-agent img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.chat-agent strong {
  display: block;
  font-size: 13.5px;
}

.chat-agent span {
  font-size: 11.5px;
  color: #bbf7d0;
}

.chat-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

.chat-widget-body {
  padding: 12px;
  max-height: 210px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}

.chat-msg {
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 88%;
}

.chat-msg.bot {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
}

.chat-msg.user {
  background: var(--primary-blue);
  color: #ffffff;
  align-self: flex-end;
}

.chat-quick-links {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  background: #f1f5f9;
}

.chat-chip {
  white-space: nowrap;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--primary-blue);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.chat-input-row {
  display: flex;
  border-top: 1px solid #e2e8f0;
}

.chat-input-row input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
}

.chat-input-row button {
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 380px;
}

.toast-item {
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.22s ease forwards;
}

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

/* ==========================================================================
   Domain Bar (maphaihuoc.shop) & Admin CMS System
   ========================================================================== */
.domain-topbar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  position: relative;
  z-index: 105;
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.domain-badge strong {
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.verified-pill {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #86efac;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}

.admin-top-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle-inline-edit,
.btn-open-cms {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.btn-toggle-inline-edit {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-toggle-inline-edit.active {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border-color: #22c55e;
}

.btn-open-cms {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
}

.bottom-domain-pill {
  position: sticky;
  bottom: 8px;
  width: calc(100% - 110px);
  margin: 0 auto 10px 15px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  z-index: 85;
}

/* Section Header with Admin Add Button */
.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.btn-admin-add-card {
  display: none;
  white-space: nowrap;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid #38bdf8;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

body.admin-enabled .btn-admin-add-card {
  display: inline-flex;
}

/* Inline Card Edit Button */
.admin-card-edit-btn {
  display: none;
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 15;
  background: rgba(15, 23, 42, 0.88);
  color: #fde047;
  border: 1.5px solid #fde047;
  border-radius: 7px;
  padding: 4px 8px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s ease, background 0.14s ease;
}

.admin-card-edit-btn:hover {
  background: #f59e0b;
  color: #0f172a;
  transform: scale(1.05);
}

body.admin-enabled .admin-card-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Admin Modals */
.admin-dialog,
.admin-cms-dialog {
  max-width: 440px;
}

.admin-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border-bottom: 2px solid #f59e0b;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-form select,
.admin-form textarea,
.cms-pane input,
.cms-pane textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 13px;
  color: #0f172a;
}

.admin-banner-preview-box {
  position: relative;
  width: 100%;
  aspect-ratio: 321 / 198;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #0284c7;
  background: #042c54;
}

.admin-banner-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-banner-overlay-tools {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #bae6fd;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.admin-banner-actions {
  display: flex;
  gap: 8px;
}

.btn-render-banner {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-upload-banner {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-modal-footer-btns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-admin-save {
  flex: 1;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 11px 14px;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-admin-delete {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 9px;
  padding: 10px 12px;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* CMS Tabs & Panes */
.cms-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.cms-tab {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
}

.cms-tab.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #ffffff;
}

.cms-pane {
  display: none;
}

.cms-pane.active {
  display: block;
}

.admin-status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.admin-status-card img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fde047;
  object-fit: cover;
}

.admin-status-card strong {
  display: block;
  font-size: 13.5px;
}

.admin-status-card span {
  display: block;
  font-size: 11.5px;
  color: #cbd5e1;
}

.cms-product-list,
.cms-wheel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}

.cms-prod-row {
  display: grid;
  grid-template-columns: 56px 1fr 92px 34px;
  gap: 6px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px;
  border-radius: 8px;
}

.cms-prod-row img {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
}

.cms-prod-row input {
  padding: 6px 8px;
  font-size: 12px;
}

.cms-prod-edit-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
}

.btn-quick-admin-access {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 10px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 2px;
}

/* ========================================================================== 
   Responsive Desktop Shell + Top-up Center
   ========================================================================== */
.desktop-primary-nav {
  display: none;
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 10px;
  border: 1px solid rgba(2, 132, 199, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #eaf6ff);
  color: #075985;
  font-family: var(--font-main);
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(2, 132, 199, 0.12);
}

.wallet-chip-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
  color: #ffffff;
  font-size: 14px;
}

.wallet-chip-copy {
  display: none;
  text-align: left;
  line-height: 1.1;
}

.wallet-chip-copy small,
.wallet-chip-copy strong {
  display: block;
}

.wallet-chip-copy small {
  font-size: 9.5px;
  color: #64748b;
  margin-bottom: 2px;
}

.wallet-chip-copy strong {
  font-size: 12.5px;
  color: #0f172a;
}

.wallet-chip-action {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-link-topup {
  width: 100%;
  border: 0;
  font-family: var(--font-main);
  text-align: left;
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

.topup-backdrop {
  z-index: 240;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 12%, rgba(14, 165, 233, 0.18), transparent 35%),
    rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(9px);
}

.topup-dialog {
  max-width: 960px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.45);
  max-height: min(92vh, 760px);
}

.topup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 0%, rgba(56, 189, 248, 0.32), transparent 36%),
    linear-gradient(135deg, #071a35 0%, #073b72 55%, #075985 100%);
  border-bottom: 1px solid rgba(125, 211, 252, 0.28);
}

.topup-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topup-heading-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.3);
  font-size: 20px;
  font-weight: 800;
}

.topup-eyebrow {
  display: block;
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 3px;
}

.topup-heading h2 {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
}

.topup-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.topup-layout {
  min-height: 520px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  overflow: hidden;
}

.topup-sidebar {
  padding: 18px;
  background: #eef4f9;
  border-right: 1px solid #dbe5ee;
}

.topup-wallet-card {
  padding: 16px;
  border-radius: 15px;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 5%, rgba(125, 211, 252, 0.32), transparent 32%),
    linear-gradient(145deg, #0f2f55, #075985);
  box-shadow: 0 12px 25px rgba(7, 89, 133, 0.2);
  margin-bottom: 16px;
}

.topup-wallet-card span,
.topup-wallet-card strong,
.topup-wallet-card small {
  display: block;
}

.topup-wallet-card span {
  color: #bae6fd;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}

.topup-wallet-card strong {
  font-size: 25px;
  margin-bottom: 5px;
}

.topup-wallet-card small {
  color: #cbd5e1;
  font-size: 10px;
  line-height: 1.45;
}

.topup-method-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.topup-method {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d6e0e9;
  border-radius: 13px;
  background: #ffffff;
  color: #334155;
  font-family: var(--font-main);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.topup-method:hover {
  transform: translateY(-1px);
  border-color: #7dd3fc;
}

.topup-method.active {
  border-color: #0284c7;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12), inset 3px 0 #0284c7;
  color: #075985;
}

.topup-method-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.topup-method-icon.bank {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.topup-method-icon.card {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.topup-method strong,
.topup-method small {
  display: block;
}

.topup-method strong {
  font-size: 13px;
  margin-bottom: 3px;
}

.topup-method small {
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.35;
}

.topup-method b {
  color: #94a3b8;
  font-size: 19px;
}

.topup-safety-note {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 11px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
}

.topup-safety-note p {
  font-size: 10.5px;
  line-height: 1.45;
}

.topup-safety-note strong {
  display: block;
  font-size: 11.5px;
}

.topup-main {
  padding: 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(186, 230, 253, 0.35), transparent 30%),
    #f8fafc;
}

.topup-demo-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 11px;
  background: #fffbeb;
  color: #92400e;
  margin-bottom: 17px;
}

.topup-demo-banner > span {
  color: #f59e0b;
  font-size: 16px;
}

.topup-demo-banner p {
  font-size: 11.5px;
  line-height: 1.4;
}

.topup-pane {
  display: none;
}

.topup-pane.active {
  display: block;
  animation: topupPaneIn 0.2s ease;
}

@keyframes topupPaneIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.topup-pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.topup-pane-title.compact {
  margin-bottom: 10px;
}

.topup-pane-title span {
  display: block;
  color: #0284c7;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin-bottom: 2px;
}

.topup-pane-title h3 {
  font-size: 16px;
  color: #0f172a;
}

.topup-pane-title .method-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #15803d;
  background: #dcfce7;
  font-size: 10px;
  letter-spacing: 0;
  margin: 0;
}

.topup-pane-title .method-status.pending {
  color: #9a3412;
  background: #ffedd5;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.amount-grid > button,
.custom-amount {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #ffffff;
  color: #334155;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.amount-grid > button:hover,
.amount-grid > button.active {
  border-color: #0284c7;
  color: #0369a1;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #38bdf8;
}

.custom-amount {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 8px;
  cursor: text;
}

.custom-amount span {
  color: #64748b;
  font-size: 9px;
  margin-bottom: 2px;
}

.custom-amount input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.bank-transfer-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(310px, 1.2fr);
  gap: 16px;
  align-items: stretch;
}

.qr-card,
.bank-details-card,
.card-topup-form {
  border: 1px solid #dbe5ee;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.qr-card {
  padding: 12px;
  text-align: center;
}

.qr-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.qr-brand b {
  color: #1555a7;
}

.qr-card img {
  width: min(100%, 220px);
  aspect-ratio: 540 / 640;
  object-fit: contain;
  display: block;
  margin: 4px auto;
  border-radius: 10px;
}

.qr-card p {
  color: #64748b;
  font-size: 10.5px;
}

.bank-details-card {
  padding: 15px;
}

.bank-details-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.bank-details-list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #e2e8f0;
}

.bank-details-list > div:last-child {
  border-bottom: 0;
}

.bank-details-list dt {
  color: #64748b;
  font-size: 10.5px;
}

.bank-details-list dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #0f172a;
  font-size: 12px;
  min-width: 0;
}

.bank-details-list dd strong {
  overflow-wrap: anywhere;
}

.bank-details-list button {
  border: 0;
  border-radius: 7px;
  padding: 5px 7px;
  background: #e0f2fe;
  color: #0369a1;
  font-family: var(--font-main);
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
}

.transfer-content {
  background: #f0f9ff;
}

.topup-warning {
  margin: 10px 0;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 10px;
  line-height: 1.45;
}

.topup-primary-btn {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.topup-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.26);
}

.topup-result {
  display: none;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
  font-size: 10.5px;
  line-height: 1.45;
}

.topup-result.show {
  display: block;
}

.card-topup-form {
  padding: 18px;
}

.card-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.card-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-form-grid label > span {
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
}

.card-form-grid input,
.card-form-grid select {
  width: 100%;
  height: 43px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font-main);
  font-size: 12.5px;
  outline: none;
}

.card-form-grid input:focus,
.card-form-grid select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.11);
}

.card-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 15px 0;
}

.card-summary > div {
  padding: 10px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.card-summary span,
.card-summary strong {
  display: block;
}

.card-summary span {
  color: #64748b;
  font-size: 9.5px;
  margin-bottom: 4px;
}

.card-summary strong {
  color: #0f172a;
  font-size: 11px;
}

.topup-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
}

.topup-consent input {
  margin-top: 2px;
  accent-color: #0284c7;
}

.card-submit {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.card-api-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 9.5px;
  text-align: center;
}

/* Tablet and desktop layout */
@media (min-width: 768px) {
  body {
    max-width: 100%;
    box-shadow: none;
  }

  .header-inner,
  .hero-container,
  .content-container,
  .footer-container {
    width: min(100% - 40px, 1180px);
    margin-left: auto;
    margin-right: auto;
  }

  .header-inner {
    height: 72px;
    padding-left: 0;
    padding-right: 0;
  }

  .brand-logo img {
    height: 35px;
  }

  .wallet-chip-copy {
    display: block;
  }

  .wallet-chip-action {
    display: none;
  }

  .hero-section {
    padding: 68px 20px 54px;
  }

  .hero-container {
    max-width: 760px;
  }

  .hero-title {
    font-size: clamp(42px, 5vw, 60px);
  }

  .hero-desc {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
  }

  .content-container {
    padding-top: 24px;
  }

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

  .modal-dialog:not(.topup-dialog) {
    max-width: 520px;
  }

  .admin-cms-dialog {
    max-width: 760px !important;
  }

  .bottom-domain-pill {
    width: 340px;
    margin: 0 auto 12px;
  }

  .floating-chat-btn,
  .assistive-touch,
  .assistive-menu,
  .chat-widget {
    right: 24px;
  }
}

@media (min-width: 1080px) {
  .desktop-primary-nav {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    margin-right: 20px;
  }

  .desktop-primary-nav a,
  .desktop-primary-nav button {
    border: 0;
    border-radius: 9px;
    padding: 9px 12px;
    background: transparent;
    color: #334155;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
  }

  .desktop-primary-nav a:hover {
    color: #0369a1;
    background: #e0f2fe;
  }

  .desktop-primary-nav button {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #1d4ed8);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.2);
  }

  .btn-menu {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .section-title {
    font-size: 25px;
  }

  .section-subtitle {
    font-size: 15px;
  }

  .domain-topbar {
    padding-left: max(20px, calc((100vw - 1180px) / 2));
    padding-right: max(20px, calc((100vw - 1180px) / 2));
  }
}

/* Mobile bottom-sheet behavior */
@media (max-width: 767px) {
  .header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-logo img {
    max-width: 112px;
  }

  .btn-register {
    display: none;
  }

  .topup-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .topup-dialog {
    max-width: none;
    max-height: 94dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(24px);
  }

  .topup-header {
    padding: 14px 15px;
  }

  .topup-heading-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .topup-heading h2 {
    font-size: 17px;
  }

  .topup-layout {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .topup-sidebar {
    padding: 12px 14px 10px;
    border-right: 0;
    border-bottom: 1px solid #dbe5ee;
  }

  .topup-wallet-card,
  .topup-safety-note {
    display: none;
  }

  .topup-method-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .topup-method {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 9px;
  }

  .topup-method b,
  .topup-method small {
    display: none;
  }

  .topup-method-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 15px;
  }

  .topup-method strong {
    font-size: 11px;
  }

  .topup-main {
    padding: 13px 14px 20px;
    overflow: visible;
  }

  .topup-demo-banner {
    padding: 8px 9px;
    margin-bottom: 12px;
  }

  .topup-demo-banner p {
    font-size: 10px;
  }

  .amount-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 13px;
  }

  .amount-grid > button,
  .custom-amount {
    min-height: 43px;
    font-size: 10.5px;
  }

  .bank-transfer-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .qr-card {
    display: grid;
    grid-template-columns: minmax(130px, 45%) 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px;
  }

  .qr-brand {
    grid-column: 1 / -1;
  }

  .qr-card img {
    width: 100%;
    max-height: 205px;
    margin: 0;
  }

  .qr-card p {
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
  }

  .bank-details-card,
  .card-topup-form {
    padding: 12px;
  }

  .bank-details-list > div {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 8px 9px;
  }

  .bank-details-list dt {
    font-size: 9.5px;
  }

  .bank-details-list dd {
    font-size: 10.5px;
  }

  .card-form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card-summary {
    grid-template-columns: 1fr;
  }

  .card-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
  }

  .card-summary span {
    margin-bottom: 0;
  }

  .wallet-chip {
    padding: 5px 8px;
  }

  .header-avatar-badge {
    display: none;
  }
}

