/* 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: 200px;
  /* Compact portal width — not full ultrawide */
  --shell-max: 960px;
  --ease: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

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;
  min-height: 100dvh;
  padding-bottom: 0;
  overflow-x: clip;
  width: 100%;
  -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; }
video, iframe, svg { max-width: 100%; }
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: 100%;
  margin: 0 auto;
  padding: 0 clamp(10px, 2vw, 14px);
}

.qsm-frame {
  width: min(960px, 100%);
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.qsm-header {
  width: 100%;
}

.qsm-center,
.qsm-portal,
.qsm-main {
  min-width: 0;
  max-width: 100%;
}

/* Float rails stay at viewport edges (outside the frame) */
.float-rail--left { left: 0; }
.float-rail--right { right: 0; }

/* ── 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%); }
}

/* ── 2-COLUMN PORTAL (left | center) ── */
.qsm-main { padding: 18px 0 36px; }

.qsm-portal__grid {
  display: grid;
  grid-template-columns: minmax(160px, var(--sidebar-w)) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
}

/* ── 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;
  filter: drop-shadow(0 0 4px rgba(252, 230, 142, 0.45));
}

/* Gold QQSTAR menu icons (mask + gold gradient) */
.qsm-side-nav__icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--gold-light) 0%, var(--gold-mid) 48%, var(--gold-dark) 100%);
  opacity: 0.95;
  transition: opacity var(--ease), filter var(--ease);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.qsm-side-nav__icon--home {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3.2 3.5 10.5V21h6.2v-6.2h4.6V21h6.2V10.5L12 3.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3.2 3.5 10.5V21h6.2v-6.2h4.6V21h6.2V10.5L12 3.2z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--togel {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='9' r='3.2' fill='%23000'/%3E%3Ccircle cx='16.2' cy='8.2' r='2.6' fill='%23000'/%3E%3Ccircle cx='12.5' cy='16' r='3.6' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='9' r='3.2' fill='%23000'/%3E%3Ccircle cx='16.2' cy='8.2' r='2.6' fill='%23000'/%3E%3Ccircle cx='12.5' cy='16' r='3.6' fill='%23000'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--slots {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 3h12v3H6V3zm1 4h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zm1.2 2.4v9.2h2.3V9.4H8.2zm3.5 0v9.2h2.3V9.4h-2.3zm3.5 0v9.2h2.3V9.4H15.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 3h12v3H6V3zm1 4h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zm1.2 2.4v9.2h2.3V9.4H8.2zm3.5 0v9.2h2.3V9.4h-2.3zm3.5 0v9.2h2.3V9.4H15.2z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--sports {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm4.9 5.3-2.2 1.6.8 2.6-2.5-1.2-2.5 1.2.8-2.6-2.2-1.6h2.7L12 4.8l.9 2.5h2.999zM7.4 14.2c.7 2.1 2.5 3.6 4.6 4v-3.1c-1.2-.2-2.3-.8-3.1-1.7l-1.5.8zm9.2 0-1.5-.8c-.8.9-1.9 1.5-3.1 1.7v3.1c2.1-.4 3.9-1.9 4.6-4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm4.9 5.3-2.2 1.6.8 2.6-2.5-1.2-2.5 1.2.8-2.6-2.2-1.6h2.7L12 4.8l.9 2.5h2.999zM7.4 14.2c.7 2.1 2.5 3.6 4.6 4v-3.1c-1.2-.2-2.3-.8-3.1-1.7l-1.5.8zm9.2 0-1.5-.8c-.8.9-1.9 1.5-3.1 1.7v3.1c2.1-.4 3.9-1.9 4.6-4z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--casino {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C7.6 2 4 5.1 4 9c0 3.2 2.3 5.9 5.5 6.8L8 21h8l-1.5-5.2C17.7 14.9 20 12.2 20 9c0-3.9-3.6-7-8-7zm0 3.2c.9 0 1.6.7 1.6 1.6S12.9 8.4 12 8.4s-1.6-.7-1.6-1.6S11.1 5.2 12 5.2zM7.8 9.4c.7 0 1.3.6 1.3 1.3S8.5 12 7.8 12 6.5 11.4 6.5 10.7s.6-1.3 1.3-1.3zm8.4 0c.7 0 1.3.6 1.3 1.3s-.6 1.3-1.3 1.3-1.3-.6-1.3-1.3.6-1.3 1.3-1.3zM12 11.5c.9 0 1.6.7 1.6 1.6S12.9 14.7 12 14.7s-1.6-.7-1.6-1.6.7-1.6 1.6-1.6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C7.6 2 4 5.1 4 9c0 3.2 2.3 5.9 5.5 6.8L8 21h8l-1.5-5.2C17.7 14.9 20 12.2 20 9c0-3.9-3.6-7-8-7zm0 3.2c.9 0 1.6.7 1.6 1.6S12.9 8.4 12 8.4s-1.6-.7-1.6-1.6S11.1 5.2 12 5.2zM7.8 9.4c.7 0 1.3.6 1.3 1.3S8.5 12 7.8 12 6.5 11.4 6.5 10.7s.6-1.3 1.3-1.3zm8.4 0c.7 0 1.3.6 1.3 1.3s-.6 1.3-1.3 1.3-1.3-.6-1.3-1.3.6-1.3 1.3-1.3zM12 11.5c.9 0 1.6.7 1.6 1.6S12.9 14.7 12 14.7s-1.6-.7-1.6-1.6.7-1.6 1.6-1.6z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--poker {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3.2c-2.4 2.5-5.8 4.1-5.8 7.3 0 2.1 1.6 3.5 3.3 3.5.9 0 1.6-.3 2.5-1.1.9.8 1.6 1.1 2.5 1.1 1.7 0 3.3-1.4 3.3-3.5 0-3.2-3.4-4.8-5.8-7.3zM9.7 15.4c-.8.4-1.4 1.1-1.4 2.1 0 1.4 1.2 2.6 3.7 2.6s3.7-1.2 3.7-2.6c0-1-.6-1.7-1.4-2.1-.7.5-1.5.8-2.3.8-.8 0-1.6-.3-2.3-.8z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3.2c-2.4 2.5-5.8 4.1-5.8 7.3 0 2.1 1.6 3.5 3.3 3.5.9 0 1.6-.3 2.5-1.1.9.8 1.6 1.1 2.5 1.1 1.7 0 3.3-1.4 3.3-3.5 0-3.2-3.4-4.8-5.8-7.3zM9.7 15.4c-.8.4-1.4 1.1-1.4 2.1 0 1.4 1.2 2.6 3.7 2.6s3.7-1.2 3.7-2.6c0-1-.6-1.7-1.4-2.1-.7.5-1.5.8-2.3.8-.8 0-1.6-.3-2.3-.8z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--arcade {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.2 9.2h9.6c2.4 0 4.4 1.9 4.4 4.3v1.7c0 1.8-1.1 3.3-2.7 3.9l-.6 1.3H6.1l-.6-1.3A4.2 4.2 0 0 1 2.8 15.2v-1.7c0-2.4 2-4.3 4.4-4.3zm2.1 2.4v1.4H7.9v1.6H6.5v-1.6H5.1v-1.4h1.4V10.2h1.4v1.4h1.4zm7.4-.2c.7 0 1.2.5 1.2 1.2s-.5 1.2-1.2 1.2-1.2-.5-1.2-1.2.5-1.2 1.2-1.2zm-2.4 2.6c.7 0 1.2.5 1.2 1.2s-.5 1.2-1.2 1.2-1.2-.5-1.2-1.2.5-1.2 1.2-1.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.2 9.2h9.6c2.4 0 4.4 1.9 4.4 4.3v1.7c0 1.8-1.1 3.3-2.7 3.9l-.6 1.3H6.1l-.6-1.3A4.2 4.2 0 0 1 2.8 15.2v-1.7c0-2.4 2-4.3 4.4-4.3zm2.1 2.4v1.4H7.9v1.6H6.5v-1.6H5.1v-1.4h1.4V10.2h1.4v1.4h1.4zm7.4-.2c.7 0 1.2.5 1.2 1.2s-.5 1.2-1.2 1.2-1.2-.5-1.2-1.2.5-1.2 1.2-1.2zm-2.4 2.6c.7 0 1.2.5 1.2 1.2s-.5 1.2-1.2 1.2-1.2-.5-1.2-1.2.5-1.2 1.2-1.2z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--hot-games {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M13.2 2.4c.2 3.1 1.5 4.6 3.4 6.2 1.7 1.4 3 3.1 3 5.4 0 3.6-2.8 6.4-6.6 6.4S6.4 17.6 6.4 14c0-2.1.8-3.7 2.1-5.3.4 1.7 1.3 2.8 2.5 3.5-.3-2.4.3-4.7 2.2-7.8z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M13.2 2.4c.2 3.1 1.5 4.6 3.4 6.2 1.7 1.4 3 3.1 3 5.4 0 3.6-2.8 6.4-6.6 6.4S6.4 17.6 6.4 14c0-2.1.8-3.7 2.1-5.3.4 1.7 1.3 2.8 2.5 3.5-.3-2.4.3-4.7 2.2-7.8z'/%3E%3C/svg%3E");
}
.qsm-side-nav__icon--promo {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.6 13.6 7h4.7l-3.8 2.9 1.5 4.5L12 11.8 7.9 14.4 9.4 9.9 5.6 7h4.7L12 2.6zM4.5 16.2h15v1.8h-15v-1.8zm1.5 3h12v1.7h-12V19.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.6 13.6 7h4.7l-3.8 2.9 1.5 4.5L12 11.8 7.9 14.4 9.4 9.9 5.6 7h4.7L12 2.6zM4.5 16.2h15v1.8h-15v-1.8zm1.5 3h12v1.7h-12V19.2z'/%3E%3C/svg%3E");
}

.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 (fixed slot — no height jump) ── */
.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;
  width: 100%;
  aspect-ratio: 3 / 1;
}

.qsm-hero__slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.qsm-hero__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.45s ease, opacity 0.35s ease, visibility 0.45s;
  z-index: 0;
  pointer-events: none;
}
.qsm-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 2;
  pointer-events: auto;
}
.qsm-hero__slide.is-exit {
  opacity: 0;
  visibility: visible;
  transform: translateX(-100%);
  z-index: 1;
  pointer-events: none;
}

.qsm-banner {
  display: block;
  width: 100%;
  height: 100%;
  background: #050505;
  line-height: 0;
}
.qsm-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center center;
}

.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 (QQSTAR branded banners) ── */
.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-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #080604;
  box-shadow: var(--shadow-panel);
  transition: border-color var(--ease), transform var(--ease);
}
.qsm-gif-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
}
.qsm-gif-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 350 / 171;
  object-fit: cover;
  background: #080604;
}

