/* QQSTAR MY Portal — main.css v1.1 */

:root {
  --gold-light: #fce68e;
  --gold-mid: #e8c547;
  --gold-base: #d4aa3e;
  --gold-dark: #a67c28;
  --bg-deep: #120e0a;
  --bg-panel: rgba(18, 14, 10, 0.62);
  --bg-elevated: rgba(28, 22, 14, 0.72);
  --bg-hover: rgba(40, 32, 18, 0.82);
  --text: #fff6df;
  --text-muted: #d4c49a;
  --text-dim: #a89468;
  --border: rgba(232, 197, 71, 0.32);
  --border-strong: rgba(252, 230, 142, 0.5);
  --border-subtle: rgba(252, 230, 142, 0.12);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
  --shadow-panel: 0 1px 0 rgba(252, 230, 142, 0.08) inset, 0 4px 22px rgba(0, 0, 0, 0.35);
  --glass-blur: blur(10px);
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;
  --font-display: 'Oswald', 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --header-h: 60px;
  --marquee-h: 32px;
  --dock-h: 56px;
  --sidebar-w: 210px;
  --right-w: 220px;
  --shell-max: 1280px;
  --ease: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.qsm-portal {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: #1a1208;
  background-image: none;
  min-height: 100vh;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background layer — full brightness, no dark veil */
body.qsm-portal::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #1a1208;
  background-image: url("../img/qqstar-main-bg.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  filter: brightness(1.55) contrast(1.08) saturate(1.15);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-mid); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold-light); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75em;
  letter-spacing: 0.025em;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
button, input { font-family: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 9999;
  background: var(--gold-base); color: var(--bg-deep); padding: 0.5rem 1rem;
  border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.qsm-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 14px;
}

/* ── HEADER ── */
.qsm-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, rgba(22, 16, 10, 0.78) 0%, rgba(14, 10, 6, 0.68) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.qsm-header__bar { height: var(--header-h); }

.qsm-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}

.qsm-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: opacity var(--ease);
}
.qsm-logo:hover { opacity: 0.88; }
.qsm-logo img { height: 38px; width: auto; }

.qsm-login {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.qsm-login__fields {
  display: flex;
  gap: 6px;
}

.qsm-login__field {
  display: block;
  margin: 0;
}

.qsm-login__input {
  width: 124px;
  padding: 6px 10px 6px 11px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.qsm-login__input:hover {
  border-color: rgba(212, 170, 62, 0.32);
  background: #0d0d0d;
}
.qsm-login__input:focus {
  border-color: var(--gold-base);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(212, 170, 62, 0.15);
}
.qsm-login__input::placeholder { color: var(--text-dim); font-weight: 400; }

.qsm-login__actions { display: flex; gap: 5px; }

.qsm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.qsm-btn:hover { transform: translateY(-1px); }
.qsm-btn:active { transform: translateY(0); }

.qsm-btn--gold {
  background: linear-gradient(160deg, var(--gold-light) 0%, var(--gold-mid) 35%, var(--gold-base) 70%, var(--gold-dark) 100%);
  color: var(--bg-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(212, 170, 62, 0.3);
}
.qsm-btn--gold:hover {
  color: var(--bg-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 4px 14px rgba(232, 197, 71, 0.38);
}

.qsm-btn--outline {
  background: rgba(212, 170, 62, 0.04);
  color: var(--gold-mid);
  border: 1px solid rgba(212, 170, 62, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.qsm-btn--outline:hover {
  background: rgba(212, 170, 62, 0.1);
  border-color: var(--gold-mid);
  color: var(--gold-light);
}

.qsm-btn--dark {
  background: rgba(10, 10, 10, 0.75);
  color: var(--gold-light);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.qsm-btn--dark:hover {
  background: rgba(22, 22, 22, 0.9);
  border-color: var(--gold-mid);
  color: var(--gold-light);
}

.qsm-btn--block { display: flex; width: 100%; }
.qsm-btn--sm { padding: 5px 11px; font-size: 10.5px; letter-spacing: 0.06em; }
.qsm-btn--lg { padding: 11px 26px; font-size: 14px; }

.qsm-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 7px;
  transition: background var(--ease), border-color var(--ease);
}
.qsm-nav-toggle:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.qsm-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-mid);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* ── MARQUEE (shell-width, same as banner) ── */
.qsm-marquee-bar {
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
}

.qsm-marquee {
  display: flex;
  align-items: center;
  height: var(--marquee-h);
  background: linear-gradient(90deg, rgba(28, 22, 14, 0.78) 0%, rgba(20, 15, 9, 0.7) 50%, rgba(28, 22, 14, 0.78) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.qsm-marquee__label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-mid);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  height: 100%;
}

.qsm-marquee__track {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.qsm-marquee__content {
  display: flex;
  gap: 4rem;
  white-space: nowrap;
  animation: qsm-marquee-scroll 32s linear infinite;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.qsm-marquee__content span { flex-shrink: 0; }

@keyframes qsm-marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── 3-COLUMN PORTAL (left | center | right) ── */
.qsm-main { padding: 18px 0 36px; }

.qsm-portal__grid {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-w);
  gap: 14px;
  align-items: start;
}

/* ── SIDEBARS ── */
.qsm-sidebar {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}

.qsm-side-label {
  padding: 10px 12px 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.qsm-side-nav__list {
  list-style: none;
  margin: 0;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qsm-side-nav--pills .qsm-side-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(8, 6, 4, 0.72);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}
.qsm-side-nav--pills .qsm-side-nav__link:hover {
  background: rgba(40, 30, 14, 0.9);
  border-color: var(--gold-light);
  color: #fff;
  transform: translateX(2px);
}
.qsm-side-nav--pills .qsm-side-nav__link.is-active {
  background: linear-gradient(160deg, rgba(252, 230, 142, 0.22), rgba(166, 124, 40, 0.28));
  border-color: var(--gold-light);
  color: var(--gold-light);
}
.qsm-side-nav--pills .qsm-side-nav__link.is-active .qsm-side-nav__icon {
  opacity: 1;
}

.qsm-side-nav__icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-mid));
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--ease);
}

.qsm-info-box {
  border-top: 1px solid var(--border);
  padding: 0 0 12px;
}
.qsm-info-box p {
  margin: 0;
  padding: 10px 12px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.qsm-info-box .qsm-btn { margin: 0 12px; width: calc(100% - 24px); }

/* Right rail */
.qsm-sidebar--right { position: sticky; top: calc(var(--header-h) + var(--marquee-h) + 12px); }
.qsm-right-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.qsm-right-btn { letter-spacing: 0.04em; }
.qsm-right-status {
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-mid);
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(8, 6, 4, 0.55);
}
.qsm-right-promo {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(8, 6, 4, 0.6);
}
.qsm-right-promo--soft { background: rgba(28, 22, 14, 0.55); }
.qsm-right-promo__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.qsm-right-promo__text {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}
.qsm-right-cs {
  margin-top: 4px;
  padding-top: 12px;
  padding-bottom: 12px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}
.qsm-vip__list--right { margin: 4px 0 0; padding: 0; list-style: none; }
.qsm-vip__list--right li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12.5px;
}
.qsm-vip__list--right li:last-child a { border-bottom: none; }
.qsm-vip__list--right li a:hover { color: var(--gold-light); }
.qsm-vip__list--right .qsm-vip__icon {
  flex-shrink: 0;
  min-width: 28px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bg-deep);
  background: linear-gradient(160deg, var(--gold-light), var(--gold-base));
  border-radius: 4px;
  padding: 3px 4px;
}

.qsm-pengaduan {
  display: none;
  margin-left: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-mid);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}
.qsm-pengaduan:hover { color: var(--gold-light); border-color: var(--border-strong); }
@media (min-width: 1101px) {
  .qsm-pengaduan { display: inline-flex; align-items: center; }
}

.qsm-side-cta {
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
}

.qsm-side-clock {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
}
.qsm-side-clock__label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.qsm-clock {
  font-family: var(--font-display);
  font-size: 11.5px;
  color: var(--gold-mid);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.qsm-sidebar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-mid);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #131313 100%);
  border-bottom: 1px solid var(--border);
}

