/*
Theme Name: Spin2Gold V6
Theme URI: https://www.spin2gold.com/
Author: Spin2Gold
Description: Responsive game-directory theme based on the Spin2Gold V6 reference layout.
Version: 1.0.2
Text Domain: spin2gold-v6
*/

:root {
  --s2g-purple: #4a146e;
  --s2g-purple-dark: #2f123f;
  --s2g-pink: #ee269b;
  --s2g-pink-light: #ff75d7;
  --s2g-gold: #ffd400;
  --s2g-panel: rgba(255, 255, 255, 0.72);
  --s2g-shadow: 0 10px 30px rgba(91, 49, 127, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #32105b;
  background:
    radial-gradient(ellipse at 5% 0%, #d3b6f6, transparent 45%),
    radial-gradient(ellipse at 65% 0%, #ffd3f1, transparent 50%),
    linear-gradient(130deg, #c9c6fa, #fbe0fa 52%, #d5d1ff);
  font-family: "Noto Sans Thai", Tahoma, Arial, sans-serif;
  min-height: 100vh;
}

body.s2g-menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #7624cf;
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.s2g-site {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 22px 16px 110px;
}

.s2g-header {
  position: sticky;
  top: 10px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  margin: 0 14px 14px;
  padding: 6px 20px;
  border: 2px solid #fff;
  border-radius: 56px;
  background: linear-gradient(115deg, rgba(255,255,255,.92), rgba(248,230,255,.88), rgba(255,255,255,.92));
  box-shadow: inset 0 0 14px #fff, 0 5px 12px rgba(155, 113, 211, 0.4);
  backdrop-filter: blur(14px);
}

.s2g-brand {
  flex: 0 0 min(23%, 340px);
}

.s2g-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.s2g-nav {
  display: flex;
  flex: 1;
  justify-content: space-around;
  gap: 4px;
}

.s2g-nav a {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
  padding: 8px 7px;
  border-radius: 25px;
  font-size: clamp(12px, 1.22vw, 19px);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.s2g-nav a:hover,
.s2g-nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(#ff62cd, #ee269b 65%, #ffb34a);
  box-shadow: 0 3px 4px rgba(164, 85, 180, 0.65), inset 0 0 5px #fff;
}

.s2g-nav-icon {
  font-size: 25px;
  line-height: 1;
}

.s2g-actions {
  display: flex;
  gap: 8px;
}

.s2g-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 19px;
  border: 2px solid #fff;
  border-radius: 999px;
  font-weight: 800;
  font-size: clamp(12px, 1.35vw, 19px);
  white-space: nowrap;
  cursor: pointer;
}

.s2g-button--dark {
  color: #fff;
  background: linear-gradient(#776589, #322044);
  box-shadow: 0 4px 0 #604f73, inset 0 0 7px rgba(255,255,255,.55);
}

.s2g-button--gold {
  color: #4a164a;
  background: linear-gradient(#fff98b, #ffd400 70%, #ffb000);
  box-shadow: 0 4px 0 #d89823, inset 0 0 8px #fff;
}

.s2g-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.s2g-hero {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: clamp(24px, 5vw, 76px) clamp(24px, 5vw, 76px) 22px 22px;
  box-shadow: var(--s2g-shadow);
  aspect-ratio: 1143 / 454;
}

.s2g-hero picture,
.s2g-hero img {
  display: block;
  width: 100%;
  height: 100%;
}

.s2g-hero img {
  object-fit: cover;
}

.s2g-hero-link {
  position: absolute;
  left: 45.5%;
  top: 75.5%;
  width: 28%;
  height: 19%;
  border-radius: 999px;
}

.s2g-categories {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 14px;
}

.s2g-provider-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 18px);
  margin: 6px 14px 16px;
}

.s2g-provider-button {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  background-image: url("assets/images/provider-buttons.png");
  background-repeat: no-repeat;
  background-size: 300% auto;
  background-position-y: center;
  filter: drop-shadow(0 5px 6px rgba(93, 45, 128, 0.28));
  aspect-ratio: 2.05 / 1;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.s2g-provider-button--all {
  background-position-x: left;
}

.s2g-provider-button--pg {
  background-position-x: center;
}

.s2g-provider-button--jili {
  background-position-x: right;
}

.s2g-provider-button:hover,
.s2g-provider-button.is-active {
  transform: translateY(-2px) scale(1.01);
  filter: drop-shadow(0 7px 9px rgba(238, 38, 155, 0.34));
}

.s2g-provider-button.is-active::after {
  content: "";
  position: absolute;
  inset: 8% 4%;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: inherit;
  pointer-events: none;
}

.s2g-hub {
  position: relative;
  width: auto;
  min-height: 180px;
  margin: 0 10px 18px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 10px #fff, 0 6px 14px rgba(179, 141, 221, 0.33);
}

#tryslot-hub {
  width: 100%;
  min-height: 180px;
}

.s2g-hub noscript p {
  margin: 0;
  padding: 24px;
  text-align: center;
}

.s2g-category {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  aspect-ratio: 1.24;
  padding: 6px;
  border: 2px solid #fff;
  border-radius: 25px;
  color: #4b1767;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.65), transparent 75%), linear-gradient(135deg, #e5d8ff, #f8c8f2);
  box-shadow: inset 0 0 12px #fff, 0 5px 5px rgba(167, 138, 212, 0.48);
  font-size: clamp(12px, 1.45vw, 21px);
  font-weight: 800;
  cursor: pointer;
}

.s2g-category:nth-child(3n+1) {
  background: linear-gradient(135deg, #e2d7ff, #f7ecff);
}

.s2g-category:nth-child(3n+2) {
  background: linear-gradient(135deg, #f0d8ff, #ffd1ed);
}

.s2g-category:hover,
.s2g-category.is-active {
  border-color: #e91a9b;
  background: linear-gradient(135deg, #ffe6f6, #f5d5ff);
  transform: translateY(-2px);
}

.s2g-category img {
  width: 66%;
  height: 57%;
  object-fit: contain;
}

.s2g-catalog {
  margin: 0 10px;
  padding: 14px;
  border: 2px solid #fff;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,.76), rgba(238,231,255,.75));
  box-shadow: inset 0 0 10px #fff, 0 6px 14px rgba(179, 141, 221, 0.33);
}

.s2g-catalog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.s2g-catalog h1,
.s2g-catalog h2 {
  margin: 0;
  font-size: clamp(22px, 2.35vw, 35px);
  white-space: nowrap;
}

.s2g-tabs {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 6px;
}

.s2g-tab,
.s2g-view-all {
  border: 1px solid #c9a8ff;
  border-radius: 999px;
  padding: 9px 14px;
  background: #f9f2ff;
  box-shadow: 0 3px 4px rgba(188, 162, 222, 0.33), inset 0 0 5px #fff;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.s2g-tab:hover,
.s2g-tab.is-active {
  color: #fff;
  border-color: #fff;
  background: linear-gradient(#ff75d7, #f0009c);
}

.s2g-view-all {
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.s2g-game {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 19px;
  background: #eedaff;
  box-shadow: 0 7px 16px rgba(73, 35, 112, 0.2);
  aspect-ratio: 1 / 1.02;
}

.s2g-game[hidden] {
  display: none;
}

.s2g-game img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.s2g-game:hover img {
  transform: scale(1.05);
}

.s2g-game-title {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 10px;
  color: #fff;
  background: rgba(47, 18, 63, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: .2s ease;
}

.s2g-game:hover .s2g-game-title,
.s2g-game:focus-visible .s2g-game-title {
  opacity: 1;
  transform: none;
}

.s2g-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 10px 0;
}

.s2g-info-card {
  padding: 20px;
  border: 2px solid #fff;
  border-radius: 24px;
  background: var(--s2g-panel);
  box-shadow: var(--s2g-shadow);
}

.s2g-info-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.s2g-info-card p {
  margin: 0;
  line-height: 1.7;
}

.s2g-footer {
  margin: 24px 14px 0;
  padding: 22px 18px;
  border-radius: 24px;
  color: #fff;
  background: rgba(47, 18, 63, 0.88);
  text-align: center;
}

.s2g-footer p {
  margin: 5px 0;
}

.s2g-footer-note {
  color: #f8d9ff;
  font-size: 13px;
}

.s2g-mobile-bar {
  display: none;
}

.s2g-dialog {
  width: min(92vw, 460px);
  padding: 24px;
  border: 2px solid #fff;
  border-radius: 25px;
  color: #32105b;
  background: #fff1ff;
  box-shadow: 0 15px 70px rgba(53, 16, 80, 0.4);
}

.s2g-dialog::backdrop {
  background: rgba(41, 16, 68, 0.62);
}

.s2g-dialog-close {
  float: right;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #ead6ff;
  cursor: pointer;
}

.s2g-dialog h2 {
  margin: 8px 0;
}

.s2g-dialog p {
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .s2g-header {
    padding: 5px 12px;
    gap: 5px;
    min-height: 72px;
  }

  .s2g-nav a {
    padding: 7px 4px;
    font-size: 12px;
  }

  .s2g-button {
    padding: 9px 10px;
    font-size: 12px;
  }

  .s2g-tab {
    padding: 7px 9px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .s2g-site {
    width: min(100%, 620px);
    padding: 10px 10px 96px;
  }

  .s2g-header {
    top: 5px;
    justify-content: space-between;
    min-height: 65px;
    margin: 0 0 7px;
    padding: 9px 10px;
    border-radius: 23px;
  }

  .s2g-brand {
    flex-basis: min(61%, 245px);
  }

  .s2g-nav,
  .s2g-actions {
    display: none;
  }

  .s2g-menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .s2g-nav.is-open {
    position: fixed;
    inset: 82px 10px auto;
    z-index: 100;
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 2px solid #fff;
    border-radius: 22px;
    background: #fff3ff;
    box-shadow: 0 18px 50px rgba(47, 18, 63, 0.3);
  }

  .s2g-nav.is-open a {
    grid-template-columns: 35px 1fr;
    justify-items: start;
    font-size: 16px;
  }

  .s2g-hero {
    aspect-ratio: 332 / 256;
    border-radius: 22px;
  }

  .s2g-hero-link {
    left: 20%;
    top: 80%;
    width: 60%;
    height: 19%;
  }

  .s2g-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 9px 0 12px;
  }

  .s2g-provider-buttons {
    gap: 5px;
    margin: 5px 0 10px;
  }

  .s2g-provider-button {
    min-height: 58px;
  }

  .s2g-hub {
    margin: 0 0 12px;
    border-radius: 22px;
  }

  .s2g-category {
    aspect-ratio: 1.02;
    border-radius: 17px;
    font-size: 13px;
  }

  .s2g-catalog {
    margin: 0;
    padding: 10px;
    border-radius: 22px;
  }

  .s2g-catalog-head {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  .s2g-catalog h1,
  .s2g-catalog h2 {
    font-size: 22px;
  }

  .s2g-tabs {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .s2g-tab {
    padding: 6px 7px;
    font-size: 11px;
  }

  .s2g-games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .s2g-game {
    border-radius: 14px;
  }

  .s2g-game-title {
    opacity: 1;
    transform: none;
  }

  .s2g-info {
    grid-template-columns: 1fr;
    margin: 14px 0 0;
  }

  .s2g-footer {
    margin: 18px 0 0;
  }

  .s2g-mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: flex;
    justify-content: space-around;
    padding: 8px 4px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid #fff;
    background: linear-gradient(#fff4ff, #fce9fb);
    box-shadow: 0 -4px 20px rgba(167, 127, 195, 0.27);
  }

  .s2g-mobile-bar a,
  .s2g-mobile-bar button {
    display: grid;
    place-items: center;
    gap: 2px;
    min-width: 55px;
    padding: 5px 8px;
    border: 0;
    border-radius: 12px;
    color: #4a146e;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
  }

  .s2g-mobile-bar span {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

