/* ================================================================
   OFF1 — UNIFIED DESIGN SYSTEM
   ทุกสี, spacing, radius, font ใช้ CSS Variables จากที่นี่เท่านั้น
   ================================================================ */

/* ---- 1. DESIGN TOKENS ---- */
:root {
  /* Brand Colors */
  --c-red:        #e10028;
  --c-red-dark:   #b8001f;
  --c-red-light:  #ff4560;
  --c-gold:       #ffe313;
  --c-gold-dim:   rgba(255,227,19,0.12);
  --c-green:      #129f71;
  --c-green-dark: #0e7a57;

  /* Backgrounds */
  --bg-page:    #0f0f17;
  --bg-surface: #1a1a2e;
  --bg-card:    #1c1c30;
  --bg-nav:     #13131f;
  --bg-input:   #111119;
  --bg-overlay: #16162a;

  /* Borders */
  --border:       #2a2a42;
  --border-light: #3a3a55;

  /* Text */
  --text-primary:   #ffffff;
  --text-secondary: #b0b0cc;
  --text-muted:     #666680;
  --text-gold:      #ffe313;
  --text-red:       #ff6b8a;
  --text-green:     #4dd9a8;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* Border Radius */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Font sizes */
  --fs-xs:  10px;
  --fs-sm:  12px;
  --fs-base:14px;
  --fs-md:  15px;
  --fs-lg:  18px;
  --fs-xl:  22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;

  /* Shadows */
  --shadow-card:   0 4px 20px rgba(0,0,0,0.4);
  --shadow-red:    0 4px 16px rgba(225,0,40,0.35);
  --shadow-red-lg: 0 8px 28px rgba(225,0,40,0.45);
  --shadow-gold:   0 4px 16px rgba(255,227,19,0.25);

  /* Transitions */
  --tr: 0.2s ease;
  --tr-slow: 0.35s ease;

  /* Layout */
  --max-w: 1400px;
  --header-h: 34px;
}


/* ================================================================
   2. RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a  { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; outline: none; border: none; -webkit-tap-highlight-color: transparent; }
button:focus, button:focus-visible { outline: none; box-shadow: none; }
a:focus, a:focus-visible { outline: none; }
a { -webkit-tap-highlight-color: transparent; }


/* ================================================================
   3. UTILITIES
   ================================================================ */
.desktop-only { display: flex !important; }
.mobile-only  { display: none  !important; }
@media (max-width: 768px) {
  .desktop-only { display: none  !important; }
  .mobile-only  { display: flex  !important; }
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.section-wrap {
  width: 100%;
  padding: var(--sp-8) 0;
}

.section-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--c-red);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
/* All section title icons automatically gold — no inline style needed */
.section-title i { color: var(--c-gold); font-size: 18px; }


/* ================================================================
   4. BUTTONS — single source of truth
   ================================================================ */

/* Primary (Red) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 9px 20px;
  border-radius: var(--r-xl);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--tr);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-red), var(--c-red-light));
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-red-lg);
}
.btn-primary:active { transform: translateY(0); }

/* Outline Gold */
.btn-outline {
  background: transparent;
  color: var(--c-gold);
  border: 1.5px solid var(--c-gold);
}
.btn-outline:hover { background: var(--c-gold); color: #111; }

/* Ghost (dark surface) */
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* Size modifiers */
.btn-sm  { padding: 5px 14px; font-size: var(--fs-xs); border-radius: var(--r-lg); }
.btn-lg  { padding: 13px 28px; font-size: var(--fs-md); }
.btn-full{ width: 100%; }

/* Legacy aliases */
.btn-login {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 9px 20px; border-radius: var(--r-xl);
  font-size: var(--fs-sm); font-weight: 600; font-family: 'Roboto', sans-serif;
  border: 1.5px solid var(--c-gold); color: var(--c-gold);
  background: transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: all var(--tr);
}
.btn-login:hover { background: var(--c-gold); color: #111; }
.btn-register {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 9px 20px; border-radius: var(--r-xl);
  font-size: var(--fs-sm); font-weight: 600; font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--c-red), var(--c-red-light));
  color: #fff; border: none; cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--shadow-red); transition: all var(--tr);
}
.btn-register:hover { transform: translateY(-2px); box-shadow: var(--shadow-red-lg); }


/* ================================================================
   5. FORM ELEMENTS — unified
   ================================================================ */
.form-group { display: flex; flex-direction: column; gap: var(--sp-1); }
.form-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
}
.required { color: var(--c-red); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: var(--fs-base);
  pointer-events: none;
  z-index: 1;
  width: 16px;
  text-align: center;
}
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 40px 11px 40px;
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.input-wrap input::placeholder { color: var(--text-muted); }
.input-wrap input:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(255,227,19,0.1);
}
.input-toggle {
  position: absolute;
  right: 13px;
  color: var(--text-muted);
  font-size: var(--fs-base);
  cursor: pointer;
  z-index: 1;
  transition: color var(--tr);
  width: 16px;
  text-align: center;
}
.input-toggle:hover { color: var(--c-gold); }

