:root {
  --nav-h: 58px;
  --radius: 5px;
}

/* Theme 1 - DATA1628 (black & gold) */
:root,
[data-theme="theme1"] {
  /* Page background */
  --page-bg-from: #0d0c0d;
  --page-bg-to: #141414;
  --page-bg-rgb: 13, 12, 13;
  --page-bg-image: linear-gradient(99.01deg, #0d0c0d 18.43%, #141414 90.96%);
  --page-bg-image-mobile: linear-gradient(99.01deg, #0d0c0d 18.43%, #141414 90.96%);

  /* Popups / modals background */
  --modal-bg-from: #1c1c1c;
  --modal-bg-to: #0d0c0d;

  /* Primary (active) buttons */
  --btn-primary-from: #bf9300;
  --btn-primary-to: #a86702;
  /* Save / OK buttons */
  --btn-secondary-from: #bf9300;
  --btn-secondary-to: #a86702;
  /* Login / modal action buttons */
  --btn-login-from: #bf9300;
  --btn-login-to: #a86702;

  /* Selected category / provider tile */
  --tile-active-bg: linear-gradient(180deg, #bf9300 0%, #a86702 100%);
  --tile-active-border: #bf9300;

  /* Accents (solid) */
  --accent: #bf9300;
  --accent-soft: #f6b533;
  --gold: #f6b533;
  --green: #4ade80;

  /* Accents (rgb, used with opacity) */
  --accent-rgb: 168, 103, 2;
  --accent-soft-rgb: 246, 181, 51;
  --glow-rgb: 191, 147, 0;

  /* Neutral layers (rgb, used with opacity) */
  --fg-rgb: 255, 255, 255;
  --shadow-rgb: 0, 0, 0;
  --border-rgb: 209, 209, 209;

  /* Shared surfaces */
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(246, 181, 51, 0.45);
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.08);
  --search-bg: #d1d1d11a;
  --search-border: #ffffff4d;
  --table-row-alt: #9e9e9e4d;
  --popup-backdrop: #000000b3;
  --logout-bg: #ff000080;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #c6c6c6;
  --text-secondary-rgb: 198, 198, 198;
  --text-light: #ffffff;
  --text-muted: #888888;

  /* Footer (desktop) */
  --footer-bg: linear-gradient(90deg, #d5a524 0%, #a0702d 100%);
  --footer-text: #ffffff;

  /* Announcement ticker */
  --ticker-border: #ffffff38;

  /* Header logo (desktop) */
  --logo-width: 100%;

  /* Header logo (mobile) */
  --mobile-logo-width: 130px;
  --mobile-logo-width-sm: auto;

  /* Login modal logo */
  --modal-logo-height: 114px;

  /* Copyright bar */
  --copyright-bg: #1c1c1c;
  --text-copyright: #555353;

  /* Mobile bottom nav */
  --nav-bg: linear-gradient(99.01deg, #0d0c0d 18.43%, #141414 90.96%);
  --nav-shadow: inset 0px 4px 6px 0px #ffffff1a;
  --nav-active: #ffffff;
  --nav-inactive: #736e6e;

  /* Status */
  --err-text: #ff6b6b;
  --danger-text: #fca5a5;
  --danger-rgb: 239, 68, 68;
  --danger-from: #b91c1c;
  --danger-to: #dc2626;
  --success-from: #16a34a;
  --success-to: #22c55e;
  --disabled-bg: #cccccc;
  --disabled-text: #666666;

  /* Dropdown arrow */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f6b533' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Theme 2 - KioskUno (purple) */
[data-theme="theme2"] {
  /* Page background */
  --page-bg-from: #34046a;
  --page-bg-to: #040054;
  --page-bg-rgb: 15, 0, 35;
  --page-bg-image: url("../images/theme2/background/bg-web.png");
  --page-bg-image-mobile: url("../images/theme2/background/bg-mobile.png");

  /* Popups / modals background */
  --modal-bg-from: #180040;
  --modal-bg-to: #2a006a;

  /* Primary (active) buttons */
  --btn-primary-from: #7c3aed;
  --btn-primary-to: #c026d3;
  /* Save / OK buttons */
  --btn-secondary-from: #34046a;
  --btn-secondary-to: #040054;
  /* Login / modal action buttons */
  --btn-login-from: #8906b1;
  --btn-login-to: #24016c;

  /* Selected category / provider tile */
  --tile-active-bg: #70017d;
  --tile-active-border: #70017d;

  /* Accents (solid) */
  --accent: #c026d3;
  --accent-soft: #a855f7;
  --gold: #fbbf24;
  --green: #4ade80;

  /* Accents (rgb, used with opacity) */
  --accent-rgb: 192, 38, 211;
  --accent-soft-rgb: 168, 85, 247;
  --glow-rgb: 124, 58, 237;

  /* Neutral layers (rgb, used with opacity) */
  --fg-rgb: 255, 255, 255;
  --shadow-rgb: 0, 0, 0;
  --border-rgb: 209, 209, 209;

  /* Shared surfaces */
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(168, 85, 247, 0.45);
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.08);
  --search-bg: #ffffff80;
  --search-border: #ffffff4d;
  --table-row-alt: #9e9e9e4d;
  --popup-backdrop: #000000b3;
  --logout-bg: #ff000080;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #c4b5fd;
  --text-secondary-rgb: 196, 181, 253;
  --text-light: #e2e0ff;
  --text-muted: #888888;

  /* Footer (desktop) */
  --footer-bg: none;
  --footer-text: #5e5e5e;

  /* Announcement ticker */
  --ticker-border: rgba(168, 85, 247, 0.35);

  /* Header logo (desktop) */
  --logo-width: 350px;

  /* Header logo (mobile) */
  --mobile-logo-width: 130px;
  --mobile-logo-width-sm: 100px;

  /* Login modal logo */
  --modal-logo-height: auto;

  /* Copyright bar */
  --copyright-bg: #330058;
  --text-copyright: #838383;

  /* Mobile bottom nav */
  --nav-bg: #370076;
  --nav-shadow: inset 0px 4px 6px 0px #ffffff1a;
  --nav-active: #ffffff;
  --nav-inactive: #949494;

  /* Status */
  --err-text: #f87171;
  --danger-text: #fca5a5;
  --danger-rgb: 248, 113, 113;
  --danger-from: #b91c1c;
  --danger-to: #dc2626;
  --success-from: #16a34a;
  --success-to: #22c55e;
  --disabled-bg: #cccccc;
  --disabled-text: #666666;

  /* Dropdown arrow */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a855f7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background-image: var(--page-bg-image);
  background-position: top left;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text-primary);
  /* min-height: 100dvh; */
  overflow-x: hidden;
}

.container {
  max-width: 96%;
  margin: 0 auto;
  padding: 0 18px;
}

button:disabled {
  background: var(--disabled-bg) !important;
  color: var(--disabled-text);
  cursor: not-allowed;
  opacity: 0.6;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding: 0 20px; */
  height: 52px;
  max-width: 100%;
  margin: 15px auto;
}

.logo img {
  width: var(--logo-width);
}

.modal-backdrop.show {
  opacity: 0.85;
}

footer {
  background: var(--footer-bg);
  text-align: center;
  padding: 10px 0;
}
.footer-providers {
  display: flex;
  gap: 3px;
  max-width: fit-content;
  margin: 10px auto;
}
.footer-providers img {
  height: 22px;
  width: auto;
}
.footer-inner span {
  color: var(--footer-text);
  font-size: 13px;
}

.page-wrap {
  margin-bottom: 50px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-user-info {
  text-align: right;
  line-height: 1.1;
  margin-right: 4px;
}
.nav-user-info .uname {
  font-size: 20px;
  font-weight: 400;
}
.nav-user-info .ubal {
  font-size: 18px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}
.nav-user-info .ubal img {
  width: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 15px;
  border-radius: 7px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-ghost {
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid rgba(var(--fg-rgb), 0.14);
  color: var(--text-secondary);
  height: 49px;
  font-size: 16px;
}
.btn-ghost:hover {
  background: rgba(var(--accent-soft-rgb), 0.14);
  border-color: var(--border-hi);
  color: var(--text-primary);
}
.btn-ghost img {
  width: 25px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--btn-primary-from), var(--btn-primary-to));
  color: var(--text-primary);
  box-shadow: 0 3px 12px rgba(var(--glow-rgb), 0.35);
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.btn-primary img {
  width: 25px;
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(var(--danger-rgb), 0.35);
  color: var(--danger-text);
}
.btn-danger:hover {
  background: rgba(var(--danger-rgb), 0.12);
}
.btn-danger img {
  width: 25px;
}

.inner-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 18px 18px;
}

.card {
  background: rgba(var(--fg-rgb), 0.043);
  border: 1px solid rgba(var(--border-rgb), 0.29);
  border-radius: 5px;
  padding: 24px 26px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--text-primary);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(var(--shadow-rgb), 0.72);
  backdrop-filter: blur(6px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.overlay.active,
.overlay.open {
  display: flex;
}

/* 404 */
.error-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.error-inner {
  text-align: center;
  max-width: 460px;
}
.error-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.error-icon {
  width: 240px;
  animation: maintFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 12px 40px rgba(var(--glow-rgb), 0.45));
}
.error-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-light);
  margin: 0 0 14px;
  letter-spacing: 0.3px;
}
.error-text {
  font-size: 14px;
  color: rgba(var(--text-secondary-rgb), 0.6);
  line-height: 1.6;
  margin: 0 0 28px;
}
.error-home-btn {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--btn-login-from), var(--btn-login-to));
  border: 1px solid rgba(var(--fg-rgb), 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.4);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.error-home-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: var(--text-primary);
  text-decoration: none;
}
.error-home-btn:active {
  transform: translateY(0);
}

