/* ==================================================== 
   ✅ GLOBAL VARIABLES (CSS Custom Properties)
==================================================== */
:root {
  --purple: #4b0082;
  --purple-glass: rgba(75, 0, 130, 0.4);
  --purple-deep: rgba(75, 0, 130, 0.9);
  --white: #ffffff;
  --hover-glow: rgba(255, 255, 255, 0.2);
  --modal-backdrop: rgba(0, 0, 0, 0.6);
  --yellow: #ffcc00;
  --yellow-600: #ffaa00;
  --green: #22c55e;
  --green-700: #16a34a;
}


/* General Styles */
/* ====================================================
   ✅ HARD RESET — prevent mobile/tablet edge gaps
==================================================== */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  position: relative;
  background: #05000a;
  color: #fff;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  touch-action: pan-y pinch-zoom;
}

/* Fixed background layer */
/* Low quality loads immediately. High quality is added later by JS. */
:root {
  --pu-bg-low: url("/Photos/background/Lowquality.webp");
  --pu-bg-high-loaded: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Low-quality background: first thing shown */
body::before {
  z-index: -2;
  background-image: var(--pu-bg-low);
}

/* High-quality background: hidden until JS confirms it is loaded */
body::after {
  z-index: -1;
  background-image: var(--pu-bg-high-loaded);
  opacity: 0;
  transition: opacity 700ms ease;
  will-change: opacity;
}

/* Fade in the high-quality background */
body.pu-bg-high-ready::after {
  opacity: 1;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3000;
  background: rgba(75, 0, 130, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: top 0.5s ease-in-out;
}

header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Hide header when scrolling */
header.hidden {
  top: -80px;
  transition: top 0.6s ease-in-out; /* Smooth slide-up */
}

header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  margin: 0;
}

/* Header title as a link */
.header-inner .site-title { margin: .32em 0; line-height: 1; }
.header-inner .site-title .home-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Optional: subtle hover/focus affordances */
.header-inner .site-title .home-link:hover { opacity: 0.9; }
.header-inner .site-title .home-link:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 4px;
  border-radius: .375rem;
}

/* Group wrappers for logged-in / logged-out states */
#loggedInHeaderGroup,
#loggedOutHeaderGroup {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header Login / Register buttons (logged-out state) */
.header-auth-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;
  min-height: 40px;
  padding: 0 12px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;

  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;

  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ✅ Make logged-out header buttons equal width */
#loggedOutHeaderGroup .header-auth-btn {
  text-align: center;
  justify-content: center;
}


/* Register button – blue primary with soft glow (BASE LOOK) */
.header-auth-btn--primary {
  background: linear-gradient(135deg, #1f7aff, #3ac8ff);
  border-color: rgba(80, 180, 255, 0.95);
  color: #ffffff;
  box-shadow:
    0 0 6px rgba(80, 180, 255, 0.7),
    0 0 14px rgba(58, 200, 255, 0.4);
  position: relative;
  overflow: hidden;
}

/* optional inner rim highlight (looks nice) */
.header-auth-btn--primary::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.26);
  pointer-events: none;
}

/* Login only hover/press (NOT Register) */
.header-auth-btn:not(.header-auth-btn--primary):hover,
.header-auth-btn:not(.header-auth-btn--primary):active {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  color: #ffcc00;
}

/* Register: keep blue background ALWAYS — only text changes */
.header-auth-btn--primary:hover,
.header-auth-btn--primary:focus-visible {
  color: #ffcc00;
}
.header-auth-btn--primary:active {
  /* keep it blue even while clicking */
  color: #ffffff;
}

.header-auth-btn:visited {
  color: #ffffff;
}

/* ====================================================
   ✨ Logged-in PrizeUnbox header collapse animation
==================================================== */

.header-inner .site-title {
  will-change: transform;
}

.header-inner .site-title .home-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-inner .brand-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.header-inner .brand-letter {
  display: inline-block;
  opacity: 1;
  filter: blur(0);
  transform: translateX(0) scale(1);
  transform-origin: center;
  transition:
    opacity 0.35s ease,
    filter 0.55s ease,
    transform 0.75s cubic-bezier(0.2, 0.85, 0.2, 1);
  transition-delay: calc(var(--i) * 24ms);
  will-change: transform, opacity, filter;
}

.header-inner .brand-space {
  width: 0.32em;
}

.header-inner .brand-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;

  opacity: 0;
  transform: scale(0.55) rotate(-8deg);
  transform-origin: center;

  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  color: #ffcc00;
  text-shadow:
    0 0 8px rgba(255, 204, 0, 0.9),
    0 0 18px rgba(255, 204, 0, 0.45);

  transition:
    opacity 0.35s ease,
    transform 0.55s cubic-bezier(0.2, 0.85, 0.2, 1);
  pointer-events: none;
}

/* Logged-in compact state */
body.pu-brand-condensed .header-inner {
  justify-content: flex-start;
}

body.pu-brand-condensed .header-inner .site-title {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  margin: 0;
  transform: none;
  overflow: visible;
}

body.pu-brand-condensed .header-inner .site-title .home-link {
  width: 44px;
  height: 44px;
  min-width: 44px;

  border-radius: 14px;
  overflow: hidden;

  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(135deg, rgba(75, 0, 130, 0.85), rgba(20, 0, 35, 0.92));

  border: 1px solid rgba(255, 204, 0, 0.45);

  box-shadow:
    0 0 10px rgba(255, 204, 0, 0.35),
    0 0 22px rgba(75, 0, 130, 0.7),
    inset 0 0 12px rgba(255, 255, 255, 0.08);
}

body.pu-brand-condensed .header-inner .brand-full {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

body.pu-brand-condensed .header-inner .brand-letter {
  opacity: 0;
  filter: blur(5px);
  transform: translateX(calc(var(--i) * -0.72em)) scale(0.14);
  transition-delay: calc(var(--i) * 18ms);
}

body.pu-brand-condensed .header-inner .brand-mark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.42s;
}

/* Mobile compact P size */
@media (max-width: 768px) {
  body.pu-brand-condensed .header-inner .site-title {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
  }

  body.pu-brand-condensed .header-inner .site-title .home-link {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 10px;
  }

  body.pu-brand-condensed .header-inner .brand-mark {
    font-size: 1.2rem;
  }
}