/* Alert / Flash */
.alert {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.alert-error   { background: rgba(225,0,40,0.12);   border: 1px solid rgba(225,0,40,0.35);   color: var(--text-red); }
.alert-success { background: rgba(18,159,113,0.12); border: 1px solid rgba(18,159,113,0.35); color: var(--text-green); }
.alert-info    { background: rgba(255,227,19,0.08); border: 1px solid rgba(255,227,19,0.25); color: var(--c-gold); }

/* Flash Banner (top of page) */
.flash-banner {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.flash-banner.success { background: var(--c-green); color: #fff; }
.flash-banner.error   { background: var(--c-red);   color: #fff; }


/* ================================================================
   6. CARD — unified (product-card & game-card share everything)
   ================================================================ */
.card {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
  position: relative;
  display: block;
  text-decoration: none;
  border: 1px solid transparent;
}
.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-red-lg);
  border-color: rgba(225,0,40,0.3);
}
.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
.card-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-overlay));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.card-placeholder i    { font-size: 32px; color: var(--c-gold); opacity: 0.55; }
.card-placeholder span { font-size: var(--fs-sm); color: var(--text-muted); }
.card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 28px var(--sp-3) var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Legacy aliases — same styles as .card */
.product-card,
.game-card {
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-card); cursor: pointer;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
  position: relative; display: block; text-decoration: none;
  border: 1px solid transparent;
}
.product-card:hover,
.game-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-red-lg);
  border-color: rgba(225,0,40,0.3);
}
.product-card img,
.game-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }

/* Badges */
.badge {
  position: absolute;
  top: 7px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}
.badge-hot  { left: 7px;  background: var(--c-red);  color: #fff; }
.badge-new  { right: 7px; background: var(--c-gold); color: #111; }

/* Legacy */
.hot-badge {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  font-size: 9px; font-weight: 800; padding: 2px 8px;
  border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--c-red); color: #fff;
}
.new-badge {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  font-size: 9px; font-weight: 800; padding: 2px 8px;
  border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--c-gold); color: #111;
}


/* ================================================================
   7. GRID SYSTEM — unified
   ================================================================ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
@media (max-width: 1200px) { .game-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px)  { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px)  { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px)  { .game-grid { grid-template-columns: repeat(2, 1fr); } }

/* Legacy aliases — same grid as .game-grid */
.products-grid,
.games-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
@media (max-width: 1200px) { .products-grid, .games-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px)  { .products-grid, .games-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px)  { .products-grid, .games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px)  { .products-grid, .games-grid { grid-template-columns: repeat(2, 1fr); } }


/* ================================================================
   8. HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--c-red);
  width: 100%;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-2) var(--sp-4);
  gap: var(--sp-3);
  min-height: var(--header-h);
}

/* Logo */
.header-logo { flex-shrink: 0; display: flex; align-items: center; }
.logo-text {
  font-size: var(--fs-2xl);
  font-weight: 900;
  color: var(--c-gold);
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(255,227,19,0.3);
}

/* Desktop Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  padding: 6px 0;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 14px;
  border-radius: var(--r-md);
  font-size: 11px;
  font-weight: 500;
  color: #a0a0bc;
  transition: color var(--tr), background var(--tr);
  white-space: nowrap;
  text-decoration: none;
  min-width: 80px;
  position: relative;
}
.nav-item i { font-size: 24px; line-height: 1; color: #b0b0cc; transition: color var(--tr); }
.nav-item img { width: 28px; height: 28px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.75; transition: opacity var(--tr); }
.nav-item:hover { color: #fff; background: none; }
.nav-item:hover i { color: #fff; }
.nav-item:hover img { opacity: 1; }
.nav-item.active { color: var(--c-gold); background: rgba(255,227,19,0.08); }
.nav-item.active i { color: var(--c-gold); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2px;
  background: var(--c-gold);
  border-radius: 2px 2px 0 0;
}

/* ── Nav Dropdown (ค่ายเกมส์) ── */
.nav-dropdown-wrap {
  position: relative;
}
.nav-dropdown-wrap:hover .nav-item {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.nav-dropdown-wrap:hover .nav-item i { color: #fff; }
.nav-dropdown-wrap:hover .nav-item img { opacity: 1; }

.nav-dropdown-panel {
  position: fixed;
  top: var(--actual-header-h, var(--header-h));
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(14, 14, 30, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: none;
  border-top: 2px solid var(--c-red);
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 20px calc((100% - min(var(--max-w), 100%)) / 2 + 16px);
  max-height: calc(100vh - var(--header-h) - 2px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(225,0,40,0.4) transparent;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  transform: translateY(-6px);
}
.nav-dropdown-wrap:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding: 0 4px;
}

.nav-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-width: var(--max-w);
}

/* ── Nav drop item — no card, image fills, label below ── */
.nav-drop-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  transition: transform 0.15s;
}
.nav-drop-item:hover {
  transform: translateY(-3px);
}

/* Image wrapper — rounded, overflow hidden, fixed height */
.ndi-img-wrap {
  width: 100%;
  height: 130px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  position: relative;
}
.ndi-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.2s, filter 0.2s;
  filter: brightness(0.92);
}
.nav-drop-item:hover .ndi-img-wrap img {
  transform: scale(1.06);
  filter: brightness(1.05);
}
.nav-drop-item:hover .ndi-img-wrap {
  box-shadow: none;
}

/* Icon fallback (no image) */
.ndi-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ndi-icon-fallback i { font-size: 28px; color: rgba(255,255,255,0.25); }

