:root {
  --hub-bg: #0b1220;
  --hub-bg-deep: #06101f;
  --hub-panel: #0f172a;
  --hub-card: #1e293b;
  --hub-text: #f8fafc;
  --hub-muted: #94a3b8;
  --hub-dim: #64748b;
  --hub-primary: #6366f1;
  --hub-primary-mid: #4f46e5;
  --hub-primary-deep: #3730a3;
  --hub-primary-soft: #818cf8;
  --hub-border: rgba(129, 140, 248, 0.18);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.welcome-bg {
  background-image:
    linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(15, 23, 42, 0.88) 42%, #06101f 100%),
    url('../assets/gaming-splash-bg.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.play-stage {
  position: relative;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
}

.play-ring {
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  border: 2px solid rgba(99, 102, 241, 0.7);
  background: rgba(99, 102, 241, 0.12);
  animation: play-pulse 1.8s ease-out infinite;
}

.play-ring.delay {
  border-color: rgba(129, 140, 248, 0.9);
  background: rgba(99, 102, 241, 0.08);
  animation-delay: 0.35s;
}

.play-btn {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  border: 0;
  border-radius: 999px;
  padding: 6px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-mid), var(--hub-primary-deep));
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.55);
  animation: play-breath 2.4s ease-in-out infinite;
}

.play-btn:active {
  transform: scale(0.94);
  animation: none;
}

.play-btn-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
}

@keyframes play-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@keyframes play-breath {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.game-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.game-frame {
  border: 0;
  background: #000;
  display: block;
}

.game-frame.is-portrait {
  width: 100%;
  height: 100%;
}

.game-frame.is-landscape {
  position: absolute;
  transform-origin: center center;
}

/* ── Spin & Win ─────────────────────────────────────────── */
.spin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.85);
}

.spin-modal.is-open {
  display: flex;
}

.spin-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: 32px;
  padding: 24px 20px 22px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.spin-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.spin-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}

.spin-subtitle {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.4;
  color: #94a3b8;
  font-weight: 600;
}

.spin-alert {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  font-size: 13px;
  font-weight: 700;
}

.spin-alert.is-visible {
  display: flex;
}

.spin-wheel-stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
}

.spin-wheel-glow {
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.12);
}

.spin-wheel {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  border: 8px solid #334155;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  background: conic-gradient(
    from -90deg,
    #ff4757 0deg 60deg,
    #2ed573 60deg 120deg,
    #ffa502 120deg 180deg,
    #3742fa 180deg 240deg,
    #ff6b81 240deg 300deg,
    #70a1ff 300deg 360deg
  );
  will-change: transform;
}

.spin-wheel.is-spinning {
  transition: transform 5s cubic-bezier(0.12, 0, 0.39, 1);
}

.spin-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-origin: center;
  pointer-events: none;
}

.spin-label span {
  display: block;
  min-width: 36px;
  margin-left: -18px;
  text-align: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

.spin-pointer {
  position: absolute;
  top: -6px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}

.spin-pointer-head {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #ff4757;
}

.spin-pointer-stem {
  width: 4px;
  height: 10px;
  margin-top: -28px;
  background: #ff4757;
  border-radius: 2px;
}

.spin-hub {
  position: absolute;
  z-index: 4;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  padding: 4px;
  background: #0f172a;
  border: 2px solid #334155;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.spin-hub-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spin-hub-inner img {
  width: 28px;
  height: 28px;
}

.spin-now-btn {
  width: 100%;
  border: 0;
  border-radius: 24px;
  padding: 16px 24px;
  background: #f59e0b;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.spin-now-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.spin-now-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.spin-now-btn:disabled {
  background: #475569;
  box-shadow: none;
  cursor: not-allowed;
}

.spin-reward {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.9);
}

.spin-reward.is-visible {
  display: flex;
}