/* ===== Deposit widget (mirrors homepage) ===== */
.deposit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;
  min-height: 40px;
  padding: 0 12px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  border-radius: 6px;
  border: 1px solid rgba(255, 230, 180, 0.9);
  background: linear-gradient(135deg, #b8860b, #ffd700);
  color: #141814;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;

  box-shadow:
    0 0 6px rgba(255, 215, 0, 0.7),
    0 0 14px rgba(184, 134, 11, 0.5);

  position: relative;
  overflow: hidden;
  z-index: 20;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

/* Inner rim like the Register button */
.deposit-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* Hover/press – brighter gold + green text */
.deposit-btn:hover,
.deposit-btn:active {
  background: linear-gradient(135deg, #ffd700, #ffe87c);
  color: #209e4a; /* ✅ green text highlight */
  border-color: #fff3c2;
  box-shadow:
    0 0 10px rgba(255, 215, 0, 0.9),
    0 0 20px rgba(255, 248, 184, 0.7);
  transform: translateY(-1px);
}
.deposit-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;

  display: none;
  flex-direction: column;
  gap: 8px;

  min-width: 180px;
  padding: 10px;
  border-radius: 10px;

  background: rgba(75, 0, 130, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.deposit-options.show {
  display: flex;
}

/* 🔒 Deposit popup security strip (matches homepage style) */
.payment-security-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
width: 100%;
  margin-left: auto;
  margin-right: auto;

  max-width: min(260px, 100%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}



.payment-security-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  text-align: center;
}

.payment-security-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #3ad169;
  filter: drop-shadow(0 0 3px rgba(58, 209, 105, 0.7));
}

.payment-security-text {
  white-space: normal;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;

  /* ✅ this is the centering fix */
  text-align: center;

  /* ✅ make the text block take real width so centering is meaningful */
  flex: 1;
  min-width: 0;
}

/* your strip uses home-security-brands in the HTML */
.home-security-brands {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-brand-block {
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-logo-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 10px;
}

/* lucide renders SVGs inside the spans */
.payment-security-icon svg,
.brand-logo-icon svg {
  width: 18px;
  height: 18px;
}

/* Preset amounts: like homepage (4 per row) */
.deposit-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* 4-up like homepage */
  gap: 10px;
  justify-items: center;                  /* center buttons in cells */
}
.deposit-buttons button {
  background: #222;
  border: 1px solid white;
  color: white;
  font-weight: bold;
  padding: 8px 12px;                      /* tighter */
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;

  /* allow two-line bonus labels without forcing panel wider */
  white-space: normal;
  line-height: 1.2;
  min-height: 40px;
}
.deposit-buttons button:hover { background: #00bfff; color: black; }

/* 📱 Deposit dropdown — mobile fit */
@media (max-width: 768px) {
  .deposit-options {
    position: fixed;
    top: calc(58px + env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    transform: none;

    width: auto;
    min-width: 0;
    max-width: none;
    max-height: calc(100dvh - 76px);

    padding: 10px;
    gap: 8px;
    box-sizing: border-box;

    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .deposit-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .deposit-buttons button {
    width: 100%;
    min-height: 36px;
    padding: 7px 6px;

    font-size: 0.78rem;
    line-height: 1.15;
    text-align: center;

    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  .payment-security-note {
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    padding-top: 7px;
    gap: 5px;
    box-sizing: border-box;
  }

  .payment-security-header {
    width: 100%;
    gap: 5px;
    align-items: flex-start;
  }

  .payment-security-icon {
    width: 15px;
    height: 15px;
    margin-top: 2px;
  }

  .payment-security-text {
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .home-security-brands {
    gap: 6px;
  }

  .brand-logo-icon,
  .brand-logo-icon svg {
    width: 15px;
    height: 15px;
  }

  .brand-name {
    font-size: 0.62rem;
  }
}

/* 📱 Deposit dropdown — tiny phone safety */
@media (max-width: 380px), (max-height: 620px) {
  .deposit-options {
    top: calc(52px + env(safe-area-inset-top));
    left: 6px;
    right: 6px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 62px);
    padding: 8px;
    gap: 7px;
  }

  .deposit-buttons {
    gap: 7px;
  }

  .deposit-buttons button {
    min-height: 32px;
    padding: 6px 5px;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .payment-security-note {
    margin-top: 4px;
    padding-top: 5px;
  }

  .payment-security-text {
    font-size: 0.62rem;
    line-height: 1.18;
  }

  .brand-name {
    font-size: 0.58rem;
  }
}

.deposit-options.hidden { display: none !important; }

/* Header icon base */
.header-icon-group { position: relative; }

.icon-btn { 
  background: transparent; 
  border: 0; 
  cursor: pointer; 
  display: grid; 
  place-items: center; 
  padding: .99rem; 
}

/* Credit pill */
.credit-pill {
  position: relative; /* keep this for the +$ delta animation */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;

  background: radial-gradient(
    circle at top left,
    rgba(72, 225, 146, 0.32),
    rgba(24, 120, 72, 0.32)
  );
  border: 1px solid rgba(72, 225, 146, 0.95);
  color: #eafff5;

  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(72, 225, 146, 0.75);
}

.credit-pill.show-delta::after {
  content: attr(data-delta);
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translate(-50%, 4px);
  font-size: 12px;
  font-weight: 700;
  color: var(--delta-color, #7ef29a);  /* soft green by default */
  opacity: 0;
  pointer-events: none;
  animation: credit-delta-pop 1.6s ease-out forwards;
}

@keyframes credit-delta-pop {
  0%   { opacity: 0; transform: translate(-50%, 6px); }
  12%  { opacity: 1; transform: translate(-50%, 0);   }
  82%  { opacity: 1; transform: translate(-50%, -2px);}
  100% { opacity: 0; transform: translate(-50%, -6px);}
}

/* Burger Button */
.menu-btn {
  font-size: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid white;
  border-radius: 3px;
  background-color: transparent;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background-color 0.2s ease;
}

.menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}


/* Side Menu */
.menu {
  position: fixed;
  top: 0;
  right: -270px;
  width: 270px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 70px;
  background-color: rgba(75, 0, 130, 0.4);   /* semi-transparent purple */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.4);
  transition: right 0.3s ease;
  z-index: 5000;
  overflow-y: auto;
}

/* Side Menu Open State */
.menu.open {
  right: 0;
}

/* Close Button */
.menu .close-btn {
  font-size: 30px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

/* Side Menu Links */
.menu a {
  color: white;
  padding: 20px;
  text-decoration: none;
  text-align: center;
  font-size: 1.2rem;
  display: block;
}

/* Improve hit area + visuals for menu items (edge-to-edge highlight) */
.menu a,
.menu [role="menuitem"] {
  position: relative;
  display: block;
  border-radius: 0;          /* no rounded pill */
  margin: 0;                 /* remove side gaps so background fills width */
  padding: 14px 22px;        /* comfortable text padding */
  left: 0;                   /* override any earlier offset */
  transition: background-color .2s, transform .08s ease;
}

/* Visible highlight on hover + keyboard focus (full width, no box outline) */
.menu a:hover,
.menu a:focus-visible,
.menu a.is-hover,
.menu [role="menuitem"]:hover,
.menu [role="menuitem"]:focus-visible,
.menu [role="menuitem"].is-hover {
  background-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  outline: none;
}

/* Active (current page) state — also full width */
.menu a.is-active {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

/* Subtle press feedback */
.menu a:active,
.menu [role="menuitem"]:active {
  transform: translateY(1px);
}

/* ✅ Prevent page scroll when menu is open (script toggles this) */
body.no-scroll {
  overflow: hidden;
}

/* ✅ Mobile menu: keep desktop purple glass + half-screen + bottom fade */
@media (max-width: 900px) {
  .menu {
    width: 55vw;
    max-width: 340px;
    right: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;

    /* ✅ keep the desktop colour on mobile */
    background-color: rgba(75, 0, 130, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
  }

  .menu.open {
    transform: translateX(0);
  }

  /* subtle bottom fade (purple, not black) */
  .menu::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(75, 0, 130, 0) 0%,
      rgba(75, 0, 130, 0.55) 100%
    );
  }
}
 
/* Main Content */
main {
  padding-top: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

/* Clipped Wheel Container - Keeps half-wheel effect */
.half-wheel-container {
  position: absolute;
  top: 100px; /* Keeps alignment with the black background */
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 500px; /* Slightly reduced height to hide extra segments */
  overflow: hidden;
  z-index: 1;
  clip-path: inset(-20px 0px 46% 0px);
 /* Hides more of the wheel */
}

/* Keep the top ticker visible within the clipped half-wheel container */
.half-wheel-container .pointer {
  top: 2px;            /* bring it inside the visible area */
  z-index: 4;          /* above the canvas (canvas uses z-index: 2) */
  border-bottom-color: #fff; /* ensure good contrast */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
  transform-origin: 50% 0%;
  pointer-events: none; /* so it never blocks clicks */
}

@keyframes pointerBump {
  0%   { transform: translateX(-50%) rotate(0deg); }
  24%  { transform: translateX(-50%) translateY(-3px) rotate(-24deg); } /* lean back + lift */
  60%  { transform: translateX(-50%) translateY(-1px) rotate(8deg); }   /* spring forward */
  100% { transform: translateX(-50%) rotate(0deg); }
}

.half-wheel-container .pointer.bump {
  animation: pointerBump 140ms ease-out; /* was 110ms */
}

.half-wheel-container .pointer.pointer-up {
  border-bottom: 0;
  border-top: 30px solid #fff; /* flips triangle to point upward */
}

/* ===========================================================
   Metallic Red Pointer Skin (+ inner facet) — ADDITIONS
   =========================================================== */

/* Hide the border-triangle; draw a richer skin with pseudos */
.half-wheel-container .pointer {
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-bottom-color: transparent !important;
  border-top-color: transparent !important; /* covers .pointer-up */
  will-change: transform; /* smoother bump */
}

/* Metallic red face (triangle, points DOWN toward wheel) */
.half-wheel-container .pointer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;                         /* sits inside the container */
  transform: translateX(-50%);
  width: 40px;                    /* overall size of the ticker */
  height: 36px;

  /* cast shadow matching the triangle shape */
  filter: drop-shadow(0 8px 8px rgba(0,0,0,0.45));

  /* DOWN triangle shape */
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);

  /* deep metallic red gradient */
  background: linear-gradient(
    170deg,
    #5a000a 0%,
    #9a0016 30%,
    #d2122e 50%,
    #7b0010 70%,
    #3e0006 100%
  );

  /* subtle outer glow + inner depth */
  box-shadow:
    0 0 10px rgba(210, 18, 46, 0.35),            /* glow */
    inset 0 -6px 10px rgba(0, 0, 0, 0.45),       /* bottom shading */
    inset 0  6px 10px rgba(255, 120, 140, 0.08); /* top sheen */

  border-radius: 3px;  /* tiny rounding to “metal” the edges */
  pointer-events: none;
}



/* Inner facet / single “diamond” angle */
.half-wheel-container .pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 9px;                      /* depth of the facet from the tip */
  transform: translateX(-50%);
  width: 26px;
  height: 14px;
  /* small inverted triangle to suggest a single inner angle */
  clip-path: polygon(50% 100%, 42% 0%, 58% 0%);
  background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0));
  opacity: 0.55;
  mix-blend-mode: screen;        /* metallic highlight feel */
  pointer-events: none;
  top: auto; bottom: 9px;
}

/* If you remove .pointer-up and want a DOWN arrow, flip the skin */
.half-wheel-container .pointer.pointer-up::before {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.half-wheel-container .pointer.pointer-up::after {
  top: 9px; bottom: auto;
  clip-path: polygon(50% 0%, 42% 100%, 58% 100%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 20px; /* consistent padding on both sides */
}

.header-buttons {
  position: absolute;
  right: 50px;  /* keep a safe distance from the edge */
  display: flex;
  align-items: center;
  gap: 13px;
}

/* 🖥 Desktop resize behaviour: keep title centred at normal widths,
   but as the window narrows, nudge the title left so it doesn't collide
   with the right-side header buttons (PC only; mobile has its own rules). */
@media (min-width: 769px) and (max-width: 1200px) {
  .header-inner .site-title {
    transform: translateX(clamp(-240px, calc((100vw - 1200px) / 2), 0px));
  }
}

.icon-btn,
.cart-btn {
  font-size: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--white);
  border-radius: 3px;
  background-color: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.icon-btn:hover,
.cart-btn:hover {
  background-color: var(--hover-glow);
}

.icon-btn i,
.cart-btn i {
  width: 22px;
  height: 22px;
}

.icon-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.icon-btn svg.header-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* The Wheel */
#giveawayWheel {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Center all content below the wheel */
.wheel-section {
  margin-top: 300px; /* Pushes content below the wheel */
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers everything */
}

/* The Pointer */
.pointer {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 30px solid #fff;
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
}

/* centre the fairness text */
.wheel-content { position: relative; }

/* Fairness badge (icon = green shield + subtle glow) */
.fairness-badge__icon {
  color: #39d97b; /* green */
  filter: drop-shadow(0 0 6px rgba(57, 217, 123, 0.45));
  animation: fairnessGlow 2.8s ease-in-out infinite;
}

/* Fairness badge container */
.fairness-badge{
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(57, 217, 123, 0.25);
  background: rgba(10, 20, 15, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 13px;
}

.fairness-badge__text{
  white-space: nowrap;
  line-height: 1;
}

/* Make badge feel clickable + keyboard focus */
.fairness-badge{
  cursor: pointer;
  user-select: none;
}

.fairness-badge:focus-visible{
  outline: 2px solid rgba(57, 217, 123, 0.65);
  outline-offset: 3px;
}

/* Pop-up message under the badge */
.fairness-popover{
  position: absolute;
  top: 44px;          /* sits just below the badge */
  left: 50%;
  width: min(340px, 92vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(57, 217, 123, 0.22);
  background: rgba(8, 14, 12, 0.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  line-height: 1.25;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  transform: translate(-50%, -6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 5;
}

.fairness-popover::before{
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(8, 14, 12, 0.70);
  border-left: 1px solid rgba(57, 217, 123, 0.18);
  border-top: 1px solid rgba(57, 217, 123, 0.18);
  transform: translateX(-50%) rotate(45deg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* visible state */
.fairness-popover.is-open{
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* give the badge room so it doesn't overlap the h2 */
@media (min-width: 901px){
  .wheel-content{
    padding-top: 44px;
  }
}


@keyframes fairnessGlow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(57, 217, 123, 0.30));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(57, 217, 123, 0.70));
  }
}

@media (prefers-reduced-motion: reduce) {
  .fairness-badge__icon {
    animation: none;
  }
}

/* Center "Spin to Win" Text */
.wheel-content h2 {
  text-align: center;
  font-size: 2rem; /* Adjust font size if needed */
  margin-bottom: 20px; /* Adds space between text and button */
}

/* Resize & Center Spin Button */
/* 70s-style rhomboid Spin button with SOFT corners + subtle glowing border + 3D feel */
#spin-btn {
  /* keep your existing basics */
  margin-top: 10px;              /* Space above the button */
  padding: 12px 24px;            /* Button size */
  font-size: 1.5rem;             /* Text size */
  font-weight: bold;
  width: auto;                   /* Prevents full-width stretching */
  display: block;                /* Ensures it behaves as a block for centering */
  margin-left: auto;
  margin-right: auto;
  color: #333;
  cursor: pointer;

  /* new: build shape with layered pseudo-elements */
  position: relative;
  background: none;              /* we paint fills on pseudos */
  border: none;                  /* border drawn by pseudos */
  isolation: isolate;            /* keep shadows/glow contained */

  /* tunables */
  --accent: var(--yellow, #ffd400);
  --accent-dark: var(--yellow-600, #e0b700);
  --skew: -14deg;                /* parallelogram angle */
  --radius: 16px;                /* SOFT corner radius */
  --border: 3px;                 /* border thickness */
}

/* OUTER BORDER + GLOW (skewed rounded parallelogram) */
#spin-btn::before {
  content: "";
  position: absolute;
  inset: 0;                      /* full size */
  transform: skewX(var(--skew));
  border-radius: var(--radius);
  pointer-events: none;
  z-index: -1;

  /* border as a gradient surface */
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));

  /* subtle outer glow that follows the rounded shape */
  filter:
    drop-shadow(0 10px 16px rgba(0,0,0,.22))      /* depth */
    drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 45%, transparent)); /* halo */
}

/* INNER FILL (inset to reveal border) + 3D bevel */
#spin-btn::after {
  content: "";
  position: absolute;
  inset: var(--border);          /* reveal the border from ::before */
  transform: skewX(var(--skew));
  border-radius: calc(var(--radius) - var(--border));
  pointer-events: none;
  z-index: -1;

  /* glossy vertical fill */
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.35) 0%,
      rgba(255,255,255,.10) 35%,
      rgba(0,0,0,.10) 100%
    ),
    linear-gradient(180deg, var(--accent), var(--accent-dark));

  /* inner highlights for 3D */
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.55), /* top inner highlight */
    inset 0 -2px 0 rgba(0,0,0,.22);        /* bottom inner shade */
}