/* Label below image — full width, red glow shadow */
.ndi-name {
  font-size: 10px;
  font-weight: 600;
  color: #d0d0e8;
  text-align: center;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 0;
  transition: color 0.15s, text-shadow 0.15s;
  line-height: 1.2;
  text-shadow:
    0 1px 0 rgba(180,0,30,0.25),
    0 2px 4px rgba(225,0,40,0.45),
    0 4px 10px rgba(225,0,40,0.35);
}
.nav-drop-item:hover .ndi-name {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(180,0,30,0.4),
    0 3px 8px rgba(225,0,40,0.7),
    0 6px 16px rgba(225,0,40,0.5);
}
.nav-drop-viewall {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  background: rgba(225,0,40,0.08);
  border: 1px solid rgba(225,0,40,0.25);
  color: var(--c-red);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  justify-content: center;
  transition: background 0.15s;
}
.nav-drop-viewall:hover { background: rgba(225,0,40,0.18); color: #fff; }

/* Header Auth */
.header-auth { display: flex; gap: var(--sp-2); flex-shrink: 0; align-items: center; }

/* Login / Register — pill buttons in header */
.btn-login {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 7px 18px;
  border: 1.5px solid var(--c-gold);
  border-radius: var(--r-full);
  color: var(--c-gold);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all var(--tr);
  white-space: nowrap;
}
.btn-login:hover { background: var(--c-gold); color: #111; }

.btn-register {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 7px 18px;
  background: linear-gradient(135deg, var(--c-red), var(--c-red-light));
  border-radius: var(--r-full);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all var(--tr);
  box-shadow: var(--shadow-red);
  white-space: nowrap;
  border: none;
}
.btn-register:hover { transform: translateY(-1px); box-shadow: var(--shadow-red-lg); }

/* Mobile header right */
.mobile-header-right { display: flex; gap: var(--sp-1); align-items: center; }
.btn-login-sm {
  padding: 4px 10px; border-radius: var(--r-lg);
  font-size: var(--fs-xs); font-weight: 600;
  border: 1px solid var(--c-gold); color: var(--c-gold);
}
.btn-register-sm {
  padding: 4px 10px; border-radius: var(--r-lg);
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--c-red); color: #fff; border: none;
}

/* Mobile Action Bar */
.mobile-action-bar {
  display: none;
  background: var(--c-green);
  width: 100%;
}
@media (max-width: 768px) { .mobile-action-bar { display: flex; } }

.user-area {
  width: 38%; padding: var(--sp-2);
  display: flex; align-items: center; justify-content: center;
}
.login-btns { display: flex; flex-direction: column; gap: var(--sp-1); }
.btn-outline-yellow {
  padding: 3px 10px;
  border: 1px solid var(--c-gold);
  border-radius: var(--r-sm);
  color: var(--c-gold);
  font-size: var(--fs-xs);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}
.action-btns {
  display: flex; flex: 1;
  justify-content: space-evenly; align-items: center;
  background: linear-gradient(110deg, transparent 28px, var(--c-green-dark) 0) left;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--c-gold); font-size: var(--fs-xs);
  padding: var(--sp-1) var(--sp-1); cursor: pointer; text-decoration: none;
}
.action-btn i { font-size: 22px; }

/* User Badge (logged in) */
.user-badge {
  display: flex; align-items: center; gap: var(--sp-2);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-1) var(--sp-3);
}
.user-badge i   { font-size: 22px; color: var(--c-gold); }
.user-name      { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.user-balance   { font-size: var(--fs-xs); color: var(--c-gold); }


/* ================================================================
   9. ANNOUNCE MARQUEE
   ================================================================ */
.announce-bar {
  background: #1e1e28;
  border-bottom: 1px solid var(--border);
  padding: 6px 40px;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  position: relative;
  min-height: 32px;
}
.announce-icon {
  position: absolute; left: 0; top: 0;
  height: 100%; width: 36px;
  background: #1e1e28;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.announce-icon i { color: var(--c-gold); font-size: var(--fs-base); }
/* .announce-content is the scrolling area wrapper */
.announce-content { overflow: hidden; flex: 1; }
.marquee-track {
  display: flex; gap: 48px;
  animation: marquee 50s linear infinite;
  white-space: nowrap;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}
.marquee-track span { font-size: var(--fs-sm); color: var(--text-secondary); flex-shrink: 0; }


/* ================================================================
   10. BANNER SWIPER
   ================================================================ */
.banner-section { width: 100%; }
.banner-swiper { width: 100%; }
.banner-swiper .swiper-slide { line-height: 0; }
.banner-swiper .swiper-slide img { width: 100%; height: auto; object-fit: contain; display: block; }
.swiper-button-next, .swiper-button-prev {
  color: var(--c-gold) !important;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  width: 36px !important;
  height: 36px !important;
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 13px !important; }


/* ================================================================
   11. CATEGORY NAV — mobile + desktop unified icon size
   ================================================================ */

/* Mobile scroll row */
.mobile-categories {
  display: none;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  background: var(--bg-nav);
  width: 100%;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-categories::-webkit-scrollbar { display: none; }
@media (max-width: 768px) { .mobile-categories { display: flex; } }

/* Shared cat-item */
.cat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px; gap: 6px;
  text-align: center; cursor: pointer;
  transition: background var(--tr);
  border-radius: var(--r-md);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 72px;
}
.cat-item:hover { background: rgba(255,255,255,0.05); }

/* Icon box — same size everywhere */
.cat-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  flex-shrink: 0;
  box-shadow: none;
  border: none;
  outline: none;
}
.cat-icon i { font-size: 28px; color: #fff; }
.cat-icon img { width: 44px; height: 44px; object-fit: contain; border-radius: 0; background: transparent; }

.cat-item span { font-size: 11px; color: #c8c8e0; font-weight: 500; line-height: 1.3; }

/* Desktop category bar */
.desktop-category-nav {
  width: 100%;
  background: #0e0e1a;
  border-bottom: 1px solid #1e1e30;
  justify-content: center;
  flex-wrap: nowrap;
  padding: 4px 16px;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.desktop-category-nav::-webkit-scrollbar { display: none; }

.dcat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  gap: 5px;
  color: #a0a0bc;
  font-size: 11px;
  font-weight: 500;
  border-radius: 8px;
  transition: color var(--tr), background var(--tr);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 86px;
}
.dcat-item i {
  font-size: 24px;
  line-height: 1;
  color: #b0b0cc;
}
.dcat-item img {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.85;
}
.dcat-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.dcat-item:hover i,
.dcat-item:hover img { color: #fff; opacity: 1; }
.dcat-item.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.dcat-item.active i { color: var(--c-gold); }
.dcat-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 2px;
  background: var(--c-gold);
  border-radius: 2px 2px 0 0;
}
.dcat-item { position: relative; }


/* ================================================================
   12. QUICK LINKS (โปรโมชั่น / กิจกรรม / ข่าวสาร)
   ================================================================ */
.section-quicklinks {
  width: 100%;
  padding: var(--sp-6) 0;
}

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

.ql-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}
.ql-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px rgba(225,0,40,0.5), 0 8px 28px rgba(225,0,40,0.4);
  border-color: rgba(225,0,40,0.4);
}

.ql-img-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ql-img-wrap img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.ql-fallback-icon {
  font-size: 32px;
  color: var(--c-gold);
  display: none;
}
.ql-img-wrap img[style*="display:none"] ~ .ql-fallback-icon,
.ql-img-wrap img:not([src]) ~ .ql-fallback-icon {
  display: block;
}

.ql-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ql-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.ql-desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

/* Mobile: horizontal scroll row */
@media (max-width: 768px) {
  .quicklinks-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .quicklinks-grid::-webkit-scrollbar { display: none; }
  .ql-card {
    flex: 0 0 72vw;
    max-width: 300px;
    padding: 12px 14px;
    border-radius: 12px;
  }
  .ql-img-wrap,
  .ql-img-wrap img {
    width: 54px;
    height: 54px;
  }
}

/* CTA Row — global */
.cta-row {
  margin-top: var(--sp-5);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
}


/* ================================================================
   12b. FEATURED GAMES SECTION
   ================================================================ */
.featured-games-section { background: var(--bg-page); }
.fg-scroll-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.fg-scroll-wrap::-webkit-scrollbar { display: none; }
.fg-scroll-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow: visible;
}