/* Maintenance modal */
#maintenancemodal {
  z-index: 9999;
}
#maintenancemodal .modal-content {
  background: linear-gradient(160deg, var(--modal-bg-from) 0%, var(--modal-bg-to) 100%);
  border: 1px solid rgba(var(--accent-soft-rgb), 0.28);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(var(--shadow-rgb), 0.7),
    0 0 50px rgba(var(--glow-rgb), 0.2);
  text-align: center;
}
.maint-icon-wrap {
  padding: 36px 28px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maint-icon {
  width: 110px;
  height: auto;
  animation: maintFloat 3s ease-in-out infinite;
}
@keyframes maintFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.maint-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 28px 24px;
  letter-spacing: 0.2px;
}
.maint-footer {
  padding: 0 30px;
}
.maint-ok-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--btn-login-from), var(--btn-login-to));
  border: 1px solid rgba(var(--fg-rgb), 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.3px;
  transition:
    opacity 0.17s,
    transform 0.17s;
  box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.4);
  margin-bottom: 10px;
}
.maint-ok-btn:hover {
  background: rgba(var(--fg-rgb), 0.07);
}
.maint-ok-btn:active {
  background: rgba(var(--fg-rgb), 0.12);
}

/* Qrcode modal */
#qrcodemodal {
  z-index: 9999;
}
#qrcodemodal .modal-dialog {
  max-width: 700px;
}
#qrcodemodal .qr-modal-content {
  background: linear-gradient(155deg, var(--modal-bg-from) 0%, var(--modal-bg-to) 100%);
  border: 1px solid rgba(var(--accent-soft-rgb), 0.25);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(var(--shadow-rgb), 0.7),
    0 0 50px rgba(var(--glow-rgb), 0.18);
  position: relative;
  overflow: visible;
}
#qrcodemodal .qr-close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--fg-rgb), 0.22);
  background: transparent;
  color: rgba(var(--fg-rgb), 1);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.17s,
    color 0.17s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}
#qrcodemodal .qr-close-btn:hover {
  background: rgba(var(--fg-rgb), 0.12);
  color: var(--text-primary);
}
#qrcodemodal .qr-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 25px 30px 30px;
}
#qrcodemodal .qr-app-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
#qrcodemodal .qr-app-icon {
  width: 70px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(var(--glow-rgb), 0.5));
}
#qrcodemodal .qr-app-text {
  min-width: 0;
}
#qrcodemodal .qr-app-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
}
#qrcodemodal .qr-app-sub {
  font-size: 12px;
  line-height: 1.4;
}
#qrcodemodal .qr-app-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid rgba(var(--fg-rgb), 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s,
    border-color 0.18s;
}
#qrcodemodal .qr-app-btn:hover {
  background: rgba(var(--fg-rgb), 0.08);
  border-color: rgba(var(--accent-soft-rgb), 0.6);
  color: var(--text-primary);
  text-decoration: none;
}
#qrcodemodal .qr-divider {
  height: 1px;
  background: rgba(var(--fg-rgb), 0.08);
  margin: 0 24px;
}
#qrcodemodal .qr-scan-wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 40px 26px;
  align-items: center;
}
#qrcodemodal .qr-scan-left {
  flex: 1;
  min-width: 0;
}
#qrcodemodal .qr-scan-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}
#qrcodemodal .qr-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#qrcodemodal .qr-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
  align-items: center;
}
#qrcodemodal .qr-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--accent-soft-rgb), 0.6);
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
#qrcodemodal .qr-qr-wrap {
  flex-shrink: 0;
}
#qrcodemodal .qr-qr-box {
  background: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(var(--shadow-rgb), 0.4);
}
#qrcodemodal .qr-qr-box img {
  width: 110px;
  height: 110px;
}

/* Download modal */
#downloadmodal .modal-dialog {
  max-width: 520px;
}
#downloadmodal .dl-modal-content {
  background: linear-gradient(155deg, var(--modal-bg-from) 0%, var(--modal-bg-to) 100%);
  border: 1px solid rgba(var(--accent-soft-rgb), 0.25);
  border-radius: 18px;
  padding: 30px 32px 32px;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(var(--shadow-rgb), 0.7),
    0 0 50px rgba(var(--glow-rgb), 0.18);
  position: relative;
}
#downloadmodal .dl-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--fg-rgb), 0.22);
  background: transparent;
  color: rgba(var(--fg-rgb), 0.65);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.17s,
    color 0.17s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}