/* HOVER: brighten halo slightly */
#spin-btn:hover::before {
  filter:
    drop-shadow(0 12px 18px rgba(0,0,0,.24))
    drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 60%, transparent));
}

/* ACTIVE: press-down feel */
#spin-btn:active { transform: translateY(1px); }

/* ACCESSIBILITY FOCUS */
#spin-btn:focus-visible {
  outline: 2px dashed color-mix(in srgb, var(--accent) 85%, #000);
  outline-offset: 6px;
}

/* ===== Prize catalogue cards: rarity skins + badge ===== */
.prize-box { position: relative; }

/* Badge chip */
.prize-box .rarity-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.25);
  text-transform: uppercase;
}

/* Value line */
.prize-box .value {
  opacity: 0.95;
  font-weight: 800;
  margin-top: 6px;
}

/* Metallic looks (kept readable on glass background) */
.prize-box.rarity-bronze {
  background: linear-gradient(145deg, rgba(205,127,50,.18), rgba(90,45,20,.18));
  border-color: rgba(205,127,50,.55);
  box-shadow: 0 0 0 1px rgba(205,127,50,.25) inset, 0 10px 20px rgba(0,0,0,.25);
}
.prize-box.rarity-bronze .rarity-badge { color: #ffcf9e; border-color: rgba(205,127,50,.6); }

.prize-box.rarity-silver {
  background: linear-gradient(145deg, rgba(180,180,200,.18), rgba(80,80,95,.18));
  border-color: rgba(200,200,220,.6);
  box-shadow: 0 0 0 1px rgba(200,200,220,.25) inset, 0 10px 20px rgba(0,0,0,.25);
}
.prize-box.rarity-silver .rarity-badge { color: #e6e9ff; border-color: rgba(200,200,220,.6); }

.prize-box.rarity-gold {
  background: linear-gradient(145deg, rgba(255,215,0,.20), rgba(150,110,0,.18));
  border-color: rgba(255,215,0,.7);
  box-shadow: 0 0 0 1px rgba(255,215,0,.35) inset, 0 10px 24px rgba(0,0,0,.28);
}
.prize-box.rarity-gold .rarity-badge { color: #ffeaa7; border-color: rgba(255,215,0,.7); }

/* Slightly larger image for catalogue boxes */
.prize-box img {
  max-width: 120px;
  max-height: 120px;
}

/* === Grid and cards === */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
  padding: 0 0 60px;
  width: 100%;
  max-width: none;              /* FIX: allow full-width layout (was 1200px) */
  align-items: stretch;         /* ensure cards fill their grid cells */
}

.prize-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  transition: transform 0.3s ease;
  display: grid;
  grid-template-rows: 220px auto auto; /* FIX: match media slot height */
  overflow: hidden; 
}

.prize-box .media{
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 8px 0; 
}

/* Centered, consistent sizing; overrides earlier .prize-box img rules */
.prize-box .media img{
  display: block;                           /* remove baseline gap */
  max-height: 100% !important;
  max-width: 100%  !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  margin: 0 !important;                     /* no vertical drift */
}

.prize-box:hover {
  transform: scale(1.05);
}

/* Keep single, consistent image sizing (avoid conflicting 100px override) */
.prize-box img {
  max-width: 120px;            /* FIX: match the earlier "slightly larger" size */
  max-height: 120px;           /* FIX: match for consistency */
  object-fit: contain;
  margin-bottom: 10px;
}

.prize-box h3 {
  margin: 8px 0 0;
  line-height: 1.2;
  min-height: calc(1.2em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;                /* clamp long names */
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.prize-box > img {
  display: none;                         /* hide raw img to prevent overlap */
}

/* Dark Grey Background Behind Spin Text & Button */
.wheel-content {
  background-color: rgba(50, 50, 50, 0.4); /* slightly more transparent */
  backdrop-filter: blur(15px);            /* glass blur */
  -webkit-backdrop-filter: blur(15px);
  color: white;
  padding: 40px 20px;
  width: 100%;
  max-width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: -30px;
  position: relative;
  min-height: calc(100vh - 320px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* Ensure the footer has no extra margins pushing it up */
footer {
  margin: 0;
  padding: 10px;
  background: #333;
  color: white;
  text-align: center;
  width: 100%;
}

/* 🎁 Signup offer modal (wheel page) */
.modal-offer{
  max-width: 420px;
  text-align: center;
}
.modal-offer .offer-text{
  margin: 8px 0 14px;
  font-size: 0.98rem;
  opacity: 0.92;
}
.modal-offer .offer-text strong{
  color: var(--green);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}
@media (max-width: 600px){
  .modal-offer{ max-width: 340px; }
}


/* ====================================================
   🔐 MODALS — Login / Register / Forgot Password
   Demo Wheel visual match for ThrillSeeker
==================================================== */

/* Optional standalone backdrop element.
   Keeps the dark blur behind the modal without darkening the modal card itself. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 6998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Modal overlay */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 7000;
  overflow: auto;
  padding: 0;

  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal.hidden {
  display: none !important;
}

/* Modal card */
.modal .modal-content {
  position: relative;
  width: 90%;
  max-width: 400px;
  margin: 10% auto;
  padding: 30px;
  color: #fff;
  text-align: center;
  border-radius: 14px;
  overflow: hidden;
  animation: fadeIn 0.3s ease-in-out;
  will-change: opacity, transform;

  background:
    linear-gradient(
      135deg,
      rgba(170, 120, 255, 0.18) 0%,
      rgba(130, 70, 255, 0.22) 35%,
      rgba(90, 20, 180, 0.30) 100%
    );

  border: 1px solid rgba(255, 255, 255, 0.24);

  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.52),
    0 0 36px rgba(140, 90, 255, 0.35),
    0 0 12px rgba(180, 130, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);

  backdrop-filter: blur(42px) saturate(135%);
  -webkit-backdrop-filter: blur(42px) saturate(135%);
  background-blend-mode: overlay;
}

#loginModal .modal-content::before,
#registerModal .modal-content::before,
#forgotPasswordModal .modal-content::before,
#logoutConfirmModal .modal-content.modal-confirm::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(200, 150, 255, 0.24), transparent 30%),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.04) 45%,
      rgba(255, 255, 255, 0.025) 100%
    );

  opacity: 1;
}

#loginModal .modal-content::after,
#registerModal .modal-content::after,
#forgotPasswordModal .modal-content::after,
#logoutConfirmModal .modal-content.modal-confirm::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.03);
}

/* Keep actual modal content above shine layer */
.modal .modal-content > * {
  position: relative;
  z-index: 1;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

/* Close X — Demo Wheel style */
.modal .close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  color: #2f2206;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  font-family: Arial, sans-serif;

  cursor: pointer;
  z-index: 10;
  border-radius: 10px;

  background:
    linear-gradient(
      180deg,
      rgba(214, 182, 102, 0.30) 0%,
      rgba(168, 132, 48, 0.26) 52%,
      rgba(110, 80, 20, 0.30) 100%
    );

  border: 1px solid rgba(255, 245, 210, 0.20);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(255, 214, 92, 0.05),
    0 8px 18px rgba(0, 0, 0, 0.22),
    0 0 12px rgba(255, 214, 92, 0.08);

  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);

  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.modal .close:hover {
  color: #1f1604;

  background:
    linear-gradient(
      180deg,
      rgba(232, 200, 116, 0.40) 0%,
      rgba(188, 148, 58, 0.34) 50%,
      rgba(126, 92, 26, 0.38) 100%
    );

  border-color: rgba(255, 245, 210, 0.28);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(255, 222, 89, 0.07),
    0 0 14px rgba(255, 222, 89, 0.10),
    0 10px 22px rgba(0, 0, 0, 0.26);

  transform: translateY(-2px);
}

.modal .close:active {
  transform: translateY(-1px);
}

/* Modal inputs */
.modal .modal-content input,
.modal .modal-content textarea,
.modal .modal-content select {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  padding: 10px 12px;
  box-sizing: border-box;

  font-size: 1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);

  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  outline: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.modal .modal-content input:focus,
.modal .modal-content textarea:focus,
.modal .modal-content select:focus {
  border-color: rgba(120, 210, 255, 0.9);
  background: rgba(255, 255, 255, 0.15);

  box-shadow:
    0 0 0 3px rgba(80, 180, 255, 0.20),
    0 0 18px rgba(80, 180, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.modal .modal-content input::placeholder,
.modal .modal-content textarea::placeholder {
  color: rgba(255, 255, 255, 0.76);
  opacity: 1;
}

/* Primary modal buttons */
.modal-content button {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  padding: 10px;
  box-sizing: border-box;

  color: #f8f5ff;
  font-weight: bold;
  font-size: 16px;

  background:
    linear-gradient(
      180deg,
      rgba(52, 42, 82, 0.96) 0%,
      rgba(28, 22, 48, 0.98) 55%,
      rgba(16, 12, 28, 1) 100%
    );

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.30);

  transition:
    color 0.2s ease,
    text-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

.modal-content button:hover {
  color: #7fdcff;
  text-shadow: 0 0 6px rgba(127, 220, 255, 0.65);
  border-color: rgba(127, 220, 255, 0.42);
  transform: translateY(-1px);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.36),
    0 0 18px rgba(80, 180, 255, 0.18);
}

/* Login modal lower action buttons */
.modal-action-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  max-width: 300px;
  margin: 10px auto;
}

.modal-sub-btn {
  flex: 1;
  padding: 8px;
  font-size: 14px;
}

/* Optional referral code section */
.register-optional {
  width: 100%;
  max-width: 300px;
  margin: 10px auto 0;
  text-align: left;
}

.optional-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
}