.fg-card {
  flex: 0 0 calc((100% - 4 * 12px) / 5);
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  position: relative;
}
.fg-card:hover {
  transform: translateY(-3px);
}
.fg-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #111;
  border-radius: var(--r-md);
  border: 1px solid rgba(225,0,40,.45);
}
.fg-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .25s;
  display: block;
}
.fg-card:hover .fg-img-wrap img { transform: scale(1.06); }
.fg-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a0a0a, #2a1515);
  font-size: 32px;
  color: rgba(225,0,40,.4);
}
.fg-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s;
  border-radius: var(--r-md);
}
.fg-card:hover .fg-play-overlay { opacity: 1; }
.fg-play-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
}
.fg-badge-rtp {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,.75);
  color: #4caf50;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.fg-body {
  padding: 6px 6px 4px;
  background: linear-gradient(to bottom, rgba(225,0,40,.05) 0%, rgba(225,0,40,.18) 100%);
  border-left: 1px solid rgba(225,0,40,.45);
  border-right: 1px solid rgba(225,0,40,.45);
  border-bottom: 1px solid rgba(225,0,40,.45);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: inset 0 0 10px rgba(225,0,40,.15);
}
.fg-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}
.fg-provider {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

@media (max-width: 768px) {
  .fg-scroll-row { gap: 8px; }
  .fg-card { flex: 0 0 calc((100% - 2 * 8px) / 3); }
  .fg-name { font-size: 10px; }
  .fg-provider { font-size: 8px; }
}

/* ================================================================
   13. JACKPOT
   ================================================================ */
.jackpot-section {
  --jp-desk-img: none;
  --jp-mob-img: none;
  --jp-pos: 50% 50%;
  --jp-size: cover;
  width: 100%;
  background-color: #1c0505;
  background-image: var(--jp-desk-img),
                    linear-gradient(90deg, #150505 0%, #230808 50%, #150505 100%);
  background-position: var(--jp-pos), center;
  background-size: var(--jp-size), cover;
  background-repeat: no-repeat, no-repeat;
  padding: var(--sp-6) 0;
  border-top: 1px solid rgba(225,0,40,0.2);
  border-bottom: 1px solid rgba(225,0,40,0.2);
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) {
  .jackpot-section {
    background-image: var(--jp-mob-img),
                      linear-gradient(90deg, #150505 0%, #230808 50%, #150505 100%);
  }
  .jackpot-amount { font-size: 32px !important; letter-spacing: 1px !important; }
}
@media (max-width: 480px) {
  .jackpot-amount { font-size: 24px !important; letter-spacing: 0 !important; }
}
.jackpot-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-4); text-align: center; }
.jackpot-label {
  font-size: var(--fs-sm); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 3px; margin-bottom: var(--sp-2);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
}
.jackpot-label i { color: var(--c-gold); }
.jackpot-amount {
  font-size: 52px; font-weight: 900; color: var(--c-gold);
  text-shadow: 0 0 30px rgba(255,227,19,0.4);
  letter-spacing: 4px; font-family: monospace;
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
}
.jackpot-amount .currency { color: var(--c-red-light); }
/* Semantic class names matching index.php */
.jackpot-currency { color: var(--c-red-light); }
.jackpot-sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
  letter-spacing: 0.5px;
}
@media (max-width: 768px) { .jackpot-amount { font-size: 34px; } }