#downloadmodal .dl-close-btn:hover {
  background: rgba(var(--fg-rgb), 0.12);
  color: var(--text-primary);
}
#downloadmodal .dl-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
#downloadmodal .dl-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
#downloadmodal .dl-head {
  margin-bottom: 18px;
}
#downloadmodal .dl-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
#downloadmodal .dl-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}
#downloadmodal .dl-badges {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#downloadmodal .dl-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}
#downloadmodal .dl-badge img {
  width: 170px;
  height: auto;
  display: block;
  border-radius: 8px;
}
#downloadmodal .dl-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 16px rgba(var(--glow-rgb), 0.45));
}
#downloadmodal .dl-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#downloadmodal .dl-icon {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(var(--glow-rgb), 0.55));
}

/* Language modal */
#languagemodal {
  z-index: 9999;
}
#languagemodal .modal-content {
  background: linear-gradient(145deg, var(--modal-bg-from), var(--modal-bg-to));
  border: 1px solid rgba(var(--accent-soft-rgb), 0.22);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 24px 70px rgba(var(--shadow-rgb), 0.6),
    0 0 40px rgba(var(--glow-rgb), 0.15);
  position: relative;
  overflow: visible;
}
.lang-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
}
.lang-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.lang-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--text-primary);
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s;
  line-height: 1;
  padding: 0;
}
.lang-modal-close:hover {
  background: rgba(var(--accent-soft-rgb), 0.3);
  color: var(--text-primary);
}
.lang-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}
.lang-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(var(--fg-rgb), 0.05);
  border: 1px solid rgba(var(--border-rgb), 0.1);
  border-radius: 10px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.18s,
    border-color 0.18s;
  text-align: left;
}
.lang-option-btn:hover {
  background: rgba(var(--accent-soft-rgb), 0.15);
  border-color: rgba(var(--accent-soft-rgb), 0.5);
}
.lang-option-btn.active {
  background: rgba(var(--accent-soft-rgb), 0.2);
  border-color: rgba(var(--accent-soft-rgb), 0.75);
  color: var(--text-primary);
}
.lang-op-btn-detail {
  max-width: 200px;
  margin: auto auto auto 40%;
}
.lang-flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.lang-modal-footer {
  padding: 4px 20px 20px;
}
.lang-ok-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(90deg, var(--btn-primary-from), var(--btn-primary-to));
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s;
  letter-spacing: 0.3px;
}
.lang-ok-btn:hover {
  opacity: 0.88;
}

/* Login modal */
#loginmodal {
  z-index: 1111;
}
#loginmodal .modal-dialog {
  max-width: 500px;
}
#loginmodal .modal-content {
  background: linear-gradient(145deg, var(--modal-bg-from), var(--modal-bg-to));
  border: 1px solid rgba(var(--accent-soft-rgb), 0.22);
  border-radius: 14px;
  padding: 32px 28px 40px;
  box-shadow:
    0 24px 70px rgba(var(--shadow-rgb), 0.6),
    0 0 40px rgba(var(--glow-rgb), 0.15);
  position: relative;
  overflow: visible;
}

/* Search modal */
  #searchmodal .modal-dialog {
    max-width: 640px;
  }
  .search-modal-content {
    background: transparent;
    /* border: 1px solid rgba(var(--accent-soft-rgb), 0.22); */
    /* padding: 5px 10px; */
    box-shadow:
    0 24px 70px rgba(var(--shadow-rgb), 0.6),
    0 0 40px rgba(var(--glow-rgb), 0.15);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .search-modal-row {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--accent-soft-rgb), 0.11);
    border: 1px solid rgba(var(--accent-soft-rgb), 0.22);
    padding: 5px 10px;
  }
  .sm-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .sm-search-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .sm-search-icon img {
    width: 50px;
    height: auto;
    object-fit: contain;
  }
  .sm-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 18px;
    width: 100%;
  }
  .sm-input::placeholder {
    color: rgba(var(--fg-rgb), 0.4);
  }
  .sm-search-btn {
    flex-shrink: 0;
    padding: 9px 22px;
    background: linear-gradient(135deg, var(--btn-login-from), var(--btn-login-to));
    border: none;
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.17s;
  }
  .sm-search-btn:hover {
    opacity: 0.88;
  }
  .sm-results {
    display: none;
    margin-top: 3px;
  }
  .sm-results.is-visible {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  .sm-result-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-soft-rgb), 0.6) rgba(var(--fg-rgb), 0.06);
  }
  .sm-result-list::-webkit-scrollbar {
    width: 8px;
  }
  .sm-result-list::-webkit-scrollbar-track {
    background: rgba(var(--fg-rgb), 0.05);
    border-radius: 4px;
  }
  .sm-result-list::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-soft-rgb), 0.6);
    border-radius: 4px;
  }
  .sm-result-list::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-soft-rgb), 0.85);
  }  
  .sm-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sm-result:hover {
    background: rgba(var(--accent-soft-rgb), 0.14);
  }
  .sm-result-thumb {
    width: 54px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
  }
  .sm-result-name {
    font-size: 15px;
    color: var(--text-primary);
  }
  .sm-empty {
    display: none;
    flex-shrink: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 28px 0;
  }
  .sm-more-btn {
    display: none;
    flex-shrink: 0;
    width: 100%;
    margin-top: 12px;
    padding: 6px 3px;
    background: rgba(var(--glow-rgb), 0.59);
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sm-more-btn:hover {
    background: rgba(var(--accent-soft-rgb), 0.18);
  }


/* Change Password modal */
.chpass-modal-content {
  background: linear-gradient(145deg, var(--modal-bg-from), var(--modal-bg-to));
  border: 1px solid rgba(var(--accent-soft-rgb), 0.22);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 24px 70px rgba(var(--shadow-rgb), 0.65),
    0 0 40px rgba(var(--glow-rgb), 0.15);
}
.chpass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
}
.chpass-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.2px;
}
.chpass-body {
  padding: 20px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chpass-fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chpass-label {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.chpass-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid rgba(var(--fg-rgb), 0.79);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s,
    background 0.18s;
}
.chpass-input:focus {
  border-color: rgba(var(--accent-soft-rgb), 0.7);
  background: rgba(var(--accent-soft-rgb), 0.08);
}
.chpass-err {
  font-size: 12px;
  color: var(--err-text);
  margin-top: -6px;
}
.chpass-footer {
  padding: 16px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chpass-btn-save {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, var(--btn-secondary-from), var(--btn-secondary-to));
  border: 1px solid rgba(var(--fg-rgb), 0.79);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s;
  letter-spacing: 0.3px;
}
.chpass-btn-save:hover {
  opacity: 0.88;
}
.chpass-btn-close {
  width: 100%;
  padding: 12px;
  background: rgba(var(--fg-rgb), 0.05);
  border: 1px solid rgba(var(--fg-rgb), 0.79);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s,
    color 0.18s;
  letter-spacing: 0.3px;
}
.chpass-btn-close:hover {
  border-color: rgba(var(--accent-soft-rgb), 0.65);
  background: rgba(var(--accent-soft-rgb), 0.1);
  color: var(--text-primary);
}

.modal-x {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--fg-rgb), 0.25);
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.17s;
}
.modal-x:hover {
  background: rgba(var(--fg-rgb), 0.18);
}