/* Registration help section */
.registration-help-header {
  width: 100%;
  max-width: 300px;
  margin: 22px auto 8px;
  padding: 12px;
  box-sizing: border-box;

  display: flex;
  align-items: flex-start;
  gap: 10px;

  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.20);
}

.registration-help-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: rgba(80, 180, 255, 0.18);
  border: 1px solid rgba(80, 180, 255, 0.42);
  color: #9fe7ff;
  font-weight: 800;
  line-height: 1;
}

.registration-help-header h3 {
  margin: 0 0 2px;
  font-size: 0.98rem;
  line-height: 1.2;
}

.registration-help-header p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.82;
}

.registration-help-form {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.registration-help-form input {
  margin-top: 8px;
}

.registration-help-form button {
  margin-top: 8px;
}

/* Busy button state */
.button--busy,
#registerForm button[type="submit"].button--busy,
#registrationHelpSubmit.button--busy {
  opacity: 0.65;
  pointer-events: none;
  filter: grayscale(10%);
}

/* Field error highlight */
#registerForm .pu-field-error,
#registrationHelpForm .pu-field-error {
  border-color: rgba(255, 78, 112, 0.98) !important;
  background: rgba(255, 78, 112, 0.16) !important;
  color: #fff !important;

  box-shadow:
    0 0 0 3px rgba(255, 78, 112, 0.24),
    0 0 18px rgba(255, 78, 112, 0.65),
    0 0 34px rgba(255, 78, 112, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;

  animation: puFieldErrorFlash 0.85s ease-in-out 0s 2;
}