/* ── HERO BANNERS (full image, no crop) ── */
.qsm-hero {
  position: relative;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: #050505;
}

.qsm-hero__slides { position: relative; }

.qsm-hero__slide {
  display: none;
  animation: qsm-fade-in 0.45s ease;
}
.qsm-hero__slide.is-active { display: block; }

.qsm-banner {
  display: block;
  width: 100%;
  background: #050505;
  line-height: 0;
}
.qsm-banner__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
}

@keyframes qsm-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.qsm-gold-panel {
  padding: 0;
  min-height: 210px;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

/* Layered gold gradient backgrounds */
.qsm-gold-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(252, 230, 142, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 30%, rgba(212, 170, 62, 0.1) 0%, transparent 55%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 14px,
      rgba(0, 0, 0, 0.03) 14px,
      rgba(0, 0, 0, 0.03) 28px
    );
  pointer-events: none;
  z-index: 1;
}

.qsm-gold-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

.qsm-gold-panel--1 {
  background:
    linear-gradient(135deg, #0e0c06 0%, #1e1608 25%, #3a2c14 55%, #2a2010 80%, #0e0c06 100%);
}
.qsm-gold-panel--2 {
  background:
    linear-gradient(155deg, #0a0906 0%, #1a140a 30%, #4a3820 60%, #1e1810 85%, #0a0906 100%);
}
.qsm-gold-panel--3 {
  background:
    linear-gradient(125deg, #080706 0%, #16120a 25%, #342818 55%, #221a0e 80%, #080706 100%);
}

/* Dark glass content overlay */
.qsm-gold-panel__content {
  position: relative;
  z-index: 2;
  margin: 20px 24px;
  padding: 22px 26px;
  max-width: 520px;
  background: rgba(8, 8, 8, 0.62);
  border: 1px solid rgba(212, 170, 62, 0.2);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.qsm-gold-panel__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: linear-gradient(90deg, var(--gold-light), var(--gold-base));
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
  width: fit-content;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.qsm-gold-panel__title {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--gold-light);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 8px;
  line-height: 1.15;
}
.qsm-gold-panel__desc {
  color: rgba(242, 242, 242, 0.72);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.qsm-gold-panel .qsm-btn { width: fit-content; }

.qsm-hero__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}
.qsm-hero__dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 0;
  transition: background var(--ease), transform var(--ease), border-color var(--ease);
}
.qsm-hero__dots button.is-active {
  background: var(--gold-mid);
  border-color: var(--gold-light);
  transform: scale(1.25);
}

/* ── SECTION TITLES ── */
.qsm-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-mid);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── GIF ROW (live casino | slot | togel) ── */
.qsm-gif-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.qsm-gif-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #050505;
  transition: border-color var(--ease), transform var(--ease);
}
.qsm-gif-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  color: var(--gold-light);
}
.qsm-gif-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.qsm-gif-card__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
}