/* ================================================================
   14. SECTIONS (backgrounds)
   ================================================================ */
/* Unified home section — use .home-section + bg modifier */
.home-section { width: 100%; padding: var(--sp-8) 0; }
.home-section .container { padding-top: 0; padding-bottom: 0; }

.bg-dark    { background: var(--bg-page); }
.bg-surface { background: var(--bg-surface); }
.bg-overlay { background: var(--bg-overlay); }
.bg-deep    { background: #0a0a14; }

/* Named aliases */
.section-dark    { background: var(--bg-page);    width: 100%; padding: var(--sp-8) 0; }
.section-surface { background: var(--bg-surface); width: 100%; padding: var(--sp-8) 0; }
.section-overlay { background: var(--bg-overlay); width: 100%; padding: var(--sp-8) 0; }
.section-deep    { background: #0a0a14;            width: 100%; padding: var(--sp-8) 0; }

/* Legacy section classes */
.products-section { width: 100%; background: var(--bg-page);    padding: var(--sp-8) 0; }
.game-hot-section { width: 100%; background: var(--bg-overlay); padding: var(--sp-8) 0; }


/* ================================================================
   15. WHY US
   ================================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.why-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  border: 1px solid var(--border);
  transition: border-color var(--tr), transform var(--tr);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}
.why-card:hover { border-color: var(--c-gold); transform: translateY(-2px); }
.why-title { font-weight: 700; color: var(--c-gold); font-size: var(--fs-md); margin-bottom: var(--sp-1); position: relative; z-index: 1; }
.why-desc  { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.65; position: relative; z-index: 1; }


/* ================================================================
   16. DOWNLOAD APP
   ================================================================ */
.download-section {
  width: 100%;
  background: linear-gradient(135deg, #090f1f 0%, #111e35 100%);
  padding: var(--sp-10) 0;
}
/* .download-inner works inside either .container or standalone */
.download-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
/* Semantic class names — no tag dependency */
.download-heading {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--c-gold);
  margin-bottom: var(--sp-2);
}
.download-heading i { margin-right: var(--sp-2); }
.download-sub {
  font-size: var(--fs-base);
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}
/* Legacy tag selectors */
.download-text h2   { font-size: var(--fs-2xl); font-weight: 700; color: var(--c-gold); margin-bottom: var(--sp-2); }
.download-text h2 i { margin-right: var(--sp-2); }
.download-text p    { font-size: var(--fs-base); color: var(--text-muted); margin-bottom: var(--sp-5); }

.download-btns { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: 0; }
.download-btn {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--fs-sm); font-weight: 500;
  transition: background var(--tr);
  text-decoration: none;
}
.download-btn i { font-size: 22px; color: var(--c-gold); flex-shrink: 0; }
.download-btn small { display: block; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.2; }
.download-btn strong { display: block; font-size: var(--fs-base); font-weight: 700; }
.download-btn-text { display: flex; flex-direction: column; }
.download-btn-text small { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.2; }
.download-btn-text strong { font-size: var(--fs-base); font-weight: 700; line-height: 1.3; }
.download-btn:hover { background: rgba(255,255,255,0.14); border-color: var(--border); }

/* QR code */
.download-qr { flex-shrink: 0; text-align: center; }
.qr-img { width: 120px; height: 120px; border-radius: var(--r-md); }
.download-qr img { width: 120px; height: 120px; border-radius: var(--r-md); }

@media (max-width: 768px) {
  .download-inner { flex-direction: column; text-align: center; }
  .download-btns  { justify-content: center; }
  .download-qr    { display: none; }
}


/* ================================================================
   17. FOOTER
   ================================================================ */
.site-footer {
  background: #0a0a12;
  border-top: 2px solid var(--border);
  padding: var(--sp-8) 0 100px;
}
@media (min-width: 769px) { .site-footer { padding-bottom: var(--sp-8); } }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-4); }
.footer-top   { display: flex; gap: var(--sp-10); margin-bottom: var(--sp-8); flex-wrap: wrap; }
.footer-brand { flex: 1; min-width: 200px; }
.footer-logo-text {
  font-size: var(--fs-2xl); font-weight: 900;
  color: var(--c-gold); margin-bottom: var(--sp-3);
  letter-spacing: 3px; text-shadow: 0 0 15px rgba(255,227,19,0.25);
}
.footer-brand p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.75; max-width: 280px; }
.footer-links-group { display: flex; gap: var(--sp-8); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col h4 { font-size: var(--fs-base); font-weight: 600; color: var(--c-gold); margin-bottom: var(--sp-1); }
.footer-col a {
  font-size: var(--fs-sm); color: var(--text-muted);
  transition: color var(--tr);
  display: flex; align-items: center; gap: var(--sp-1);
}
.footer-col a:hover { color: var(--text-primary); }
.footer-col a i { width: 14px; text-align: center; }
.footer-divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }
/* Partner CTA Banner in Footer */
.footer-partner-cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(255,227,19,.07) 0%, rgba(255,107,0,.07) 100%);
  border: 1px solid rgba(255,227,19,.18);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 22px;
}
.fpc-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 200px; }
.fpc-icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,227,19,.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; color: #ffe313; }
.fpc-text { display: flex; flex-direction: column; gap: 3px; }
.fpc-text strong { font-size: 14px; font-weight: 700; color: #fff; }
.fpc-text span { font-size: 12px; color: var(--text-muted); }
.fpc-perks { display: flex; gap: 14px; flex-wrap: wrap; }
.fpc-perk { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.fpc-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px;
  background: linear-gradient(135deg, #ffe313, #ff6b00);
  color: #111; font-size: 13px; font-weight: 700; border-radius: 8px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: opacity .15s;
}
.fpc-btn:hover { opacity: .88; }
@media(max-width:600px){
  .footer-partner-cta{flex-direction:column;align-items:flex-start;}
  .fpc-perks{gap:10px;}
}

.footer-partners, .footer-payment { margin-bottom: var(--sp-5); }
.partner-label { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-3); text-transform: uppercase; letter-spacing: 1px; }
.partner-logos { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; }
.partner-logos img { height: 36px; width: auto; max-width: 100px; object-fit: contain; opacity: 0.7; filter: grayscale(0.4); transition: all var(--tr); }
.partner-logos img:hover { opacity: 1; filter: none; }
.partner-text-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--text-muted); opacity: 0.7; transition: opacity var(--tr); }
.partner-text-badge:hover { opacity: 1; }
.payment-logos { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.payment-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px var(--sp-3);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--text-muted);
}
.payment-badge-img { padding: 0; background: none; border: none; }
.payment-badge-img img { height: 32px; width: auto; max-width: 90px; object-fit: contain; display: block; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--sp-4); text-align: center; }
.footer-bottom p { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-1); }
.footer-warning { color: var(--c-red) !important; }