#registerForm .pu-field-error:focus,
#registrationHelpForm .pu-field-error:focus {
  border-color: rgba(255, 120, 150, 1) !important;

  box-shadow:
    0 0 0 4px rgba(255, 78, 112, 0.28),
    0 0 22px rgba(255, 78, 112, 0.78),
    0 0 42px rgba(255, 78, 112, 0.34) !important;
}

#registerForm .pu-field-error::placeholder,
#registrationHelpForm .pu-field-error::placeholder {
  color: rgba(255, 225, 232, 0.9);
}

@keyframes puFieldErrorFlash {
  0% {
    transform: translateX(0);
    filter: brightness(1);
  }

  18% {
    transform: translateX(-4px);
    filter: brightness(1.18);
  }

  36% {
    transform: translateX(4px);
  }

  54% {
    transform: translateX(-3px);
  }

  72% {
    transform: translateX(3px);
  }

  100% {
    transform: translateX(0);
    filter: brightness(1);
  }
}

/* Register modal: "Already have an account?" login switch */
.register-login-switch {
  margin-top: 10px;
  text-align: center;
}

.register-login-switch p {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.3;
}

/* Full-width dark Login button under register modal */
.modal-switch-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 11px 12px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;

  background: linear-gradient(180deg, #1b102f 0%, #0f071b 100%);
  color: #ffffff;

  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;

  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  transition:
    transform 0.08s ease,
    filter 0.2s ease,
    border-color 0.2s ease;
}

.modal-switch-btn:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.modal-switch-btn:active {
  transform: translateY(1px);
}

/* 🔓 Logout confirm modal — checkout cart visual match */
#logoutConfirmModal .modal-content.modal-confirm {
  max-width: 400px;
  text-align: center;
}

#logoutConfirmModal .modal-content.modal-confirm h2 {
  margin-top: 0;
  margin-bottom: 14px;
  color: #ffffff;
  text-shadow:
    0 0 12px rgba(155, 136, 255, 0.30),
    0 0 24px rgba(75, 0, 130, 0.18);
}

#logoutConfirmModal .modal-content.modal-confirm p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  opacity: 1;
}

#logoutConfirmModal .modal-confirm-actions {
  display: block;
  margin-top: 4px;
}

#logoutConfirmModal .modal-confirm-actions button {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin: 10px auto;
  border-radius: 10px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  display: block;
}