.modal-logo {
  text-align: center;
  margin-bottom: 26px;
}
.modal-logo img {
  height: var(--modal-logo-height);
}
.modal-logo .word {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 20px 0 8px;
}
.modal-logo .play {
  color: var(--text-primary);
}
.modal-logo .tech {
  color: var(--accent);
}
.modal-logo .sub {
  font-size: 7.5px;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.fg {
  margin-bottom: 14px;
}
.fg label {
  display: block;
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.fg input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(var(--fg-rgb), 0.07);
  border: 1px solid rgba(var(--fg-rgb), 0.79);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.17s,
    background 0.17s;
}
.fg input:focus {
  border-color: var(--accent-soft);
  background: rgba(var(--fg-rgb), 0.1);
}
.fg input::placeholder {
  color: rgba(var(--fg-rgb), 0.28);
}

.modal-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  font-size: 12px;
}
.chk-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 0px;
}
.forget-link {
  color: var(--accent-soft);
  cursor: pointer;
}
.forget-link:hover {
  text-decoration: underline;
}

.err-msg {
  font-size: 12px;
  color: var(--err-text);
  text-align: center;
  margin-bottom: 10px;
  display: none;
}

.btn-login {
  width: 100%;
  padding: 9px 12px;
  background: linear-gradient(135deg, var(--btn-login-from), var(--btn-login-to));
  border: 1px solid rgba(var(--fg-rgb), 0.79);
  border-radius: 9px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.17s,
    transform 0.17s;
  box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.4);
  margin-bottom: 15px;
}
.btn-login:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.btn-lang {
  width: 100%;
  padding: 10px;
  background: rgba(var(--fg-rgb), 0.05);
  border: 1px solid rgba(var(--fg-rgb), 0.79);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.17s;
}
.btn-lang img {
  width: 23px;
}
.btn-lang:hover {
  background: rgba(var(--fg-rgb), 0.1);
}

.banner-section {
  width: 100%;
  padding: 0 0 20px;
}
.banner-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  /* padding: 0 56px; */
  box-sizing: border-box;
}
.banner-viewport {
  width: 100%;
  overflow: hidden;
  /* padding: 18px 0; */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: height 480ms cubic-bezier(0.4, 0, 0.2, 1);
}
.banner-viewport.is-dragging {
  cursor: grabbing;
}
.banner-track {
  display: flex;
  will-change: transform;
  align-items: center;
  height: 100%;
}
/* All slides share the same base width (viewport / 3.5, set by
   syncSlideSizes() in banner.js). The centre 3 are fully visible; the
   1st & 5th peek (~25%) via the viewport's overflow:hidden.
   The ACTIVE (centre) slide is then scaled UP so it renders bigger
   than the other four. */
.banner-slide {
  padding: 0 6px;
  box-sizing: border-box;
  transform: scale(0.88);
  opacity: 0.85;
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
  position: relative;
  z-index: 1;
}
.banner-slide.banner-active {
  transform: scale(1.05);
  opacity: 1;
  z-index: 3;
}
.banner-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.banner-btn-prev,
.banner-btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: none;
  padding: 0 0 7px;
  background: rgba(var(--fg-rgb), 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 14px rgba(var(--shadow-rgb), 0.45);
  color: var(--text-primary);
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.banner-btn-prev:hover,
.banner-btn-next:hover {
  background: rgba(var(--fg-rgb), 0.3);
}
.banner-btn-prev:active,
.banner-btn-next:active {
  transform: translateY(-50%) scale(0.92);
}
.banner-btn-prev {
  left: 4px;
}
.banner-btn-next {
  right: 4px;
}
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(var(--fg-rgb), 0.3);
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.banner-dot.active {
  background: rgb(var(--fg-rgb));
  transform: scale(1.35);
}
/* .ticker-announcement-inner {
  padding: 0 18px;
} */
.ticker-bar {
  border: 1px solid var(--ticker-border);
  padding: 0 0 3px;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-loop 20s linear infinite;
}

@keyframes marquee-loop {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

.ticker-item {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.cat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  overflow-x: auto;
}
.cat-bar::-webkit-scrollbar {
  display: none;
}
.cat-tab {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 15px 4px 5px;
  background: var(--card-bg);
  border: 1px solid rgba(var(--border-rgb), 0.1);
  border-radius: 5px;
  font-size: 17px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.17s;
  white-space: nowrap;
}
.cat-tab.active {
  background: var(--tile-active-bg);
}
.cat-tab img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.cat-tab.on {
  background: linear-gradient(
    135deg,
    rgba(var(--glow-rgb), 0.28),
    rgba(var(--accent-rgb), 0.28)
  );
  border-color: var(--border-hi);
  color: var(--text-primary);
}
.cat-tab:hover:not(.on) {
  background: var(--card-hover);
  border-color: var(--border-hi);
}

.search-pill {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 7px;
  background: var(--search-bg);
  border-radius: 5px;
  transition: border-color 0.17s;
}
.search-pill:focus-within {
  border-color: var(--border-hi);
}
.search-pill .search-icon {
  height: 32px;
  width: auto;
}
.search-pill .search-icon img {
  width: 32px;
}
.search-pill input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  width: 130px;
}
.search-pill input::placeholder {
  color: rgba(var(--fg-rgb), 0.3);
}

.games-section {
  padding: 0 18px 32px;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 0;
  display: none;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.game-card {
  aspect-ratio: 1 / 1.05;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.game-card:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 10px 28px rgba(var(--glow-rgb), 0.45);
  z-index: 2;
}
.game-card.hidden {
  display: none;
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 20px;
}
.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(var(--fg-rgb), 0.08);
  border: 2px solid rgba(var(--accent-soft-rgb), 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  color: rgba(var(--fg-rgb), 0.55);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.meta-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.meta-row {
  display: flex;
  font-size: 18px;
  gap: 8px;
  align-items: baseline;
}
.meta-key {
  color: var(--text-muted);
  min-width: 92px;
}
.title-symbol:after {
    content: ' : ';
}
.meta-val {
  color: var(--text-primary);
  font-weight: 600;
}
.details-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.detail-item label {
  display: block;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.detail-item .dval {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 500;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--text-primary);
}
.btn-balance {
    background: var(--success-from);
    color: var(--text-primary);
    padding: 4px 8px;
    height: 29px;
}
.btn-balance img {
    filter: brightness(10);
    width: 20px;
}
.mobile-balance, .mobile-balance-refresh {
  display: none;
}


/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 101px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  justify-content: space-around;
}

.f-select {
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.f-select option {
  background: var(--page-bg-to);
}
.f-select:focus {
  border-color: var(--border-hi);
}

.f-label {
  font-size: 17px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.f-date {
  padding: 10px 13px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: border-color 0.17s;
}
.f-date:focus {
  border-color: var(--border-hi);
}
.f-date::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
}

.f-sep {
  color: var(--text-muted);
  font-size: 13px;
}

.btn-clear {
  padding: 10px 30px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 17px;
  cursor: pointer;
  transition: background 0.17s;
}
.btn-clear:hover {
  background: var(--card-hover);
}

.btn-search {
  padding: 10px 30px;
  background: linear-gradient(135deg, var(--btn-primary-from), var(--btn-primary-to));
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.17s;
  box-shadow: 0 3px 12px rgba(var(--glow-rgb), 0.4);
}
.btn-search:hover {
  opacity: 0.88;
}

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  position: relative;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(var(--shadow-rgb), 0.4);
}
.mobile-header .logo img {
  width: var(--mobile-logo-width);
}
.mobile-header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}
.mobile-header-menu {
  display: flex;
  align-items: center;
  gap: 3px;
}
.mobile-header-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}
.mobile-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  background-color: rgba(var(--accent-rgb), 0.5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mobile-login-btn img {
  width: 23px;
}

/* History */
body.history-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.history-page .page-wrap {
  flex: 1 0 auto;
}

.history-filter-mobile {
  display: none;
  gap: 6px;
  padding: 10px 12px;
  text-align: center;
}
.filter-bar-mobile {
  display: none;
  gap: 6px;
  padding: 10px 0;
}
.filter-bar-mobile button {
  width: 50%;
}
.filter-bar-mobile .f-select {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 9px 28px 9px 10px;
}
.filter-bar-mobile .btn-search {
  flex-shrink: 0;
  padding: 9px 18px;
  font-size: 13px;
  border-radius: 7px;
}
#providermodal .modal-dialog {
  max-width: 450px;
  margin: auto;
}
#providermodal .modal-content {
  background: var(--modal-bg-from);
  border: 1px solid rgba(var(--accent-soft-rgb), 0.56);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(var(--shadow-rgb), 0.6);
}
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 18px 12px;
  gap: 6px;
}
.history-date {
  display: flex;
  align-items: center;
  gap: 9px;
}
.history-date input {
  width: 100%;
}