.spin-reward-card {
  width: 100%;
  max-width: 320px;
  border-radius: 30px;
  padding: 36px 28px 28px;
  text-align: center;
  background: linear-gradient(160deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
}

.spin-reward.is-visible .spin-reward-card {
  transform: scale(1);
  opacity: 1;
}

.spin-reward-icon {
  font-size: 64px;
  color: #fff;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
  margin-bottom: 12px;
}

.spin-congrats {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
}

.spin-reward-title {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

.spin-won-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.spin-won-row img {
  width: 36px;
  height: 36px;
}

.spin-won-amount {
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.spin-collect-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  background: #fff;
  color: #d97706;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.spin-collect-btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

/* ── AdSense display + custom fallback ───────────────────── */
.ad-section {
  display: block;
  width: 100%;
  padding: 0 12px 12px;
  box-sizing: border-box;
}

.ad-section--hidden {
  padding: 0 12px;
}

.ad-section--adsense .adsbygoogle {
  display: block;
  width: 100%;
}

.ad-section--adsense iframe {
  max-width: 100%;
}

.ad-section--custom {
  display: block;
}

.ad-section--top {
  padding: 8px 12px;
  width: 100%;
  min-height: 90px;
  max-height: 100px;
  overflow: hidden;
}

.ad-section--top.ad-section--pending {
  min-height: 90px;
  max-height: 100px;
}

.ad-section--top.ad-section--loaded {
  min-height: 0;
  max-height: 100px;
}

.ad-section--top .adsbygoogle {
  display: block;
  width: 100% !important;
  min-height: 90px;
  max-height: 100px;
}

.ad-section--top iframe {
  display: block;
  width: 100% !important;
  max-height: 100px !important;
}

.ad-section--top .custom-promo {
  padding: 8px 10px 10px;
  max-height: 100px;
}

.ad-section--top .custom-promo__image {
  max-height: 40px;
  height: 40px;
  margin-bottom: 4px;
}

.ad-section--top .custom-promo__desc {
  display: none;
}

.ad-section--top .custom-promo__btn {
  padding: 6px 10px;
  font-size: 12px;
}

.ad-section--inline,
.ad-section--mid {
  margin: 8px 0;
  padding: 0;
  min-height: 0;
  max-height: 250px;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.ad-section--inline.ad-section--pending,
.ad-section--mid.ad-section--pending {
  min-height: 250px;
  max-height: 250px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.ad-section--inline.ad-section--loaded,
.ad-section--inline.ad-section--custom,
.ad-section--mid.ad-section--loaded,
.ad-section--mid.ad-section--custom {
  min-height: 0;
  max-height: 250px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ad-section--inline .adsbygoogle,
.ad-section--mid .adsbygoogle {
  display: block;
  width: 100% !important;
  height: 250px !important;
  max-height: 250px !important;
  min-height: 0 !important;
  overflow: hidden;
}

.ad-section--inline iframe,
.ad-section--mid iframe {
  display: block;
  width: 100% !important;
  max-height: 250px !important;
}

.ad-section--pending {
  min-height: 0;
}

.ad-section--pending .adsbygoogle {
  display: block;
  width: 100%;
}

.ad-section--mid.ad-section--pending .adsbygoogle,
.ad-section--inline.ad-section--pending .adsbygoogle {
  height: 250px !important;
  max-height: 250px !important;
}

.custom-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  max-height: 250px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  padding: 8px 10px 10px;
  text-align: left;
  box-sizing: border-box;
}

.custom-promo__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.custom-promo__chrome {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 6px;
  pointer-events: none;
}

.custom-promo__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  background: #fbbc04;
  color: #202124;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}

.custom-promo__advertiser {
  flex: 1;
  min-width: 0;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-promo__info {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  font-style: italic;
  display: grid;
  place-items: center;
  line-height: 1;
}

.custom-promo__image {
  position: relative;
  z-index: 2;
  width: 100%;
  display: block;
  flex: 1 1 auto;
  min-height: 100px;
  max-height: 130px;
  height: 130px;
  margin-bottom: 6px;
  border-radius: 10px;
  object-fit: cover;
  background: #0b1220;
  cursor: pointer;
}

.custom-promo__image--fallback {
  min-height: 100px;
  height: 130px;
  max-height: 130px;
  padding: 16px 12px;
  color: #f8fafc;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  background: #1e293b;
}

.custom-promo__copy {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  pointer-events: none;
  margin-bottom: 6px;
}

.custom-promo__title {
  margin: 0;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-promo__desc {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-promo__btn {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #4285f4, #1a73e8);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 115, 232, 0.35);
}

.custom-promo__btn:active {
  transform: scale(0.98);
}

.ad-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.ad-loading-overlay.hidden {
  display: none;
}

.opening-status {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.opening-status.hidden {
  display: none;
}

.opening-status__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.opening-status__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ad-spin 0.8s linear infinite;
}

.opening-status__text {
  margin: 0;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.ad-loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ad-spin 0.8s linear infinite;
}

@keyframes ad-spin {
  to {
    transform: rotate(360deg);
  }
}
