/* QQSTARZ Portal skin — visual shell inspired by gryflash-style layouts
   Content remains corporate catalog (no gambling flows). */

:root {
  --bg: #000;
  --bg-2: #0a0a0a;
  --bg-3: #121212;
  --panel: #111;
  --gold: #f0c14b;
  --gold-2: #ffe08a;
  --gold-deep: #b8860b;
  --gold-bar: linear-gradient(180deg, #f6d860 0%, #d4a017 45%, #a6790c 100%);
  --text: #fff;
  --muted: #cfcfcf;
  --line: #3a3a3a;
  --danger-soft: #e0b27a;
  --font-sans: Arial, Helvetica, "Segoe UI", sans-serif;
  --container: 1100px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; width: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }

.container { width: min(100% - 1.25rem, var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--gold); color: #000; padding: .6rem 1rem; z-index: 1000; }
.skip-link:focus { top: 1rem; }

/* Floating left rail */
.float-rail {
  position: fixed;
  left: 0;
  top: 42%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.float-rail a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #1a1a1a;
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  font-size: 14px;
}
.float-rail a:hover { background: var(--gold); color: #000; }

/* Header */
.portal-header {
  background: #000;
  border-bottom: 1px solid #222;
  position: relative;
  z-index: 100;
}
.portal-top {
  width: min(100% - 1rem, var(--container));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem 0;
}
.portal-logo {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}
.portal-logo img {
  width: min(168px, 42vw);
  height: auto;
}
.portal-auth {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  flex: 0 0 auto;
}
.portal-auth__row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: .45rem;
}
.auth-btn {
  min-width: 96px;
  text-align: center;
  padding: .45rem .85rem;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  background: linear-gradient(180deg, #2a2108, #120e04);
  white-space: nowrap;
  line-height: 1.1;
}
.auth-btn--register {
  background: linear-gradient(180deg, #f0d060, #c99612);
  color: #1a1200 !important;
  border-color: #f5d56a;
}
.portal-contact-link { font-size: .75rem; color: #ddd !important; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  background: #111;
  cursor: pointer;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0;
  background: var(--gold);
  border-radius: 1px;
}
.nav-toggle .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.portal-nav {
  background: var(--gold-bar);
  border-top: 1px solid #fff3;
  border-bottom: 1px solid #7a5a00;
}
.portal-menu {
  width: min(100% - .5rem, var(--container));
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}
.portal-menu a {
  display: block;
  padding: .72rem .7rem;
  color: #1a1200 !important;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.portal-menu a:hover,
.portal-menu .current-menu-item > a {
  background: rgba(0,0,0,.18);
  color: #fff !important;
}

/* Top marquee ticker */
.portal-marquee {
  overflow: hidden;
  background: linear-gradient(180deg, #0c0c0c 0%, #050505 100%);
  border-bottom: 1px solid #3a2e0a;
  height: 34px;
  display: flex;
  align-items: center;
}
.portal-marquee__track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  white-space: nowrap;
  animation: portal-marquee-scroll 42s linear infinite;
}
.portal-marquee:hover .portal-marquee__track {
  animation-play-state: paused;
}
.portal-marquee__item {
  color: var(--gold-2);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.portal-marquee__sep {
  color: var(--gold);
  font-size: .7rem;
  opacity: .85;
}
@keyframes portal-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .portal-marquee__track {
    animation: none;
    padding: 0 .75rem;
    transform: none;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
  }
}

/* Banner slider */
.portal-banner {
  position: relative;
  width: min(100%, var(--container));
  margin: .75rem auto 0;
  overflow: hidden;
  border: 1px solid #333;
  background: #000;
  aspect-ratio: 21 / 8;
  max-height: 360px;
}
.portal-banner__slide {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
}
.portal-banner__slide.is-active { display: block; }
.portal-banner__slide img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.portal-banner__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.25) 55%, rgba(0,0,0,.45));
}
.portal-banner__logo {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  width: 110px !important;
  height: auto !important;
  opacity: .92;
}
.portal-banner__caption {
  position: absolute;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 2;
  max-width: 70%;
}
.portal-banner__caption strong {
  display: block;
  color: var(--gold-2);
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  text-shadow: 0 2px 8px #000;
}
.portal-banner__caption span {
  color: #eee;
  font-size: .95rem;
  text-shadow: 0 2px 6px #000;
}
.portal-banner__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 48px;
  border: 0;
  background: rgba(0,0,0,.55);
  color: var(--gold);
  font-size: 1.6rem;
  cursor: pointer;
}
.portal-banner__nav.prev { left: 0; }
.portal-banner__nav.next { right: 0; }
.portal-banner__dots {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.portal-banner__dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: 0; background: #666; cursor: pointer;
}
.portal-banner__dots button.is-active { background: var(--gold); }

/* Steps */
.portal-steps {
  width: min(100% - 1rem, var(--container));
  margin: .7rem auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .45rem;
}
.portal-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 46px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(180deg, #1b1b1b, #0d0d0d);
  color: var(--gold) !important;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .04em;
}
.portal-step span {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #111; font-size: .75rem;
}

/* Showcase strip */
.portal-progress {
  width: min(100% - 1rem, var(--container));
  margin: .55rem auto;
}
.portal-progress__frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.4fr) minmax(72px, .7fr);
  align-items: center;
  gap: .75rem;
  min-height: 88px;
  padding: .65rem .9rem;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 1px #5a4508, 0 0 24px rgba(240, 193, 75, .12);
  background:
    radial-gradient(circle at 12% 50%, rgba(240,193,75,.16), transparent 42%),
    radial-gradient(circle at 88% 50%, rgba(240,193,75,.12), transparent 40%),
    linear-gradient(90deg, #0a0800, #000 48%, #0a0800);
}
.portal-progress__brand {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.portal-progress__brand img {
  width: min(130px, 100%);
  height: auto;
}
.portal-progress__brand span {
  color: var(--gold-2);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.portal-progress__value {
  text-align: center;
  border: 1px solid #5a4508;
  background: #000;
  padding: .55rem .7rem;
  box-shadow: inset 0 0 0 1px rgba(240,193,75,.25), 0 0 18px rgba(240,193,75,.12);
}
.portal-progress__label {
  display: block;
  color: var(--gold-2);
  font-size: clamp(.55rem, 1.2vw, .72rem);
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: .2rem;
}
.portal-progress__value strong {
  display: block;
  color: #ffe08a;
  font-size: clamp(1.05rem, 3vw, 1.75rem);
  font-weight: 900;
  letter-spacing: .02em;
  text-shadow: 0 0 12px rgba(240, 193, 75, .35);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.portal-progress__aside {
  justify-self: end;
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  text-shadow: 0 0 16px rgba(240,193,75,.4);
}

@media (max-width: 640px) {
  .portal-progress__frame {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand aside"
      "value value";
    min-height: 0;
  }
  .portal-progress__brand { grid-area: brand; }
  .portal-progress__value { grid-area: value; }
  .portal-progress__aside { grid-area: aside; align-self: start; }
}

/* Category tabs */
.portal-cats {
  width: min(100% - 1rem, var(--container));
  margin: .65rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  border-bottom: 1px solid #333;
  padding-bottom: .35rem;
}
.portal-cats button {
  border: 0;
  background: transparent;
  color: #bbb;
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .04em;
  padding: .45rem .65rem;
  cursor: pointer;
}
.portal-cats button.is-active,
.portal-cats button:hover {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
}

/* Product tiles like game cards */
.portal-grid-wrap {
  width: min(100% - 1rem, var(--container));
  margin: .4rem auto 1.2rem;
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
}
.portal-tile {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  overflow: hidden;
}
.portal-tile a { color: inherit; }
.portal-tile__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #151515;
}
.portal-tile__media > img:first-child {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.portal-tile:hover .portal-tile__media > img:first-child { transform: scale(1.06); }
.portal-tile__logo {
  position: absolute;
  left: 8px; bottom: 8px;
  width: 64px !important;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.7));
}
.portal-tile__play {
  position: absolute;
  right: 8px; bottom: 8px;
  z-index: 2;
  background: linear-gradient(180deg, #f0d060, #b8860b);
  color: #111;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
  padding: .35rem .55rem;
  border: 1px solid #ffe08a;
}
.portal-tile h3 {
  margin: .45rem .5rem .15rem;
  font-size: .86rem;
  color: #fff;
  line-height: 1.25;
}
.portal-tile p {
  margin: 0 .5rem .55rem;
  color: #aaa;
  font-size: .72rem;
}

/* SEO block like reference bottom content */
.portal-seo {
  background: #080808;
  border-top: 1px solid #222;
  padding: 1.5rem 0 2rem;
}
.portal-seo__inner {
  width: min(100% - 1rem, 820px);
  margin: 0 auto;
}
.portal-seo h1,
.portal-seo h2 {
  color: var(--gold-2);
  font-size: 1.15rem;
  margin: 1.1rem 0 .45rem;
}
.portal-seo h1 { font-size: 1.35rem; }
.portal-seo p,
.portal-seo li { color: #c8c8c8; font-size: .92rem; }

/* Inner pages keep readable width */
.page-hero { padding: 1.4rem 0 1rem; border-bottom: 1px solid #222; margin-bottom: 1rem; }
.page-title { margin: 0; color: var(--gold-2); font-size: clamp(1.4rem, 3vw, 2rem); }
.eyebrow { color: var(--gold); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.content-wrap { max-width: 760px; }
.content-wrap p, .content-wrap li { color: #ccc; }
.section { padding: 1.5rem 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.post-card { border-top: 1px solid #333; padding-top: .8rem; }
.post-card h3 { margin: .2rem 0; font-size: 1rem; }
.post-card h3 a { color: #fff; }
.post-card p, .post-card__meta { color: #aaa; font-size: .86rem; }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.product-card { border: 1px solid #333; background: #111; }
.product-card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__logo { position: absolute; left: 10px; bottom: 10px; width: 70px; }
.product-card__body { padding: .8rem; }
.product-card__cat { color: var(--gold); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.product-card h3 { margin: .25rem 0; font-size: 1rem; }
.product-card h3 a { color: #fff; }
.product-card p { color: #aaa; font-size: .86rem; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.1rem; font-weight: 800; font-size: .85rem; border: 1px solid transparent;
}
.btn--gold { background: var(--gold-bar); color: #1a1200 !important; }
.btn--ghost { border-color: var(--gold); color: var(--gold) !important; }

.single-product-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.2rem; }
.product-gallery { position: relative; border: 1px solid #333; overflow: hidden; }
.product-gallery .wm { position: absolute; right: 12px; top: 12px; width: 90px; }
.badge-demo {
  display: inline-block; border: 1px solid var(--gold-deep); color: var(--gold);
  font-size: .7rem; letter-spacing: .08em; padding: .25rem .55rem; margin-bottom: .5rem;
}
.author-box { margin-top: 1.5rem; border: 1px solid #333; padding: 1rem; background: #111; }

/* Footer */
.site-footer {
  background: #050505;
  border-top: 1px solid #222;
  padding: 1.6rem 0 1rem;
  margin-top: 1rem;
}
.footer-grid {
  width: min(100% - 1rem, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1rem;
}
.footer-brand p, .footer-contact, .footer-col p { color: #aaa; font-size: .86rem; }
.footer-col h3 { margin: 0 0 .5rem; color: var(--gold); font-size: .9rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu a { color: #bbb; display: inline-block; padding: .2rem 0; font-size: .86rem; }
.footer-bottom {
  width: min(100% - 1rem, var(--container));
  margin: 1rem auto 0;
  padding-top: .8rem;
  border-top: 1px solid #1c1c1c;
}
.demo-notice { color: var(--danger-soft); font-size: .8rem; margin: 0 0 .35rem; }
.copyright { color: #888; font-size: .8rem; margin: 0; }

[data-reveal] { opacity: 0; transform: translateY(12px); transition: .55s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .portal-grid, .product-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid, .single-product-layout { grid-template-columns: 1fr 1fr; }
  .portal-cats {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portal-cats::-webkit-scrollbar { display: none; }
  .portal-cats button { flex: 0 0 auto; }
}

@media (max-width: 900px) {
  .portal-logo img { width: 132px; }
  .auth-btn {
    min-width: 78px;
    padding: .4rem .6rem;
    font-size: .74rem;
  }
}

/* Mobile: logo | PROFIL KONTAK | hamburger — buttons always visible side by side */
@media (max-width: 768px) {
  .float-rail { display: none !important; }

  .portal-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: .4rem;
    row-gap: 0;
    min-height: 56px;
    padding: .4rem 0;
    width: min(100% - .7rem, var(--container));
  }

  .portal-logo {
    grid-column: 1;
    justify-self: start;
  }
  .portal-logo img {
    width: clamp(96px, 28vw, 128px);
  }

  .portal-auth {
    grid-column: 2;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    align-items: center;
  }
  .portal-auth__row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: .3rem;
  }
  .auth-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: .42rem .55rem;
    font-size: .68rem;
  }
  .portal-contact-link { display: none !important; }

  .nav-toggle {
    grid-column: 3;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
  }
  .nav-toggle span:not(.sr-only) {
    width: 16px;
    height: 2px;
    background: var(--gold);
  }

  .portal-nav {
    display: none;
    width: 100%;
  }
  .portal-nav.is-open { display: block !important; }
  .portal-menu {
    flex-direction: column;
    width: 100%;
  }
  .portal-menu a {
    background: rgba(0, 0, 0, .12);
    margin: 1px 0;
    color: #111 !important;
    text-align: left;
    padding: .8rem 1rem;
  }

  .portal-banner {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: none;
    margin-top: .45rem;
  }
  .portal-banner__caption {
    max-width: 90%;
    left: .7rem;
    bottom: .7rem;
  }
  .portal-banner__caption strong { font-size: 1rem; }
  .portal-banner__caption span { font-size: .78rem; }
  .portal-banner__logo { width: 72px !important; }

  .portal-steps,
  .portal-progress,
  .portal-cats,
  .portal-grid-wrap {
    width: min(100% - .7rem, var(--container));
  }

  .portal-steps { grid-template-columns: repeat(2, 1fr); }
  .portal-step { font-size: .68rem; min-height: 42px; }

  .portal-grid,
  .product-grid,
  .post-grid,
  .footer-grid,
  .single-product-layout {
    grid-template-columns: 1fr;
  }

  .portal-tile h3 { font-size: .9rem; }
  .portal-seo__inner { width: min(100% - .7rem, 820px); }
}

@media (max-width: 380px) {
  .portal-logo img { width: 88px; }
  .auth-btn {
    padding: .38rem .42rem;
    font-size: .62rem;
    letter-spacing: .02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .portal-tile__media > img:first-child { transition: none; }
}

/* Welcome popup — gryflash-style shell, QQSTAR corporate content */
.qq-welcome[hidden] { display: none !important; }
.qq-welcome {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.qq-welcome__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
}
.qq-welcome__box {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  background: #000;
  border: 2px solid var(--gold);
  padding: 1.35rem 1.1rem 1.1rem;
  text-align: center;
  box-shadow: 0 0 0 1px #5a4508, 0 20px 60px rgba(0,0,0,.65);
}
.qq-welcome__logo {
  width: 130px;
  margin: 0 auto .85rem;
}
.qq-welcome__icon {
  width: 72px;
  height: 72px;
  margin: .75rem auto .35rem;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 0 1px #5a4508, 0 8px 24px rgba(0,0,0,.45);
}
.qq-welcome__box p {
  margin: 0 0 .65rem;
  color: #fff;
  font-size: .92rem;
  line-height: 1.45;
}
.qq-welcome__label {
  color: var(--gold-2) !important;
  font-weight: 800;
  letter-spacing: .06em;
  margin-top: .35rem !important;
}
.qq-welcome__link {
  display: inline-block;
  color: var(--gold-2) !important;
  font-weight: 900;
  font-size: 1.15rem;
  margin-bottom: .7rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.qq-welcome__cta {
  display: block;
  margin: .85rem auto .55rem;
  color: var(--gold) !important;
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .02em;
  line-height: 1.35;
}
.qq-welcome__note {
  color: #eee !important;
  font-size: .84rem !important;
  margin-bottom: 1rem !important;
}
.qq-welcome__ok {
  min-width: 88px;
  padding: .45rem 1.2rem;
  border: 0;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
}
.qq-welcome__ok:hover { background: var(--gold-2); }

@media (max-width: 480px) {
  .qq-welcome__box { padding: 1.1rem .8rem .9rem; }
  .qq-welcome__box p { font-size: .86rem; }
  .qq-welcome__link { font-size: 1rem; }
  .qq-welcome__cta { font-size: .86rem; }
}