/* Table */
.inner-page .history-tbl-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  overflow-x: auto;
}

.inner-page table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.inner-page thead th {
  padding: 13px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.inner-page thead th:hover {
  color: var(--text-primary);
}

.inner-page .sort-icon {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.5;
}
.inner-page thead th.sorted-asc .sort-icon,
.inner-page thead th.sorted-desc .sort-icon {
  opacity: 1;
  color: var(--accent-soft);
}
.inner-page tbody tr {
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.04);
  transition: background 0.15s;
}
.inner-page tbody tr:last-child {
  border-bottom: none;
}
.inner-page tbody tr:nth-child(odd) {
  background: var(--table-row-alt);
}
.inner-page tbody tr:hover td {
  background: rgba(var(--glow-rgb), 0.1);
}
.inner-page tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-light);
}
.inner-page .view-link {
  color: var(--accent-soft);
  font-size: 12px;
  cursor: pointer;
}
.inner-page .view-link:hover {
  text-decoration: underline;
}

/* Pagination */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(var(--fg-rgb), 0.12);
  background: rgba(var(--fg-rgb), 0.05);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.17s,
    border-color 0.17s,
    color 0.17s;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1;
  padding: 0;
}
.pg-btn:hover:not(:disabled):not(.pg-active) {
  background: rgba(var(--glow-rgb), 0.22);
  border-color: rgba(var(--accent-soft-rgb), 0.5);
  color: var(--text-primary);
}
.pg-btn.pg-active {
  background: linear-gradient(135deg, var(--btn-primary-from), var(--btn-primary-to));
  border-color: transparent;
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(var(--glow-rgb), 0.45);
  cursor: default;
}
.pg-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.pg-btn.pg-arrow {
  font-size: 16px;
}

/* ── Modal header ── */
.prov-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.07);
}

.prov-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.prov-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--fg-rgb), 0.25);
  background: transparent;
  color: rgba(var(--fg-rgb), 0.7);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.17s,
    color 0.17s;
  line-height: 1;
  padding: 0;
}
.prov-modal-close:hover {
  background: rgba(var(--fg-rgb), 0.12);
  color: var(--text-primary);
}

.prov-all-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 10px;
  padding: 11px 0;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid rgba(var(--fg-rgb), 0.14);
  border-radius: 10px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.17s,
    border-color 0.17s;
}
.prov-all-btn:hover,
.prov-all-btn.active {
  background: linear-gradient(
    135deg,
    rgba(var(--glow-rgb), 0.35),
    rgba(var(--accent-rgb), 0.35)
  );
  border-color: rgba(var(--accent-soft-rgb), 0.55);
  color: var(--text-primary);
}

/* ── Provider grid ── */
.prov-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 4px 16px 16px;
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-soft-rgb), 0.3) transparent;
}
.prov-grid::-webkit-scrollbar {
  width: 4px;
}
.prov-grid::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-soft-rgb), 0.35);
  border-radius: 4px;
}
.prov-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid rgba(var(--fg-rgb), 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.17s,
    border-color 0.17s,
    transform 0.15s;
  padding: 6px 8px;
}
.prov-pill:hover {
  background: rgba(var(--fg-rgb), 0.12);
  border-color: rgba(var(--accent-soft-rgb), 0.4);
}
.prov-pill.selected {
  background: linear-gradient(135deg, var(--btn-primary-from), var(--btn-primary-to));
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.4);
  transform: scale(1.03);
}
.prov-pill img {
  max-width: 100%;
  max-height: 28px;
  object-fit: contain;
  filter: brightness(0.75) grayscale(0.15);
  transition: filter 0.17s;
}
.prov-pill:hover img,
.prov-pill.selected img {
  filter: brightness(1) grayscale(0);
}
.prov-modal-footer {
  padding: 0 16px 18px;
}
.prov-ok-btn {
  width: 100%;
  padding: 13px 0;
  background: linear-gradient(90deg, var(--btn-secondary-from), var(--btn-secondary-to));
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.17s,
    transform 0.17s;
  box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.4);
  letter-spacing: 0.5px;
}
.prov-ok-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.prov-ok-btn:active {
  transform: translateY(0);
}

/* Profile */
body.profile-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.profile-page .page-wrap {
  flex: 1 0 auto;
}

.btn-logout-mobile {
  display: none;
}
.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--success-from), var(--success-to));
  border: none;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.17s;
  vertical-align: middle;
  margin-left: 6px;
}
.btn-refresh:hover {
  opacity: 0.85;
}
.btn-refresh img {
  width: 13px;
}
.profile-change-pass {
  background: rgba(var(--fg-rgb), 0.1);
  border: 1px solid rgba(var(--border-rgb), 0.29);
  padding: 8px 0;
  text-align: center;
  border-radius: 3px;
  margin: 0 18px 35px;
  max-width: 1404px;
}
.mobile-profile-logout {
  background: var(--logout-bg);
  padding: 8px 0;
  margin: 0 1px;
  text-align: center;
  border-radius: 3px;
  display: none;
}
.change-pass-btn {
  background: transparent;
  border: 0px;
  color: var(--text-primary);
  width: 100%;
}
.mobile-logout-btn {
  background: transparent;
  border: 0px;
  color: var(--text-primary);
  width: 100%;
}
.mobile-logout-btn img {
  width: 22px;
  filter: brightness(0) invert(1);
}

/* Mobile Nav Menubar */
.mobile-bottom-nav {
  display: none;
}