/* ================================================================
   18. FLOATING ASIDE
   ================================================================ */
.floating-aside {
  position: fixed; right: 8px; top: 35%; z-index: 50;
  display: flex; flex-direction: column;
}
.aside-wrapper {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.aside-item img { width: 52px; height: auto; transition: transform var(--tr); }
.aside-item:hover img { transform: scale(1.1); }


/* ================================================================
   19. MOBILE BOTTOM NAV
   ================================================================ */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  justify-content: space-around; align-items: center;
  padding: var(--sp-1) 0; height: 60px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
@media (max-width: 768px) { .mobile-nav { display: flex; } }
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 0 0 auto; min-width: 52px; padding: 4px 6px;
  color: var(--text-muted); font-size: 10px; font-weight: 500;
  transition: color var(--tr), background var(--tr);
  text-decoration: none; border-radius: var(--r-md);
  position: relative;
}
.mobile-nav-item i { font-size: 18px; line-height: 1; }
.mobile-nav-item:hover {
  color: var(--text-primary);
  background: none;
  box-shadow: none;
}
.mobile-nav-item.active {
  color: var(--c-gold);
}
.mobile-nav-item.active i {
  color: var(--c-gold);
}
/* ── Mobile Nav Center Button (ฝาก/ถอน) ── */
.mobile-nav-center-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}
.mobile-nav-center-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  transition: color var(--tr);
  position: relative;
}
.mobile-nav-center-btn:hover,
.mobile-nav-center-btn:active { color: #fff; }
.mobile-nav-center-btn .btn-custom-icon { width: 36px; height: 36px; }
.mobile-nav-center-btn i { font-size: 20px; color: var(--c-red); }

/* Popup menu above center button */
.mobile-depwith-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.5);
  min-width: 130px;
  z-index: 300;
}
.mobile-depwith-menu.open { display: block; }
.mobile-depwith-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--tr), color var(--tr);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mobile-depwith-item:last-child { border-bottom: none; }
.mobile-depwith-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.mobile-depwith-item i { font-size: 16px; color: var(--c-red); width: 18px; text-align: center; }

/* gold dot indicator on active */
.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--c-gold);
  border-radius: 50%;
  display: none;
}


/* ================================================================
   20. SCROLL TO TOP
   ================================================================ */
.scroll-top-btn {
  position: fixed; bottom: 80px; right: var(--sp-4); z-index: 50;
  width: 40px; height: 40px;
  background: var(--c-red); border: none; border-radius: 50%;
  color: #fff; font-size: var(--fs-base); cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-red); transition: background var(--tr);
}
.scroll-top-btn.visible { display: flex; }
.scroll-top-btn:hover   { background: var(--c-red-dark); }
@media (min-width: 769px) { .scroll-top-btn { bottom: var(--sp-6); } }


/* ================================================================
   21. PAGE LOADER
   ================================================================ */
.page-loader {
  position: fixed; inset: 0;
  background: var(--bg-page);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity 0.4s;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo {
  font-size: var(--fs-3xl); font-weight: 900; color: var(--c-gold);
  letter-spacing: 4px; animation: pulse 1s infinite alternate;
}
@keyframes pulse {
  from { opacity: 0.45; transform: scale(0.94); }
  to   { opacity: 1;    transform: scale(1.04); }
}


/* ================================================================
   22. AUTH PAGES
   ================================================================ */
.auth-page {
  background: linear-gradient(135deg, var(--bg-page) 0%, #1a0a14 50%, #0a100d 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
}
.auth-bg  { width: 100%; display: flex; align-items: center; justify-content: center; }
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-10) var(--sp-8);
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
@media (max-width: 480px) {
  .auth-card { padding: var(--sp-6) var(--sp-5); border-radius: var(--r-lg); }
}
.auth-logo {
  display: block; text-align: center;
  font-size: 34px; font-weight: 900;
  color: var(--c-gold); letter-spacing: 4px;
  margin-bottom: var(--sp-1); text-decoration: none;
  text-shadow: 0 0 20px rgba(255,227,19,0.4);
}
.auth-title {
  text-align: center; font-size: var(--fs-lg); font-weight: 600;
  color: var(--text-secondary); margin-bottom: var(--sp-6);
}
.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form-group label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary); }