/* ── POOLS ── */
.qsm-pools { margin-bottom: 20px; }

.qsm-pools__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.qsm-pools__item {
  display: block;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-panel);
  transition: border-color var(--ease);
}
.qsm-pools__item:hover { border-color: var(--border-strong); }
.qsm-pools__item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ── BANKS ── */
.qsm-banks { margin-bottom: 22px; }

.qsm-banks__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.qsm-banks__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 6px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.qsm-banks__item img {
  max-height: 28px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* ── GAME GRIDS ── */
.qsm-games { margin-bottom: 22px; }

.qsm-games__head {
  margin-bottom: 10px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.qsm-games__head img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #050505;
}

.qsm-games__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.qsm-games__card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #050505;
  transition: border-color var(--ease), transform var(--ease);
}
.qsm-games__card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.qsm-games__card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ── LEFT HASIL / VIP ── */
.qsm-sidebar--left .qsm-hasil {
  border-top: 1px solid var(--border);
  padding-bottom: 12px;
}
.qsm-sidebar--left .qsm-hasil .qsm-btn { margin: 0 10px; width: calc(100% - 20px); }
.qsm-sidebar--left .qsm-vip { border-top: 1px solid var(--border); }

/* ── LEGACY CATEGORY GRID ── */
.qsm-cat-grid { margin-bottom: 22px; }