/* Bank to Top */
#backToTop {
  position: fixed;
  right: 18px;
  bottom: 120px;
  z-index: 290;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid rgba(var(--accent-soft-rgb), 0.45);
  background: linear-gradient(135deg, var(--btn-primary-from), var(--btn-primary-to));
  box-shadow: 0 4px 18px rgba(var(--glow-rgb), 0.55);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#backToTop:hover {
  background: linear-gradient(135deg, var(--btn-primary-to), var(--btn-primary-from));
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.65);
}
#backToTop:active {
  transform: translateY(2px);
}

/* Announcement */
#announcementmodal {
  z-index: 9998;
}
#announcementmodal .modal-dialog {
  max-width: 500px;
}
#announcementmodal .modal-content {
  background: linear-gradient(160deg, var(--modal-bg-from) 0%, var(--modal-bg-to) 100%);
  border: 1px solid rgba(var(--accent-soft-rgb), 0.22);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(var(--shadow-rgb), 0.75),
    0 0 50px rgba(var(--glow-rgb), 0.18);
}
.ann-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgb(var(--shadow-rgb));
}
.ann-slides {
  display: flex;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.ann-slide {
  flex-shrink: 0;
  width: 100%;
}
.ann-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.ann-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--fg-rgb), 0.45);
  background: rgba(var(--page-bg-rgb), 0.72);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.18s;
  padding: 0;
  line-height: 1;
}
.ann-close:hover {
  background: rgba(var(--glow-rgb), 0.7);
}
.ann-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--shadow-rgb), 0.45);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  padding: 0 0 2px;
  line-height: 1;
  transition: background 0.18s;
}
.ann-arrow:hover {
  background: rgba(var(--glow-rgb), 0.65);
}
.ann-arrow-prev {
  left: 10px;
}
.ann-arrow-next {
  right: 10px;
}
.ann-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.ann-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(var(--fg-rgb), 0.4);
  cursor: pointer;
  border: none;
  padding: 0;
  transition:
    background 0.2s,
    transform 0.2s;
}
.ann-dot.active {
  background: rgb(var(--fg-rgb));
  transform: scale(1.25);
}
.ann-body {
  padding: 20px 22px 0;
}
.ann-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: center;
}
.ann-text {
  font-size: 13px;
  color: rgba(var(--text-secondary-rgb), 0.85);
  line-height: 1.6;
  margin-bottom: 0;
}
.ann-not-show-again {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: fit-content;
  margin: 16px auto;
}
.ann-noshow-chk {
  width: 16px;
  height: 16px;
  accent-color: var(--btn-primary-from);
  flex-shrink: 0;
  cursor: pointer;
}
.ann-noshow-label {
  font-size: 12px;
  color: rgba(var(--text-secondary-rgb), 0.7);
  cursor: pointer;
  margin: 0;
}
.ann-footer {
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
}
.ann-ok-btn {
  display: block;
  width: 100%;
  padding: 15px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: background 0.18s;
}
.ann-ok-btn:hover {
  background: rgba(var(--glow-rgb), 0.18);
}
.ann-ok-btn:active {
  background: rgba(var(--glow-rgb), 0.32);
}

/* Product List */
.mob-product-searchbar, .mob-copyright {
  display: none;
}
.pw-container {
  max-width: 96%;
  margin: 0 auto;
  padding: 0 18px;
}
.pw-providers {
  padding: 10px 0 8px;
  margin-bottom: 6px;
}
.pw-providers-inner {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  overflow: hidden;
  padding-bottom: 2px;
}
.pw-providers-inner .provider-pill {
  height: 80px;
  min-width: 60px;
  flex: 0 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.17s;
  position: relative;
  padding: 10px;
}
.pw-providers-inner .provider-pill img {
  width: 100%;
  height: 45px;
  object-fit: contain;
  filter: brightness(0.75) grayscale(0.2);
  transition: filter 0.17s;
}
.pw-providers-inner .provider-pill:hover img,
.pw-providers-inner .provider-pill.active img {
  filter: brightness(1) grayscale(0);
}
.pw-providers-inner .provider-pill:hover,
.pw-providers-inner .provider-pill.active {
  background: var(--tile-active-bg);
  border-color: var(--border-hi);
}
.pw-providers-inner .provider-pill .provider-maintenance-logo {
  position: absolute;
  background: var(--popup-backdrop);
  width: 100%;
  height: 100%;
  z-index: 9;
}
.pw-providers-inner .provider-pill .provider-maintenance-logo img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 50px;
}
.pw-body {
  display: flex;
  gap: 0;
  align-items: flex-start;
}
.mob-product-searchbar {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  border: 1px solid rgba(var(--border-rgb), 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 10px;
  cursor: pointer;
  box-sizing: border-box;
}
.mob-product-searchbar .pw-cat-icon { 
  width: 24px; 
  height: 24px; 
  object-fit: contain; 
}
.mob-product-searchbar .pw-cat-label { 
  color: var(--text-muted); 
}
.pw-cats {
  width: 130px;
  flex-shrink: 0;
  padding: 8px 0;
}
.pw-search-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-primary);
  /* background: rgba(var(--border-rgb), 0.69); */
  border: 1px solid rgba(var(--border-rgb), 0.3);
  border-radius: 8px;
  padding: 6px 8px;
  margin: 0 0 10px;
  cursor: pointer;
}
.pw-search-icon {
  width: 40px;
  height: auto;
  opacity: 0.7;
  flex-shrink: 0;
}
.pw-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  width: 100%;
}
.pw-search-input::placeholder {
  color: var(--text-primary);
}
.pw-cat-item {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 9px 8px;
  margin: 0 0 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  border: 1px solid rgba(var(--border-rgb), 0.3);
  border-radius: 8px;
  position: relative;
}
.pw-cat-item:hover {
  background: rgba(var(--glow-rgb), 0.14);
  color: var(--text-primary);
}
.pw-cat-item.active {
  background: var(--tile-active-bg);
  border-left-color: var(--tile-active-border);
  color: var(--text-primary);
}
.pw-cat-icon {
  width: 30px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  z-index: 2;
}
.pw-cat-label {
  z-index: 2;
}
.pw-games {
  flex: 1;
  min-width: 0;
  padding: 8px 0 8px 10px;
}
.pw-games-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.pw-game-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.pw-game-card:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 10px 28px rgba(var(--glow-rgb), 0.45);
  z-index: 2;
}
.pw-game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}
.gc-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1.4;
  z-index: 2;
  text-transform: uppercase;
}
.gc-badge img {
  width: 60px;
  height: auto;
}