/* Auth specific input (override .input-wrap for auth pages) */
.auth-form .input-wrap input {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 40px 11px 40px;
  color: var(--text-primary);
  font-size: var(--fs-base);
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.auth-form .input-wrap input:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(255,227,19,0.1);
}
.auth-form .input-wrap > i:first-child {
  position: absolute; left: 13px; color: var(--text-muted);
  font-size: var(--fs-base); pointer-events: none; z-index: 1;
}
.toggle-pw {
  position: absolute; right: 13px; color: var(--text-muted);
  font-size: var(--fs-base); cursor: pointer; z-index: 1;
  transition: color var(--tr);
}
.toggle-pw:hover { color: var(--c-gold); }

.btn-auth-submit {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--c-red), var(--c-red-light));
  border: none; border-radius: var(--r-md);
  color: #fff; font-size: var(--fs-md); font-weight: 700;
  font-family: 'Roboto', sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  transition: all var(--tr);
  box-shadow: var(--shadow-red); margin-top: var(--sp-1);
}
.btn-auth-submit:hover { transform: translateY(-2px); box-shadow: var(--shadow-red-lg); }
.btn-auth-submit:active { transform: translateY(0); }

.auth-footer {
  text-align: center; margin-top: var(--sp-4);
  font-size: var(--fs-sm); color: var(--text-muted);
}
.auth-footer a { color: var(--c-gold); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ================================================================
   23. PROMO SWIPER
   ================================================================ */
.promo-swiper { padding: var(--sp-3) 0; margin-top: var(--sp-2); }
.promo-swiper .swiper-slide { line-height: 0; }
.promo-swiper .swiper-slide img,
.promo-img {
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform var(--tr);
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.promo-swiper .swiper-slide img:hover,
.promo-img:hover { transform: scale(1.02); }

/* ================================================================
   24. LOBBY PAGES
   ================================================================ */

/* Lobby Banner */
.lobby-banner-section {
  width: 100%;
  overflow: hidden;
  margin-bottom: -2px;
}
.lobby-banner-section img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.lobby-banner-swiper .swiper-slide { line-height: 0; }
.lobby-banner-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Lobby Header */
.lobby-header { padding: var(--sp-5) var(--sp-4) var(--sp-2); }
.lobby-title-wrap {
  display: flex; align-items: center; gap: var(--sp-4);
}
.lobby-type-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lobby-type-icon i { font-size: 24px; color: #fff; }
.lobby-title { font-size: var(--fs-2xl); font-weight: 800; color: var(--text-primary); margin: 0 0 2px; }
.lobby-desc   { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

/* Lobby Tabs */
.lobby-tabs {
  display: flex; gap: 8px; padding: 10px 16px 0;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-1);
}
.lobby-tabs::-webkit-scrollbar { display: none; }
.lobby-tab {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 14px;
  color: var(--text-muted); font-size: 11px; text-decoration: none;
  white-space: nowrap; border-bottom: 2px solid transparent;
  transition: all var(--tr); flex-shrink: 0;
}
.lobby-tab i { font-size: 16px; }
.lobby-tab:hover { color: var(--text-primary); }
.lobby-tab.active {
  color: var(--c-gold);
  border-bottom-color: var(--c-gold);
}

/* Lobby Login Prompt */
.lobby-login-prompt {
  text-align: center; padding: var(--sp-8) var(--sp-4);
  color: var(--text-muted);
}
.lobby-login-prompt i { font-size: 40px; margin-bottom: var(--sp-3); color: var(--text-muted); display: block; }
.lobby-login-prompt p { font-size: var(--fs-md); margin-bottom: var(--sp-5); }

/* Lobby Game Card override */
.lobby-game-card img {
  aspect-ratio: 16/9;
  object-fit: cover;
}
.lobby-game-card .card-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-card-hover);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-muted);
  font-size: 11px;
}
.lobby-game-card .card-placeholder i { font-size: 28px; }
.lobby-game-card .card-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding: 18px 10px 8px;
  font-size: 11px; font-weight: 600; color: #fff;
  text-align: center;
}
.play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--tr);
  z-index: 3;
}
.lobby-game-card:hover .play-overlay { opacity: 1; }
.play-btn {
  background: var(--c-red); color: #fff;
  padding: 8px 20px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  transform: translateY(8px); transition: transform var(--tr);
}
.lobby-game-card:hover .play-btn { transform: translateY(0); }

/* ================================================================
   25. PROMOTION PAGE
   ================================================================ */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}
@media (max-width: 900px) { .promo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .promo-grid { grid-template-columns: 1fr; } }

.promo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--tr), box-shadow var(--tr);
}
.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-red-lg);
  border-color: rgba(225,0,40,0.3);
}
.promo-card-img {
  position: relative; width: 100%; height: 180px; overflow: hidden;
}
.promo-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.promo-card:hover .promo-card-img img { transform: scale(1.04); }
.promo-tag {
  position: absolute; top: 10px; right: 10px;
  background: var(--c-red); color: #fff;
  font-size: 9px; font-weight: 800; padding: 3px 10px;
  border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 1px;
}
.promo-card-body { padding: var(--sp-4) var(--sp-4) var(--sp-5); }
.promo-card-title {
  font-size: var(--fs-md); font-weight: 700;
  color: var(--text-primary); margin: 0 0 var(--sp-2);
}
.promo-card-desc {
  font-size: var(--fs-sm); color: var(--text-muted);
  margin: 0 0 var(--sp-4); line-height: 1.5;
}
.promo-btn {
  width: 100%; text-align: center; display: block;
  padding: 10px 0; font-size: 13px; font-weight: 600;
}