.qsm-cat-grid__items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.qsm-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  padding: 14px 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-panel);
  transition: border-color var(--ease), background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.qsm-cat-card:hover {
  border-color: rgba(212, 170, 62, 0.45);
  background: var(--bg-hover);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.qsm-cat-card img { opacity: 0.88; transition: opacity var(--ease); }
.qsm-cat-card:hover img { opacity: 1; }
.qsm-cat-card__label {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.qsm-cat-card__desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── ARTICLE SEO BLOCK ── */
.qsm-article {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  box-shadow: var(--shadow-panel);
}
.qsm-article__head h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 14px;
  line-height: 1.2;
}
.qsm-article__lead {
  font-size: 15.5px;
  color: var(--text-muted);
  border-left: 3px solid var(--gold-base);
  padding-left: 16px;
  margin-bottom: 22px;
  line-height: 1.6;
}
.qsm-article__body h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-mid);
  margin-top: 1.8em;
  padding-top: 0.5em;
  border-top: 1px solid var(--border-subtle);
  letter-spacing: 0.03em;
}
.qsm-article__body h2:first-child { border-top: none; margin-top: 0; }
.qsm-article__body a { text-decoration: underline; text-underline-offset: 2px; }
.qsm-article__body ol { padding-left: 1.2em; }
.qsm-article__body li { margin-bottom: 0.45em; }

.qsm-article__cta {
  margin: 1.8em 0;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(212, 170, 62, 0.06), rgba(166, 124, 40, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.qsm-article__cta p { margin-bottom: 12px; color: var(--text-muted); }

/* FAQ */
.qsm-faq { margin-top: 12px; }
.qsm-faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 7px;
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color var(--ease);
}
.qsm-faq__item:hover { border-color: rgba(212, 170, 62, 0.3); }
.qsm-faq__item summary {
  padding: 11px 15px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--ease), background var(--ease);
}
.qsm-faq__item summary:hover { background: var(--bg-hover); }
.qsm-faq__item summary::-webkit-details-marker { display: none; }
.qsm-faq__item summary::after {
  content: '+';
  color: var(--gold-mid);
  font-size: 17px;
  font-weight: 400;
  transition: transform var(--ease);
}
.qsm-faq__item[open] summary::after { content: '−'; }
.qsm-faq__item[open] summary {
  color: var(--gold-light);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(212, 170, 62, 0.04);
}
.qsm-faq__answer { padding: 12px 15px; }
.qsm-faq__answer p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── RIGHT SIDEBAR: HASIL TOGEL ── */
.qsm-hasil { margin-bottom: 0; }

.qsm-hasil__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 380px;
  overflow-y: auto;
}
.qsm-hasil__list::-webkit-scrollbar { width: 3px; }
.qsm-hasil__list::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 3px;
}

.qsm-hasil__item {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--ease);
}
.qsm-hasil__item:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
.qsm-hasil__item:hover {
  background: rgba(212, 170, 62, 0.05);
}
.qsm-hasil__item:last-child { border-bottom: none; }

