/* Spin Galaxy Canada — cosmic left-rail listing layout (prefix sgx-) */

:root {
  --sgx-bg: #0b0d1a;
  --sgx-bg-soft: #10132a;
  --sgx-panel: #141833;
  --sgx-panel-2: #191e3f;
  --sgx-border: #262c55;
  --sgx-text: #e8eaf6;
  --sgx-muted: #9aa3c7;
  --sgx-cyan: #4fd8ff;
  --sgx-violet: #a78bfa;
  --sgx-gold: #ffd166;
  --sgx-grad: linear-gradient(120deg, #4fd8ff, #a78bfa);
  --sgx-radius: 16px;
  --sgx-rail: 292px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(167, 139, 250, 0.14), transparent 60%),
    radial-gradient(900px 460px at 20% 110%, rgba(79, 216, 255, 0.08), transparent 60%),
    var(--sgx-bg);
  color: var(--sgx-text);
  font: 16px/1.65 "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

a { color: var(--sgx-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- Left rail ---------- */

.sgx-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sgx-rail);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 22px 30px;
  background:
    radial-gradient(300px 200px at 80% 0%, rgba(167, 139, 250, 0.12), transparent 70%),
    #0e1126;
  border-right: 1px solid var(--sgx-border);
  overflow-y: auto;
  z-index: 40;
}

.sgx-logo { display: flex; }
.sgx-logo img { width: 176px; height: auto; }

.sgx-rail__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sgx-muted);
  margin-bottom: 10px;
}

/* Page switcher */
.sgx-pages { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sgx-pages a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--sgx-text);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
}
.sgx-pages a:hover { background: var(--sgx-panel); text-decoration: none; }
.sgx-pages a.is-active {
  background: linear-gradient(120deg, rgba(79, 216, 255, 0.14), rgba(167, 139, 250, 0.16));
  border-color: var(--sgx-border);
}
.sgx-pages svg { flex: none; }
.sgx-pages small { display: block; font-weight: 400; font-size: 12px; color: var(--sgx-muted); }

/* Language switcher */
.sgx-lang { display: flex; gap: 8px; }
.sgx-lang a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--sgx-border);
  border-radius: 10px;
  color: var(--sgx-muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.sgx-lang a:hover { color: var(--sgx-text); text-decoration: none; }
.sgx-lang a.is-active {
  background: linear-gradient(120deg, rgba(79, 216, 255, 0.16), rgba(167, 139, 250, 0.18));
  color: var(--sgx-text);
}
.sgx-lang svg { flex: none; border-radius: 3px; }

/* On-this-page listing */
.sgx-toc { list-style: none; display: flex; flex-direction: column; }
.sgx-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px 7px 0;
  color: var(--sgx-muted);
  font-size: 13.5px;
  border-left: 2px solid var(--sgx-border);
  padding-left: 14px;
}
.sgx-toc a:hover { color: var(--sgx-text); border-left-color: var(--sgx-cyan); text-decoration: none; }
.sgx-toc b {
  font-size: 11px;
  font-weight: 700;
  color: var(--sgx-violet);
  min-width: 18px;
}

.sgx-rail__cta {
  display: block;
  text-align: center;
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--sgx-grad);
  color: #0b0d1a;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(79, 216, 255, 0.25);
}
.sgx-rail__cta:hover { text-decoration: none; filter: brightness(1.08); }

.sgx-rail__foot {
  margin-top: auto;
  font-size: 12px;
  color: var(--sgx-muted);
  line-height: 1.6;
  border-top: 1px solid var(--sgx-border);
  padding-top: 14px;
}
.sgx-rail__foot .sgx-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: 2px solid var(--sgx-gold);
  border-radius: 50%;
  color: var(--sgx-gold);
  font-weight: 800;
  font-size: 11px;
  margin-bottom: 8px;
}

/* ---------- Mobile top bar ---------- */

.sgx-topbar { display: none; }
#sgx-nav-toggle { display: none; }

/* ---------- Main column ---------- */

.sgx-main {
  margin-left: var(--sgx-rail);
  padding: 34px clamp(20px, 5vw, 64px) 60px;
  max-width: calc(880px + var(--sgx-rail));
}