/* Stay logged in button — checkout cart dark purple match */
#logoutConfirmModal .modal-alt-btn {
  flex: initial;
  padding: 10px;
  margin: 10px auto;

  background:
    linear-gradient(
      180deg,
      rgba(52, 42, 82, 0.96) 0%,
      rgba(28, 22, 48, 0.98) 55%,
      rgba(16, 12, 28, 1) 100%
    );

  color: #f8f5ff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;

  font-size: 16px;
  font-weight: bold;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(155, 136, 255, 0.10);

  transition:
    color 0.3s ease,
    text-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.18s ease;
}

#logoutConfirmModal .modal-alt-btn:hover {
  color: #8fd8ff;
  text-shadow: 0 0 10px rgba(143, 216, 255, 0.45);

  background:
    linear-gradient(
      180deg,
      rgba(70, 56, 108, 0.98) 0%,
      rgba(38, 28, 64, 1) 55%,
      rgba(20, 14, 34, 1) 100%
    );

  border-color: rgba(143, 216, 255, 0.22);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(143, 216, 255, 0.06),
    0 0 18px rgba(143, 216, 255, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.30);

  transform: translateY(-1px);
}

/* Log out button — checkout cart style */
#logoutConfirmModal .modal-danger-btn {
  background:
    linear-gradient(
      180deg,
      rgba(58, 20, 28, 0.96) 0%,
      rgba(28, 10, 16, 0.98) 100%
    ) !important;

  border: 1px solid rgba(255, 124, 150, 0.16) !important;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

#logoutConfirmModal .modal-danger-btn:hover {
  color: #ff9db1 !important;
  border-color: rgba(255, 124, 150, 0.30) !important;

  box-shadow:
    0 0 14px rgba(255, 124, 150, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.28) !important;

  transform: translateY(-1px);
}

#logoutConfirmModal .modal-alt-btn:active,
#logoutConfirmModal .modal-danger-btn:active {
  transform: translateY(0);
}

/* ====================================================
   📱 MOBILE AUTH MODAL POSITIONING
   Login / Register / Forgot Password / Logout
==================================================== */
@media (max-width: 600px) {
  #loginModal,
  #registerModal,
  #forgotPasswordModal,
  #logoutConfirmModal {
    padding: 14px 0 22px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #loginModal .modal-content,
  #registerModal .modal-content,
  #forgotPasswordModal .modal-content,
  #logoutConfirmModal .modal-content {
    box-sizing: border-box;
    width: calc(100vw - 28px);
    max-width: 360px;
    max-height: calc(100dvh - 44px);
    margin: clamp(18px, 8vh, 56px) auto 22px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #logoutConfirmModal .modal-confirm-actions button {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 380px), (max-height: 620px) {
  #loginModal .modal-content,
  #registerModal .modal-content,
  #forgotPasswordModal .modal-content,
  #logoutConfirmModal .modal-content {
    width: calc(100vw - 20px);
    max-width: 340px;
    max-height: calc(100dvh - 32px);
    margin-top: 16px;
    padding: 18px 14px;
  }

  #logoutConfirmModal .modal-content.modal-confirm h2 {
    font-size: 1.35rem;
    margin-bottom: 10px;
  }

  #logoutConfirmModal .modal-content.modal-confirm p {
    font-size: 0.9rem;
  }

  #logoutConfirmModal .modal-confirm-actions button {
    margin: 8px auto;
    padding: 9px;
    font-size: 0.95rem;
  }
}

/* 🏆 Win Modal tweaks — centered prize modal */
#prizeWinModal .modal-content {
  max-width: 520px;
  text-align: center;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  justify-items: center;
}

#prizeWinModal #winModalTitle {
  grid-column: 1 / -1;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#prizeWinModal .win-media {
  grid-column: 1 / -1;
  justify-self: center;
}

#prizeWinModal #winItemImage {
  width: 190px;
  height: 190px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

#prizeWinModal .win-meta {
  grid-column: 1 / -1;
  width: 100%;
  line-height: 1.35;
  text-align: center;
}

#prizeWinModal #winItemTitle {
  font-size: 1.15rem;
  margin: 0 0 6px 0;
  text-align: center;
}

#prizeWinModal #winItemValue {
  font-weight: 700;
  opacity: 0.95;
  text-align: center;
}

#prizeWinModal .win-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

/* Action buttons inside win modal */
#winAddToCartBtn,
#winCashBackBtn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(17, 17, 17, 0.9);
  color: #f5f5f5;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

#winAddToCartBtn:hover,
#winCashBackBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(34, 34, 34, 0.95);
}

#winAddToCartBtn {
  box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.25);
}

#winAddToCartBtn:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.6);
}

#winCashBackBtn {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}

#winCashBackBtn:hover {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.6);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-20px); }
}

/* Tooltip anchor to avoid intercepting clicks on icon buttons */
.tooltip-anchor {
  position: absolute;
  inset: 0;
  pointer-events: none; /* prevent capturing the click */
}

/* Logged-in glow on login icon btn */
#loginBtn.logged-in {
  box-shadow:
    0 0 25px rgba(0, 123, 255, 1),
    0 0 50px rgba(0, 123, 255, 0.9),
    0 0 80px rgba(0, 123, 255, 0.7);
  transition: box-shadow 0.3s ease;
}

/* Autofill tweaks — lighter purple glass like checkout cart */
.modal .modal-content input:-webkit-autofill,
.modal .modal-content input:-webkit-autofill:hover,
.modal .modal-content input:-webkit-autofill:focus,
.modal .modal-content input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(75, 0, 130, 0.45) inset !important;
  box-shadow: 0 0 0 1000px rgba(75, 0, 130, 0.45) inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}

.modal .modal-content input:-moz-autofill {
  box-shadow: 0 0 0 1000px rgba(75, 0, 130, 0.45) inset !important;
  -moz-box-shadow: 0 0 0 1000px rgba(75, 0, 130, 0.45) inset !important;
  -moz-text-fill-color: #fff !important;
  caret-color: #fff;
}
input { background-color: var(--purple-deep); color: #fff; caret-color: #fff; }


/* Optional scrollbar theming for visual parity */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(75, 0, 130, 0.3);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(75, 0, 130, 0.8);
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(75, 0, 130, 1);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(75, 0, 130, 0.8) rgba(75, 0, 130, 0.3);
}

/* Generic utility used by your JS to toggle visibility */
.hidden { display: none !important; }

/* Mobile adjustments for modals (these help your existing modals incl. #prizeWinModal) */
@media (max-width: 768px) {
  main { padding-top: 68px !important; } 
  .modal-content {
    padding: 20px;
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  #prizeWinModal {
    padding: 76px 10px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #prizeWinModal .modal-content {
    box-sizing: border-box;
    width: min(92vw, 360px);
    max-width: 360px;
    max-height: calc(100dvh - 104px);
    margin: 0 auto;
    padding: 18px 16px 16px;

    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;

    text-align: center;
    align-items: center;
    justify-items: center;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #prizeWinModal #winModalTitle {
    grid-column: 1 / -1;
    margin: 0 34px 2px;
    font-size: clamp(1.25rem, 6vw, 1.65rem);
    line-height: 1.1;
  }

  #prizeWinModal .win-media {
    grid-column: 1 / -1;
    justify-self: center;
  }

  #prizeWinModal #winItemImage {
    width: clamp(125px, 42vw, 165px);
    height: clamp(125px, 42vw, 165px);
  }

  #prizeWinModal .win-meta {
    grid-column: 1 / -1;
    width: 100%;
    line-height: 1.25;
  }

  #prizeWinModal #winItemTitle {
    font-size: clamp(1rem, 4.6vw, 1.18rem);
    line-height: 1.18;
    margin: 0 0 4px;
    overflow-wrap: anywhere;
  }

  #prizeWinModal #winItemValue {
    font-size: 0.95rem;
  }

  #prizeWinModal .win-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
  }

  #prizeWinModal .win-actions button {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 9px 10px;
    font-size: 0.98rem;
  }

  .modal-content input,
  .modal-content button {
    font-size: 1rem;
    padding: 8px;
  }

  .modal-action-buttons {
    flex-direction: column;
  }

  .modal-sub-btn {
    font-size: 1rem;
    padding: 10px;
  }
}