.qsm-hasil__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.qsm-hasil__name {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--gold-mid);
  text-transform: uppercase;
}
.qsm-hasil__period {
  font-size: 9.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.qsm-hasil__digits {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}
.qsm-hasil__digit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 30px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--bg-deep);
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-mid) 40%, var(--gold-base) 100%);
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
  transition: transform var(--ease);
}
.qsm-hasil__item:hover .qsm-hasil__digit {
  transform: translateY(-1px);
}

.qsm-hasil__meta {
  font-size: 9.5px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.qsm-hasil .qsm-btn {
  margin: 10px 12px 12px;
  width: calc(100% - 24px);
}

/* VIP links */
.qsm-vip__list {
  list-style: none;
  margin: 0;
  padding: 2px 0 4px;
}
.qsm-vip__list li {
  border-bottom: 1px solid var(--border-subtle);
}
.qsm-vip__list li:last-child { border-bottom: none; }
.qsm-vip__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 12.5px;
  transition: background var(--ease), color var(--ease), padding-left var(--ease);
}
.qsm-vip__list a:hover {
  background: rgba(212, 170, 62, 0.06);
  color: var(--gold-light);
  padding-left: 16px;
}
.qsm-vip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  background: rgba(212, 170, 62, 0.08);
  border: 1px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease);
}
.qsm-vip__list a:hover .qsm-vip__icon {
  background: rgba(212, 170, 62, 0.15);
  border-color: rgba(212, 170, 62, 0.35);
}

/* ── FLOAT RAILS ── */
.float-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}
.float-rail--left { left: 0; flex-direction: row; }
.float-rail--right { right: 0; flex-direction: row-reverse; }
.float-rail.is-collapsed.float-rail--left { transform: translateY(-50%) translateX(calc(-100% + 22px)); }
.float-rail.is-collapsed.float-rail--right { transform: translateY(-50%) translateX(calc(100% - 22px)); }

.float-rail__panel {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 4px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.float-rail--right .float-rail__panel {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.float-rail__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #fff;
  transition: transform var(--ease), opacity var(--ease), box-shadow var(--ease);
}
.float-rail__btn:hover {
  transform: scale(1.06);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.float-rail__btn--tg { background: #2aabee; }
.float-rail__btn--wa { background: #25d366; }
.float-rail__btn--lc { background: linear-gradient(135deg, var(--gold-dark), var(--gold-base)); }

.float-rail__toggle {
  width: 22px;
  height: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--gold-mid);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease), color var(--ease);
}
.float-rail--left .float-rail__toggle { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: none; }
.float-rail--right .float-rail__toggle { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.float-rail__toggle:hover { background: var(--bg-hover); color: var(--gold-light); }

.float-rail__panel--apk { padding: 6px; text-align: center; }
.float-rail__apk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  transition: color var(--ease);
}
.float-rail__apk:hover { color: var(--gold-light); }
.float-rail__apk-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-mid);
}
.float-rail__apk-qr {
  border-radius: 5px;
  border: 1px solid var(--border);
  width: 120px;
  height: auto;
}
.float-rail__apk-hint { font-size: 9px; color: var(--text-dim); }

/* ── FOOTER ── */
.qsm-footer {
  background: rgba(14, 10, 6, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  padding: 24px 0 14px;
  margin-top: 24px;
}
.qsm-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 18px;
}
.qsm-footer__brand img { opacity: 0.85; }
.qsm-footer__brand p {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 10px;
  max-width: 360px;
  line-height: 1.55;
}
.qsm-footer__links h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.qsm-footer__links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.qsm-footer__links li { margin-bottom: 5px; }
.qsm-footer__links a {
  font-size: 12.5px;
  color: var(--text-dim);
  transition: color var(--ease);
}
.qsm-footer__links a:hover { color: var(--gold-mid); }