/* Hero */
.sgx-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sgx-border);
  border-radius: 22px;
  padding: 40px 36px 36px;
  margin-bottom: 34px;
  background:
    linear-gradient(100deg, rgba(11, 13, 26, 0.82) 0%, rgba(11, 13, 26, 0.45) 55%, rgba(11, 13, 26, 0.15) 100%),
    url("../assets/background-hero-mobile.avif") center / cover no-repeat,
    var(--sgx-bg-soft);
}

.sgx-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sgx-cyan);
  border: 1px solid rgba(79, 216, 255, 0.4);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 14px;
}

.sgx-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--sgx-muted);
  font-size: 13.5px;
  margin-bottom: 20px;
}
.sgx-byline a { color: var(--sgx-text); font-weight: 700; }
.sgx-byline span::before { content: "·"; margin-right: 8px; color: var(--sgx-border); }
.sgx-byline span:first-of-type::before { content: none; }

.sgx-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.sgx-hero__facts li {
  list-style: none;
  background: rgba(11, 13, 26, 0.6);
  border: 1px solid var(--sgx-border);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13.5px;
}
.sgx-hero__facts b { color: var(--sgx-gold); }

/* Section cards — the listing */
.sgx-card {
  position: relative;
  background: var(--sgx-panel);
  border: 1px solid var(--sgx-border);
  border-radius: var(--sgx-radius);
  padding: 30px 32px;
  margin-bottom: 22px;
}
.sgx-card::before {
  content: "";
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 3px;
  border-radius: 3px;
  background: var(--sgx-grad);
  opacity: 0.7;
}

.sgx-card h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}
.sgx-card h2 .sgx-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--sgx-violet);
  border: 1px solid var(--sgx-border);
  border-radius: 8px;
  padding: 2px 8px;
  flex: none;
}

.sgx-card p { color: var(--sgx-text); margin-bottom: 14px; }
.sgx-card p:last-child { margin-bottom: 0; }
.sgx-card ul, .sgx-card ol { margin: 0 0 14px 22px; }
.sgx-card li { margin-bottom: 6px; }

/* Tables */
.sgx-tablewrap { overflow-x: auto; margin-bottom: 14px; }
.sgx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: var(--sgx-bg-soft);
  border: 1px solid var(--sgx-border);
  border-radius: 12px;
  overflow: hidden;
}
.sgx-table th, .sgx-table td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--sgx-border);
  vertical-align: top;
}
.sgx-table th {
  background: var(--sgx-panel-2);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sgx-muted);
}
.sgx-table tr:last-child td { border-bottom: none; }
.sgx-table td:first-child { font-weight: 700; white-space: nowrap; }

/* Bonus game boxes */
.sgx-games {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 6px;
}
.sgx-game {
  flex: 1 1 200px;
  background: var(--sgx-bg-soft);
  border: 1px solid var(--sgx-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sgx-game img { width: 100%; height: 132px; object-fit: cover; }
.sgx-game__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.sgx-game__stage {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sgx-cyan);
}
.sgx-game__title { font-weight: 800; font-size: 15.5px; }
.sgx-game__spins { color: var(--sgx-gold); font-weight: 700; font-size: 14px; }
.sgx-game__min { color: var(--sgx-muted); font-size: 13px; }

/* Callout */
.sgx-note {
  display: flex;
  gap: 12px;
  background: rgba(255, 209, 102, 0.07);
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  margin-bottom: 14px;
}
.sgx-note svg { flex: none; margin-top: 2px; }

/* Steps */
.sgx-steps { list-style: none; margin: 0 0 14px; counter-reset: step; }
.sgx-steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--sgx-border);
}
.sgx-steps li:last-child { border-bottom: none; }
.sgx-steps li::before {
  content: counter(step);
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sgx-grad);
  color: #0b0d1a;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAQ */
.sgx-faq details {
  border: 1px solid var(--sgx-border);
  border-radius: 12px;
  background: var(--sgx-bg-soft);
  margin-bottom: 10px;
  overflow: hidden;
}
.sgx-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 44px 15px 18px;
  font-weight: 700;
  font-size: 15px;
  position: relative;
}
.sgx-faq summary::-webkit-details-marker { display: none; }
.sgx-faq summary::after {
  content: "+";
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--sgx-cyan);
  font-size: 20px;
  font-weight: 700;
}
.sgx-faq details[open] summary::after { content: "–"; }
.sgx-faq details p { padding: 0 18px 16px; color: var(--sgx-muted); }

/* Centered in-section CTA */
.sgx-cta-mid {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.sgx-cta-mid .sgx-rail__cta { min-width: 240px; }

/* Inline CTA band */
.sgx-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--sgx-radius);
  border: 1px solid var(--sgx-border);
  background:
    radial-gradient(300px 160px at 100% 0%, rgba(79, 216, 255, 0.16), transparent 60%),
    var(--sgx-panel-2);
  padding: 24px 28px;
  margin-bottom: 22px;
}
.sgx-band__title { font-size: 19px; font-weight: 800; }
.sgx-band__sub { color: var(--sgx-muted); font-size: 14px; margin-top: 2px; }
.sgx-band .sgx-rail__cta { flex: none; box-shadow: none; }

/* Author page */
.sgx-author {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.sgx-author img {
  width: 132px; height: 132px;
  border-radius: 50%;
  border: 2px solid var(--sgx-border);
  flex: none;
}
.sgx-author__bio { flex: 1 1 320px; }

/* Page footer */
.sgx-foot {
  color: var(--sgx-muted);
  font-size: 13px;
  border-top: 1px solid var(--sgx-border);
  padding-top: 20px;
  line-height: 1.7;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .sgx-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    inset: 0 0 auto 0;
    height: 62px;
    padding: 0 18px;
    background: rgba(14, 17, 38, 0.96);
    border-bottom: 1px solid var(--sgx-border);
    z-index: 50;
  }
  .sgx-topbar img { width: 132px; }
  .sgx-burger {
    width: 42px; height: 42px;
    border: 1px solid var(--sgx-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .sgx-burger span {
    width: 20px; height: 2px;
    background: var(--sgx-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
  }
  .sgx-rail {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    top: 62px;
    width: min(320px, 86vw);
    box-shadow: 24px 0 48px rgba(0, 0, 0, 0.5);
  }
  #sgx-nav-toggle:checked ~ .sgx-rail { transform: translateX(0); }
  #sgx-nav-toggle:checked ~ .sgx-topbar .sgx-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #sgx-nav-toggle:checked ~ .sgx-topbar .sgx-burger span:nth-child(2) { opacity: 0; }
  #sgx-nav-toggle:checked ~ .sgx-topbar .sgx-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .sgx-main { margin-left: 0; padding-top: 84px; }
  .sgx-card { padding: 24px 20px; }
  .sgx-hero { padding: 28px 22px; }
}

/* Hero CTA button */
.sgx-hero__btn {
  display: inline-block;
  margin-top: 22px;
  padding: 14px 38px;
  box-shadow: 0 10px 28px rgba(79, 216, 255, 0.35);
}

/* Sticky bottom CTA — mobile only, slides in on scroll */
.sgx-sticky-cta { display: none; }

@media (max-width: 960px) {
  .sgx-sticky-cta {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(14, 17, 38, 0.96);
    border-top: 1px solid var(--sgx-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .sgx-sticky-cta .sgx-rail__cta { flex: 1; box-shadow: none; }
  #sgx-nav-toggle:checked ~ .sgx-sticky-cta { display: none; }
  .sgx-main { padding-bottom: 100px; }

  /* Reveal after scrolling past the hero; browsers without
     scroll-driven animations just show the bar immediately */
  @supports (animation-timeline: scroll()) {
    .sgx-sticky-cta {
      transform: translateY(120%);
      animation: sgx-sticky-in linear both;
      animation-timeline: scroll(root);
      animation-range: 320px 520px;
    }
  }
}

@keyframes sgx-sticky-in {
  from { transform: translateY(120%); }
  to   { transform: translateY(0); }
}