@media (max-width: 380px), (max-height: 620px) {
  #prizeWinModal {
    padding-top: 66px;
  }

  #prizeWinModal .modal-content {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 84px);
    padding: 15px 13px 13px;
    gap: 8px;
  }

  #prizeWinModal .close {
    width: 30px;
    height: 30px;
    font-size: 26px;
    top: 8px;
    right: 8px;
  }

  #prizeWinModal #winItemImage {
    width: 112px;
    height: 112px;
  }

  #prizeWinModal #winModalTitle {
    font-size: 1.18rem;
  }

  #prizeWinModal #winItemTitle {
    font-size: 0.98rem;
  }

  #prizeWinModal #winItemValue {
    font-size: 0.88rem;
  }
}


/* === Header icon row: keep cart/login/menu side-by-side === */
.header-icon-group {
  position: relative;           /* you already had this */
  display: flex;                /* make children line up horizontally */
  align-items: center;
  gap: 6px;                     /* space between icons */
}

@media (min-width: 901px) {
  .header-icon-group { gap: 8px; }
}

/* Ensure icon buttons are uniform size and don't stretch */
.icon-btn,
.login-btn,
.menu-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  line-height: 0;
}


/* Lucide SVG icons */
.header-icon-group i[data-lucide] {
  width: 22px;
  height: 22px;
}

/* The login icon is an <img> — match sizes to Lucide */
.header-icon-group .login-btn img {
  width: 22px;
  height: 22px;
  display: block;               /* remove baseline gap */
}

/* Keep the dropdown anchored to the right of the group */
.header-icon-group .dropdown-panel {
  right: 0;
  left: auto;
}

/* ====================================================
   🔔 Toast popups — Demo Wheel style
==================================================== */
.pu-toast {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;

  display: flex;
  align-items: center;
  gap: 10px;

  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 16px;

  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 20, 35, 0.78);
  color: #ffffff;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.pu-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.pu-toast-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
}

.pu-toast-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.pu-toast.is-success {
  background: rgba(20, 255, 140, 0.16);
  border-color: rgba(20, 255, 140, 0.38);
}

.pu-toast.is-success .pu-toast-icon {
  background: rgba(20, 255, 140, 0.18);
  color: #83ffbf;
}

.pu-toast.is-error {
  background: rgba(255, 78, 112, 0.18);
  border-color: rgba(255, 78, 112, 0.42);
}

.pu-toast.is-error .pu-toast-icon {
  background: rgba(255, 78, 112, 0.20);
  color: #ff9aad;
}

.pu-toast.is-login {
  background: rgba(80, 180, 255, 0.17);
  border-color: rgba(80, 180, 255, 0.40);
}

.pu-toast.is-login .pu-toast-icon {
  background: rgba(80, 180, 255, 0.20);
  color: #9fe7ff;
}

.pu-toast.is-warn {
  background: rgba(255, 204, 0, 0.16);
  border-color: rgba(255, 204, 0, 0.38);
}

.pu-toast.is-warn .pu-toast-icon {
  background: rgba(255, 204, 0, 0.20);
  color: #ffe27a;
}

.pu-toast-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: puToastSpin 0.75s linear infinite;
}

@keyframes puToastSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .pu-toast {
    left: 12px;
    right: 12px;
    top: 80px;
    justify-content: center;
    max-width: none;
  }
}

/* ✅ Login toast (homepage 1:1) */
.login-toast {
  position: fixed;
  top: 90px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(20, 255, 140, 0.15);
  border: 1px solid rgba(20, 255, 140, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}

.login-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.login-toast-icon {
  font-size: 16px;
  line-height: 1;
}

.login-toast-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

@media (max-width: 600px) {
  .login-toast {
    left: 12px;
    right: 12px;
    top: 80px;
    justify-content: center;
  }
}

/* 🔓 Logout confirm modal (homepage 1:1) */
.modal-confirm {
  max-width: 360px;
  text-align: center;
}

.modal-confirm h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.modal-confirm p {
  margin: 0 0 16px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.modal-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Secondary button (cancel) */
.modal-alt-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.modal-alt-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

/* Destructive / confirm logout button */
.modal-danger-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 120, 0.9);
  background: linear-gradient(135deg, #8b0000, #ff4c4c);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  box-shadow:
    0 0 6px rgba(255, 120, 120, 0.7),
    0 0 14px rgba(139, 0, 0, 0.5);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease,
    border-color 0.2s ease;
}

.modal-danger-btn:hover {
  background: linear-gradient(135deg, #ff5f5f, #ff8585);
  border-color: #ffd2d2;
  box-shadow:
    0 0 10px rgba(255, 150, 150, 0.9),
    0 0 20px rgba(255, 200, 200, 0.7);
  transform: translateY(-1px);
}

/* ✅ Fairness badge tick colour */
.fairness-badge__icon {
  color: var(--green);
}

/* =========================
   Side Menu overlay + mobile sizing (wheel page)
   ========================= */
.menu-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 4990; /* just under .menu (z-index:5000) */
}

.menu.open + .menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.no-scroll{
  overflow: hidden;
}

/* ✅ Logged-out header buttons — match homepage sizing (no forced widths) */
#loggedOutHeaderGroup{
  display: flex;
  align-items: center;
  gap: 4px;
}

#loggedOutHeaderGroup .header-auth-btn{
  /* normalise <a> and <button> so they size the same */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* match your base button styling */
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;

  /* 🔥 kill the “big button” behaviour from earlier rules */
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;

  white-space: nowrap;
  line-height: 1;
}

/* Extra safety in case --info has any weird overrides elsewhere */
#loggedOutHeaderGroup .header-auth-btn--info {
  width: 160px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  flex: 0 0 160px !important;
  padding: 6px 12px !important;
}



@media (max-width: 900px){
  .menu{
    width: 55vw;
    max-width: 340px;
    right: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;

    /* ✅ purple glass that fades off at the bottom */
    background: linear-gradient(
      180deg,
      rgba(75, 0, 130, 0.42) 0%,
      rgba(75, 0, 130, 0.26) 65%,
      rgba(75, 0, 130, 0.00) 100%
    );

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
  }

  .menu.open{
    transform: translateX(0);
  }

  .menu.closing{
    transform: translateX(100%);
  }

  /* Optional: you can remove this now since the menu itself fades */
  .menu::before{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    pointer-events: none;
  }
}