@media (min-width: 769px) {
  .pw-body {
    --kx-list-h: clamp(650px, calc(100vh - 400px), 700px);
    align-items: stretch;
  }
  .pw-cats {
    height: var(--kx-list-h);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .pw-cats::-webkit-scrollbar { 
    width: 1px; 
  }
  .pw-cats::-webkit-scrollbar-thumb {
    background: rgba(var(--fg-rgb), 0.22);
    border-radius: 2px;
  }
  .pw-cats::-webkit-scrollbar-track { 
    background: transparent; 
  }
  .pw-cats::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
  .pw-games {
    height: var(--kx-list-h);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .pw-games::-webkit-scrollbar { 
    width: 1px; 
  }
  .pw-games::-webkit-scrollbar-thumb {
    background: rgba(var(--fg-rgb), 0.22);
    border-radius: 2px;  
  }
  .pw-games::-webkit-scrollbar-track {
    background: transparent;
  }
  .pw-games::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
}

@media (max-width: 1024px) {
  .ticker-announcement-inner {
    padding: 0 18px;
  }

  .container {
    padding: 0;
  }

  /* 404 */
  .error-icon {
    width: 180px;
  }
  .error-title {
    font-size: 22px;
  }
  .error-text {
    font-size: 13px;
  }

  .profile-change-pass {
    margin-bottom: 12px;
    margin-left: 18px;
    margin-right: 18px;
  }
  .mobile-profile-logout {
    display: block;
    margin-left: 18px;
    margin-right: 18px;
    margin-bottom: 80px;
  }

  .meta-balance-detail {
    display: flex;
    vertical-align: middle;
    align-items: center;
    gap: 8px;
  }
  .mobile-balance, .mobile-balance-refresh {
    display: flex;
  }
}

@media (min-width: 1441px) {
  .profile-change-pass {
    max-width: 1404px;
    width: 100%;
    margin: auto;
  }
}

@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    background-image: var(--page-bg-image-mobile);
    background-position: top left;
    background-repeat: no-repeat;
    background-size: cover;
  }

  footer {
    display: none;
  }

  .index-page-wrap {
    margin-bottom: 20px !important;
  }

  .nav-user-info {
    display: none;
  }

  .btn {
    padding: 4px 7px;
    font-size: 12px;
  }

  .mobile-header .logo img {
    width: var(--mobile-logo-width-sm);
  }

  .banner-wrapper {
    padding: 0;
    margin: 0 0 16px;
  }
  .banner-btn-prev,
  .banner-btn-next {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .banner-btn-prev {
    left: 2px;
  }
  .banner-btn-next {
    right: 2px;
  }
  .filter-bar {
    gap: 8px;
  }
  .f-date,
  .f-select {
    font-size: 12px;
  }

  .mobile-header {
    display: flex;
  }
  .mobile-header-menu img {
    width: 23px;
  }
  header {
    display: none;
  }
  .btn-language img {
    width: 23px;
  }

  .banner-section {
    padding: 0;
  }
  .banner-section .container {
    max-width: 100%;
    margin: 0;
  }
  #bannerPrev, #bannerNext {
    display: none;
  }
  .banner-wrapper {
    padding: 0;
  }
  .banner-viewport {
    padding: 0;
  }
  .banner-dots {
    margin: 8px 0 12px;
  }
  .banner-slide,
  .banner-slide.banner-active {
    transform: scale(1) !important;
    opacity: 1 !important;
    padding: 0;
  }
  .banner-slide img {
    border-radius: 0;
  }

  /* .ticker-announcement-bar {
    margin-bottom: 10px;
  } */
  .ticker-announcement-inner {
    padding: 0;
  }

  .modal {
    width: 100%;
  }
  .modal-open .modal {
    padding: 32px 10px 28px 10px !important;
  }
  .modal-x {
    top: 10px;
    right: 10px;
  }

  .modal-logo .word img {
    width: var(--mobile-logo-width-sm);
  }

  #qrcodemodal .modal-dialog {
    max-width: 96%;
    margin: 0 auto;
  }
  .qr-app-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  .qr-app-btn {
    width: 100%;
    justify-content: center;
  }
  .qr-scan-wrap {
    flex-direction: column-reverse;
    align-items: center;
  }
  .qr-qr-box {
    width: 90px;
    height: 90px;
  }

  #downloadmodal .modal-dialog {
    max-width: 96%;
    margin: 0 auto;
  }
  #downloadmodal .dl-modal-content {
    padding: 30px 22px 26px;
  }
  #downloadmodal .dl-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }
  #downloadmodal .dl-icon-wrap {
    order: -1;
  }
  #downloadmodal .dl-icon {
    width: 96px;
  }
  #downloadmodal .dl-main {
    align-items: center;
    width: 100%;
  }
  #downloadmodal .dl-head {
    margin-bottom: 22px;
  }
  #downloadmodal .dl-title {
    font-size: 19px;
  }
  #downloadmodal .dl-sub {
    font-size: 14px;
    margin: 0 auto;
  }
  #downloadmodal .dl-badges {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }
  #downloadmodal .dl-badge {
    flex: 1 1 0;
    max-width: 160px;
  }
  #downloadmodal .dl-badge img {
    width: 100%;
  }

  #searchmodal .modal-dialog {
    max-width: 100%;
  }
  .sm-search-btn {
    padding: 4px 10px;
    font-weight: 500;
  }
  .sm-result-thumb {
    width: 50px;
    height: auto;
  }
  .sm-search-icon img {
    width: 30px;
  }

  /* History */
  .history-filter-mobile {
    display: block;
  }
  .filter-bar-mobile {
    display: flex;
  }
  .filter-bar {
    display: none;
  }
  .inner-page {
    padding: 0 12px 32px;
    max-width: 100% !important;
  }
  .history-tbl-wrap {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .history-tbl-wrap table {
    min-width: 580px;
  }
  .history-tbl-wrap thead th {
    padding: 9px 8px;
    font-size: 11px;
  }
  .history-tbl-wrap tbody td {
    padding: 9px 8px;
    font-size: 11px;
  }
  .history-tbl-wrap tbody tr {
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.05);
  }
  .history-tbl-wrap .view-link {
    font-size: 11px;
    white-space: nowrap;
  }
  .history-tbl-wrap .sort-icon {
    display: none;
  }

  /* Profile */
  .card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 18px 16px;
    border: 1px solid rgba(var(--fg-rgb), 0.15);
    border-radius: 18px;
    margin: 30px 3px 0px 3px;
  }
  .card-title {
    display: none;
  }
  .avatar {
    width: 60px;
    height: 60px;
    font-size: 24px;
    flex-shrink: 0;
  }
  .meta-row {
    font-size: 13px;
    gap: 4px;
  }
  .meta-key {
    min-width: 76px;
    font-size: 12px;
  }
  .meta-val {
    font-size: 13px;
  }
  .card:last-of-type {
    background: transparent;
    border: none;
    padding: 0;
  }
  .card:last-of-type .card-title {
    display: block;
    font-size: 24px;
    font-weight: 600;
    padding: 0 16px 10px;
    margin-bottom: 0;
  }
  .details-list {
    gap: 0;
    gap: 0;
    border: 1px solid rgba(var(--fg-rgb), 0.15);
    border-radius: 18px;
    margin: 0 3px;
  }
  .detail-item {
    padding: 5px 16px;
  }
  .detail-item label {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 3px;
  }
  .detail-item .dval {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
  }
  .btn-logout-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, var(--danger-from), var(--danger-to));
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(var(--danger-rgb), 0.45);
    letter-spacing: 0.3px;
  }
  .btn-logout-mobile svg {
    width: 20px;
    height: 20px;
  }

  /* Mobile Nav Menubar */
  .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: var(--nav-bg);
    border-top: 1px solid rgba(var(--accent-soft-rgb), 0.22);
    z-index: 300;
    box-shadow: var(--nav-shadow);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mob-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 4px 9px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--nav-inactive);
    letter-spacing: 0.2px;
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    position: relative;
  }
  .mob-nav-tab:hover {
    color: rgba(var(--text-secondary-rgb), 0.85);
    text-decoration: none;
  }
  .mob-nav-tab.active {
    color: var(--nav-active);
  }
  .mob-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mob-nav-icon img {
    width: 25px;
    height: auto;
    object-fit: contain;
    transition: filter 0.18s ease;
    margin: 4px;
  }
  .mob-nav-tab.active .mob-nav-icon img {
    filter: brightness(1) saturate(1);
  }
  .mob-nav-tab:hover .mob-nav-icon img {
    filter: brightness(0.8) saturate(0.8);
  }
  .mob-nav-label {
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  /* Bank to Top */
  #backToTop {
    bottom: calc(64px + 12px);
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    font-weight: bold;
  }

  /* Product List */
  .pw-body {
    display: contents;
  }
  .mob-product-searchbar {
    grid-area: search;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px auto 2px;
    padding: 0px;
    border-radius: 5px;
    border: 1px solid var(--search-border);
    cursor: pointer;
    box-sizing: border-box;
  }
  .mob-product-searchbar .pw-cat-icon {
    width: 27px;
    height: 27px;
    margin: 5px 0 5px 5px;
  }
  .mob-product-searchbar .pw-cat-label {
    text-align: left;
    color: var(--text-muted);
  }
  .pw-container {
    margin-bottom: 15px;
    padding: 0;
    display: grid;
    grid-template-columns: 16% 1fr;
    --kx-list-h: max(300px, calc(100vh - 400px));
    grid-template-rows: auto auto var(--kx-list-h);
    grid-template-areas:
      "cats  cats"
      "search search"
      "prvdr games";
  }
  .pw-providers {
    grid-area: prvdr;
    border-bottom: none;
    margin: 6px 0 0;
    padding: 0 0 6px;
    height: var(--kx-list-h);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
  }
  .pw-providers::-webkit-scrollbar {
    display: none;
  }
  .pw-providers-inner {
    display: block;
    flex-direction: column;
    gap: 4px;
    padding: 0 4px 0 0;
  }
  .pw-providers-inner .provider-pill {
    width: 100%;
    height: 60px;
    min-width: unset;
    margin: 0 0 5px;
    border-radius: 5px;
    padding: 0px;
  }
  .pw-providers-inner .provider-pill-inner {
    padding: 3px 0px;
  }
  .pw-providers-inner .provider-pill img {
    max-width: 100%;
    height: auto;
    padding: 0 5px;
  }
  .pw-cats {
    grid-area: cats;
    width: 100%;
    border-right: none;
    padding: 0;
    margin-bottom: 3px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    align-items: end;
  }
  .pw-cats::-webkit-scrollbar {
    display: none;
  }
  .pw-search-wrap {
    display: grid;
    order: 99;
    flex-shrink: 0;
    margin: 0;
    overflow: hidden;
    padding: 0 4px 2px;
    position: sticky;
    right: -1px;
    z-index: 2;
    background: linear-gradient(90deg, var(--page-bg-from) 20%, var(--page-bg-to) 100%);
    box-shadow: -8px 0 12px -6px rgba(var(--page-bg-rgb), 0.55);
    align-items: center;
    justify-items: center;
    gap: 0px;
    width: 79px;
    height: 63px;
    display: none;
  }
  .pw-search-input {
    width: 70px;
    transition: width 0.25s ease;   /* NEW: smooth expand */
  }
  .pw-search-input:focus,
  .pw-search-input:not(:placeholder-shown) {
    width: 180px;
  }
  .pw-cat-item {
    --cats-visible: 4.5;
    flex-direction: column;
    gap: 2px;
    padding: 0px;
    border-left: none;
    border: none;
    flex-shrink: 0;
    font-size: 9.5px;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    height: 75px;
    margin-bottom: 0px;
    position: relative;
    z-index: 1;
    flex: 0 0 calc((100% - (var(--cats-visible) - 0.5) * 6px) / var(--cats-visible));
    min-width: 0;
  }
  .pw-cat-item:before {
    content: '';
    display: block;
    width: 100%;
    height: 49px;
    left: 0;
    bottom: 0px;
    position: absolute;
    border: 1px solid rgba(var(--border-rgb), 0.3);
    border-radius: 8px;
  }
  .pw-cat-item.active:before {
      background: var(--tile-active-bg);
      border-left-color: var(--tile-active-border);
      color: var(--text-primary);
      z-index: 1;
  }
  .pw-cat-item.active {
    background: transparent;
  }
  .pw-cat-item:hover {
    background: transparent;
  }
  .pw-cat-icon {
    width: 30px;
    height: 35px;
  }
  .pw-cat-label {
    width: 90%;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }
  .pw-games {
    grid-area: games;
    padding: 0 0 20px 5px;
    margin-top: 6px;
    height: var(--kx-list-h);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    scrollbar-width: none;
  }
  .pw-games::-webkit-scrollbar {
    display: none;
  }
  .pw-games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .pw-game-card:hover {
    transform: none;
    box-shadow: none;
  }
  .gc-badge {
    top: 3px;
    left: 3px;
  }
  .gc-badge img {
    width: 30px;
  }

  .pw-search-wrap .pw-cat-label {
      font-size: 12px;
  }
  .mob-copyright {
    display: block;
    margin-bottom: 55px;
    text-align: center;
    color: var(--text-copyright);
    font-size: 11px;
    background: var(--copyright-bg);
    padding: 5px 0;
  }
  .mob-copyright p { 
    margin: 0; 
  }

  body.profile-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .profile-page .page-wrap {
    flex: 1 0 auto;
    margin-bottom: 0;
  }

  .profile-page .mob-copyright {
    flex: 0 0 auto;
    text-align: center;
    margin: 0 0 calc(55px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 600px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .lang-op-btn-detail {
    margin: auto auto auto 36%;
  }

  /* .profile-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  } */

  .pw-container {
    grid-template-columns: 20% 1fr;
  }

  .pw-providers-inner .provider-pill {
    height: 44px;
  }
}

@media (max-width: 321px) {
  .lang-op-btn-detail {
    margin: auto auto auto 30%;
  }

  .pw-cat-item {
    --cats-visible: 3.5;
  }
}


.inner-page thead th.sorting:after {

content: " ⇅";
font-size: 0.9em;
margin-left: 4px;

}

.inner-page thead th[aria-sort="descending"]:after {
    content: " ↑" !important;
}

/* 3. Active Ascending State (Overrides default) */
.inner-page thead th[aria-sort="ascending"]:after {
    content: " ↓" !important;
	margin-left: 2px !important;
}

.table-container {
	overflow-x:auto;
}

.table-container::-webkit-scrollbar {
    display: none;
  }

.popup-message .modal-content {
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    text-align: center;
    height: 260px;
    background: linear-gradient(155deg, var(--modal-bg-from) 0%, var(--modal-bg-to) 100%);
    border: 1px solid rgba(var(--accent-soft-rgb), 0.25);
    box-shadow: 0 28px 80px rgba(var(--shadow-rgb), 0.7), 0 0 50px rgba(var(--glow-rgb), 0.18);
}