/* ================================================================
   26. ACCOUNT PAGE
   ================================================================ */
.account-grid {
  display: flex; flex-direction: column; gap: var(--sp-5);
  max-width: 600px; padding: var(--sp-4) 0;
}
.account-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,227,19,0.2);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex; align-items: center; gap: var(--sp-5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.account-avatar { flex-shrink: 0; }
.account-info { flex: 1; }
.account-username {
  font-size: var(--fs-xl); font-weight: 700;
  color: var(--text-primary); margin-bottom: 4px;
}
.account-balance {
  font-size: var(--fs-md); color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}

.account-actions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.account-action-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-2); text-decoration: none; color: var(--text-secondary);
  font-size: 11px; transition: color var(--tr);
}
.account-action-btn:hover { color: var(--text-primary); }
.account-action-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.account-action-icon i { font-size: 22px; color: #fff; }

.account-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.account-menu-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 16px var(--sp-5);
  color: var(--text-secondary); text-decoration: none; font-size: var(--fs-sm);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--tr), color var(--tr);
}
.account-menu-item:last-child { border-bottom: none; }
.account-menu-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.account-menu-item i:first-child {
  width: 20px; text-align: center;
  color: var(--c-gold); font-size: 15px;
}

/* ── Custom Button Icons (uploaded via admin) ── */
/* Desktop nav */
.nav-item .btn-custom-icon {
  width: 38px; height: 38px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity var(--tr);
  filter: none;
}
.nav-item:hover .btn-custom-icon,
.nav-dropdown-wrap:hover .nav-item .btn-custom-icon {
  opacity: 1;
}
.nav-item.active .btn-custom-icon {
  opacity: 1;
  filter: drop-shadow(0 0 5px var(--c-gold));
}

/* Mobile bottom nav */
.mobile-nav-item .btn-custom-icon {
  width: 32px; height: 32px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  display: block;
  margin: 0 auto;
}
.mobile-nav-item.active .btn-custom-icon {
  filter: drop-shadow(0 0 4px var(--c-gold));
}
.mobile-nav-center-btn .btn-custom-icon {
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

/* Mobile action bar (ฝากเงิน / ถอนเงิน / สมัคร) */
.action-btn .btn-custom-icon {
  width: 36px; height: 36px;
  object-fit: contain;
  display: block;
}

/* Account quick-action icons */
.account-action-icon .btn-custom-icon {
  width: 40px; height: 40px;
  object-fit: contain;
}

/* Account sidebar list icons */
.account-menu-item .btn-custom-icon {
  width: 28px; height: 28px;
  object-fit: contain;
  color: var(--c-gold);
}

/* ── Global Red Glow on Hover (cards & large elements only) ── */
.why-card:hover,
.nav-drop-viewall:hover,
.dcat-item:hover,
.prov-card:hover,
.promo-card:hover,
.card:hover,
.game-card:hover,
.ql-card:hover {
  box-shadow: 0 0 0 2px rgba(225,0,40,0.45), 0 8px 28px rgba(225,0,40,0.45), 0 2px 10px rgba(0,0,0,0.35);
}

/* ================================================================
   DESKTOP HAMBURGER + SIDE DRAWER
   ================================================================ */
.desktop-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr);
  flex-shrink: 0;
}
.desktop-hamburger:hover {
  background: rgba(255,227,19,0.12);
  border-color: rgba(255,227,19,0.35);
}
.desktop-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background var(--tr);
}
.desktop-hamburger:hover span { background: var(--c-gold); }

/* Overlay */
.desk-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.desk-drawer-overlay.open {
  display: block;
  opacity: 1;
}

/* Drawer panel */
.desk-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.desk-drawer.open { right: 0; }

/* Close button */
.desk-drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--tr);
}
.desk-drawer-close:hover { background: rgba(225,0,40,0.25); }

/* User card inside drawer */
.desk-drawer-user {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-bottom: 1px solid rgba(255,227,19,0.15);
  margin-top: 0;
}
.desk-drawer-avatar i {
  font-size: 52px;
  color: var(--c-gold);
}
.desk-drawer-name {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.desk-drawer-balance {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.desk-drawer-balance span {
  color: var(--c-gold);
  font-weight: 700;
}

/* Menu items */
.desk-drawer-menu {
  flex: 1;
  padding: var(--sp-3) 0;
}
.desk-drawer-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 14px var(--sp-5);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--fs-sm);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--tr), color var(--tr);
}
.desk-drawer-item:last-child { border-bottom: none; }
.desk-drawer-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.desk-drawer-item i:first-child {
  width: 20px;
  text-align: center;
  color: var(--c-gold);
  font-size: 15px;
  flex-shrink: 0;
}
.desk-drawer-item i:last-child {
  margin-left: auto;
  opacity: 0.4;
  font-size: 11px;
}
.desk-drawer-item .btn-custom-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.desk-drawer-logout { color: var(--c-red) !important; }
.desk-drawer-logout i:first-child { color: var(--c-red) !important; }

/* Admin role buttons in sidebar */
.desk-drawer-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 4px 0;
}
.desk-drawer-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.desk-drawer-role-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .5px;
  margin-left: 4px;
}
.desk-drawer-item--agent:hover { background: rgba(99,102,241,0.08) !important; }
.desk-drawer-item--admin:hover  { background: rgba(225,0,40,0.08)   !important; }
.desk-drawer-item--partner:hover{ background: rgba(255,227,19,0.08) !important; }

/* Hide drawer on mobile */
@media (max-width: 768px) {
  .desk-drawer, .desk-drawer-overlay { display: none !important; }
}