/* =========================
   MOBILE / TABLET — Large cropped wheel hero
   Softer sizing so the centre circle does not dominate
========================= */
@media (max-width: 1100px) {
  .wheel-section {
    margin-top: 0 !important;
    align-items: stretch !important;
  }

  main,
  .wheel-section,
  .wheel-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .half-wheel-container {
    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;
    height: var(--wheel-band-height) !important;
    min-height: var(--wheel-band-height) !important;

    margin: 0 !important;
    padding: 0 !important;

    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;

    overflow: hidden !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;

    box-sizing: border-box !important;
    z-index: 1 !important;
  }

  #giveawayWheel,
  #giveawayWheelReflection,
  .clarity-wheel-mirror {
    position: absolute !important;

    top: var(--wheel-canvas-top) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;

    width: var(--wheel-canvas-size) !important;
    height: var(--wheel-canvas-size) !important;
    max-width: none !important;
    max-height: none !important;

    transform: translateX(-50%) !important;
    display: block !important;
  }

  .clarity-wheel-mirror {
    z-index: 1 !important;
    pointer-events: none !important;
  }

  .half-wheel-container .pointer {
    position: absolute !important;
    left: 50% !important;
    top: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 4 !important;
  }

  .half-wheel-container .pointer::before {
    width: var(--pointer-size-phone);
    height: calc(var(--pointer-size-phone) * 0.9);
  }

  .wheel-content {
    margin: 0 !important;
    padding-top: 58px !important;
    border-top: 0 !important;
    min-height: auto !important;
    justify-content: flex-start !important;
  }

  .fairness-badge {
    top: 14px !important;
  }

  .fairness-popover {
    top: 58px !important;
  }

  .wheel-content h2 {
    margin-top: 0 !important;
  }

  .prize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding-bottom: 80px !important;
  }
}

/* Phones */
@media (max-width: 900px) {
  :root {
    --wheel-band-height: clamp(245px, 64vw, 325px);
    --wheel-canvas-size: clamp(520px, 132vw, 650px);
    --wheel-canvas-top: clamp(0px, 1vw, 10px);
    --pointer-size-phone: 30px;
  }
}

/* iPad / tablet widths */
@media (min-width: 901px) and (max-width: 1100px) {
  :root {
    --wheel-band-height: clamp(330px, 42vw, 430px);
    --wheel-canvas-size: clamp(780px, 92vw, 980px);
    --wheel-canvas-top: clamp(0px, 1.5vw, 18px);
    --pointer-size-phone: 34px;
  }

  .wheel-content {
    padding-top: 62px !important;
  }
}

/* Very small phones */
@media (max-width: 390px) {
  :root {
    --wheel-band-height: clamp(230px, 64vw, 280px);
    --wheel-canvas-size: clamp(500px, 132vw, 600px);
    --wheel-canvas-top: clamp(2px, 1vw, 10px);
    --pointer-size-phone: 28px;
  }
}

/* ====================================================
   📱 MOBILE HEADER — Demo Wheel compatibility sizing
   Mobile only. Desktop untouched.
==================================================== */
@media (max-width: 768px) {
  header {
    position: fixed;
    inset: 0 0 auto 0;
    width: 100%;
    min-height: 60px;
    height: 60px;
    padding: 10px 8px;
    box-sizing: border-box;
    overflow: visible;
    transition: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  header.hidden {
    top: 0;
    transition: none;
  }

  .header-inner {
    width: 100%;
    max-width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;

    height: 40px;
    min-height: 40px;

    padding: 0;
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: 0;

    flex-wrap: nowrap;
    position: relative;
    overflow: visible;
    z-index: 10;
    box-sizing: border-box;
  }

  .header-inner .site-title {
    position: static;
    left: auto;
    transform: none;

    margin: 0;
    text-align: left;
    order: -1;

    flex: 0 1 auto;
    min-width: 0;
    max-width: none;

    line-height: 1;
    font-size: 1.35rem;
    letter-spacing: 0.35px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-inline-start: 0;
  }

  .header-inner .site-title .home-link {
    display: block;
    color: inherit;
    text-decoration: none;

    line-height: 1;
    font-size: inherit;
    letter-spacing: inherit;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-buttons {
    margin-left: auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    order: 2;
    min-height: 40px;
    height: 40px;

    padding: 0;
    position: static;
    inset: auto;
    right: auto;
    left: auto;

    transform: none;
    margin-right: -8px;

    flex: 0 0 auto;
    min-width: 0;
    z-index: 10;
    overflow: visible;
    box-sizing: border-box;
  }

  .header-icon-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    position: relative;

    min-height: 40px;
    height: 40px;

    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  #loggedOutHeaderGroup,
  #loggedInHeaderGroup {
    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;
    flex: 0 1 auto;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .deposit-btn,
  #loggedOutHeaderGroup .header-auth-btn,
  #loggedInHeaderGroup .header-auth-btn {
    height: 28px !important;
    min-height: 28px !important;

    padding: 0 6px !important;
    font-size: 0.62rem !important;
    line-height: 28px !important;

    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;

    white-space: nowrap;
    box-sizing: border-box;
  }

  .icon-btn,
  .menu-btn,
  .login-btn,
  .cart-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;

    flex: 0 0 28px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    line-height: 1;
    box-sizing: border-box;
  }

  .menu-btn {
    font-size: 18px;
  }

  .icon-btn i,
  .cart-btn i,
  .menu-btn i,
  .icon-btn svg,
  .cart-btn svg,
  .menu-btn svg {
    width: 18px;
    height: 18px;
  }

  .icon-btn img,
  .login-btn img {
    width: 18px;
    height: 18px;
    display: block;
  }

  .credit-pill {
    height: 28px;
    min-height: 28px;
    padding: 0 6px;

    font-size: 0.64rem;
    line-height: 28px;

    max-width: 74px;
    box-sizing: border-box;
  }
}

/* Very small phones */
@media (max-width: 390px) {
  .deposit-btn {
    height: 28px;
    min-height: 28px;
    padding: 0 6px;
    font-size: 0.62rem;
    line-height: 28px;
  }

  .credit-pill {
    height: 28px;
    min-height: 28px;
    padding: 0 6px;

    font-size: 0.64rem;
    line-height: 28px;

    max-width: 82px;
    box-sizing: border-box;
  }

  .icon-btn,
  .login-btn,
  .cart-btn,
  .menu-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;

    padding: 0;
    box-sizing: border-box;
  }

  .icon-btn i,
  .cart-btn i,
  .menu-btn i,
  .icon-btn svg,
  .cart-btn svg,
  .menu-btn svg {
    width: 18px;
    height: 18px;
  }

  .icon-btn img,
  .login-btn img {
    width: 18px;
    height: 18px;
    display: block;
  }

  .credit-pill.show-delta::after {
    font-size: 11px;
    top: calc(100% + 2px);
    transform: translate(-50%, 2px);
  }
}

/* ====================================================
   📱 MOBILE HAMBURGER FIX
   Prevent menu button being squished on narrow devices
==================================================== */
@media (max-width: 768px) {
  #menuBtn.menu-btn,
  .header-icon-group #menuBtn.menu-btn,
  button#menuBtn.icon-btn {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;

    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;

    flex: 0 0 28px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;

    aspect-ratio: 1 / 1;
    padding: 0 !important;
    box-sizing: border-box;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  #menuBtn.menu-btn i,
  #menuBtn.menu-btn svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex: 0 0 18px !important;
  }

  .header-icon-group {
    flex-shrink: 0;
  }

  #loggedOutHeaderGroup {
    flex-shrink: 1;
    min-width: 0;
  }
}

/* Very small phones */
@media (max-width: 390px) {
  .deposit-btn { font-size: 12.5px; padding: 6px 9px; }
  .credit-pill {
    max-width: 48vw; font-size: 12.5px; padding: 6px 9px;
  }
  /* nudge the delta slightly closer & smaller on tiny screens */
  .credit-pill.show-delta::after {
    font-size: 11px;
    top: calc(100% + 2px);
    transform: translate(-50%, 2px);
  }
  .icon-btn, .login-btn, .menu-btn { width: 38px; height: 38px; }
}