.qsm-footer__bottom {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
}
.qsm-footer__bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}
.qsm-footer__bottom p {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.qsm-footer__bottom strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* ── MOBILE DOCK ── */
.qsm-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--dock-h);
  background: rgba(17, 17, 17, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: space-around;
  align-items: stretch;
  padding: 0 2px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.qsm-dock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}
.qsm-dock__item svg {
  opacity: 0.65;
  transition: opacity var(--ease), transform var(--ease);
}
.qsm-dock__item:hover {
  color: var(--gold-mid);
  background: rgba(255, 255, 255, 0.03);
}
.qsm-dock__item:hover svg {
  opacity: 1;
  transform: translateY(-1px);
}
.qsm-dock__item--cta {
  color: var(--bg-deep);
  background: linear-gradient(160deg, var(--gold-light), var(--gold-base));
  margin: 6px 4px;
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 8px rgba(212, 170, 62, 0.3);
}
.qsm-dock__item--cta svg { opacity: 1; color: var(--bg-deep); }
.qsm-dock__item--cta:hover {
  color: var(--bg-deep);
  background: linear-gradient(160deg, var(--gold-light), var(--gold-mid));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 3px 12px rgba(232, 197, 71, 0.35);
}
.qsm-dock__item--cta:hover svg { transform: translateY(-1px); }

/* ── INNER PAGES ── */
.qsm-page { padding: 24px 0 40px; }
.qsm-page__content {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 800px;
  box-shadow: var(--shadow-panel);
}
.qsm-post-card {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.qsm-post-card__title { font-size: 1.2rem; }
.qsm-post-card__title a { color: var(--gold-light); }
.qsm-post-card__meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.qsm-404__inner { text-align: center; max-width: 480px; margin: 0 auto; }
.qsm-404 h1 { font-size: 4rem; color: var(--gold-base); }
.qsm-404__actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  :root {
    --sidebar-w: 180px;
    --right-w: 190px;
  }
  .qsm-login__input { width: 108px; }
  .qsm-pools__grid { grid-template-columns: repeat(3, 1fr); }
  .qsm-banks__grid { grid-template-columns: repeat(4, 1fr); }
  .qsm-games__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .qsm-portal__grid { grid-template-columns: 1fr; }
  .qsm-sidebar--left {
    position: fixed;
    top: calc(var(--header-h) + var(--marquee-h));
    left: 0;
    bottom: var(--dock-h);
    width: 280px;
    z-index: 250;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-radius: 0;
    overflow-y: auto;
  }
  .qsm-sidebar--left.is-open { transform: translateX(0); }
  .qsm-sidebar--right { position: static; order: -1; }
  .qsm-nav-toggle { display: flex; }
  .qsm-login { display: none; }
  .qsm-dock { display: flex; }
  body.qsm-portal { padding-bottom: var(--dock-h); }
  .qsm-footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .float-rail { display: none; }
  .qsm-gif-row { grid-template-columns: 1fr; }
  .qsm-pools__grid { grid-template-columns: repeat(2, 1fr); }
  .qsm-banks__grid { grid-template-columns: repeat(3, 1fr); }
  .qsm-games__grid { grid-template-columns: repeat(2, 1fr); }
  .qsm-article { padding: 18px 16px; }
  .qsm-gold-panel__content { margin: 16px; padding: 18px 20px; }
}

@media (max-width: 480px) {
  .qsm-gold-panel { min-height: 190px; }
  .qsm-gold-panel__content { margin: 12px; padding: 16px; }
  .qsm-gold-panel__title { font-size: 1.15rem; }
  .qsm-hasil__digit { width: 23px; height: 27px; font-size: 13px; }
  .qsm-banks__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .qsm-marquee__content { animation: none; }
  .qsm-hero__slide { animation: none; }
  html { scroll-behavior: auto; }
  .qsm-btn:hover,
  .qsm-cat-card:hover,
  .qsm-gif-card:hover,
  .qsm-games__card:hover,
  .qsm-hasil__item:hover .qsm-hasil__digit { transform: none; }
}