/* ── POOLS (gold frame + auto horizontal scroll) ── */
.qsm-pools { margin-bottom: 20px; }

.qsm-pools__viewport {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(8, 6, 4, 0.55);
  padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.qsm-pools__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  gap: 10px;
  padding: 0 10px;
  animation: qsm-pools-scroll 28s linear infinite;
}
.qsm-pools__viewport:hover .qsm-pools__track {
  animation-play-state: paused;
}

@keyframes qsm-pools-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.qsm-pools__item {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--gold-light);
}
.qsm-pools__frame {
  display: block;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(252, 230, 142, 0.12), rgba(8, 6, 4, 0.9));
  box-shadow: inset 0 0 0 1px rgba(166, 124, 40, 0.35);
  padding: 3px;
}
.qsm-pools__item:hover .qsm-pools__frame {
  border-color: var(--gold-light);
}
.qsm-pools__item img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 4px;
  background: #0a0804;
}
.qsm-pools__name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold-mid);
}

/* ── 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: 1280px) {
  :root { --sidebar-w: 190px; }
  .float-rail__apk-qr { width: 96px; height: 96px; }
}

@media (max-width: 1100px) {
  :root { --sidebar-w: 170px; }
  .qsm-pengaduan { display: none !important; }
  .qsm-login__input { width: min(100px, 22vw); }
  .qsm-logo img { height: 34px; }
  .qsm-pools__item { flex-basis: 132px; }
  .qsm-banks__grid { grid-template-columns: repeat(4, 1fr); }
  .qsm-games__grid { grid-template-columns: repeat(3, 1fr); }
  .qsm-gif-row { gap: 8px; }
  .float-rail { display: none; }
}

/* Tablet + mobile: single column, drawer nav */
@media (max-width: 980px) {
  :root {
    --header-h: 56px;
    --marquee-h: 30px;
  }

  .qsm-portal__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .qsm-sidebar--left {
    position: fixed;
    top: calc(var(--header-h) + var(--marquee-h));
    left: 0;
    bottom: var(--dock-h);
    width: min(300px, 86vw);
    max-width: 100%;
    z-index: 250;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .qsm-sidebar--left.is-open { transform: translateX(0); }

  body.qsm-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(0, 0, 0, 0.55);
  }

  .qsm-nav-toggle { display: flex; margin-left: auto; }
  .qsm-login { display: none; }
  .qsm-dock { display: flex; }
  body.qsm-portal {
    padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  }

  .qsm-header__inner { gap: 10px; }
  .qsm-logo img { height: 32px; }

  .qsm-main { padding: 12px 0 28px; }
  .qsm-footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .float-rail { display: none; }

  .qsm-gif-row { grid-template-columns: 1fr; }
  .qsm-pools__item { flex-basis: 120px; }
  .qsm-banks__grid { grid-template-columns: repeat(3, 1fr); }
  .qsm-games__grid { grid-template-columns: repeat(2, 1fr); }
  .qsm-games__head img { width: 100%; height: auto; }
  .qsm-article { padding: 16px 14px; }
  .qsm-article__head h1 { font-size: 1.25rem; }
  .qsm-gold-panel__content { margin: 16px; padding: 18px 20px; }

  body.qsm-portal::before {
    background-attachment: scroll;
    background-position: center top;
  }
}

@media (max-width: 640px) {
  .qsm-shell { padding: 0 10px; }
  .qsm-btn { padding: 7px 12px; font-size: 11px; }
  .qsm-marquee__label span { display: none; }
  .qsm-marquee__label { padding: 0 8px; }
  .qsm-banks__grid { grid-template-columns: repeat(2, 1fr); }
  .qsm-games__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .qsm-hasil__digit { width: 22px; height: 26px; font-size: 12px; }
  .qsm-article__head h1 { font-size: 1.15rem; }
  .qsm-section-title { font-size: 0.85rem; }
  .qsm-pools__track { animation-duration: 22s; }
}

@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-logo img { height: 28px; }
  .qsm-dock__item span { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .qsm-marquee__content { animation: none; }
  .qsm-hero__slide,
  .qsm-hero__slide.is-active,
  .qsm-hero__slide.is-exit {
    transition: none;
    transform: none;
  }
  .qsm-hero__slide { opacity: 0; visibility: hidden; position: absolute; }
  .qsm-hero__slide.is-active { opacity: 1; visibility: visible; position: relative; }
  .qsm-pools__track { 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; }
}
