  /* Reset and Base Styles */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  /* body {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background: url("/spinner-assets/background.jpeg") no-repeat center center fixed;
    background-size: cover;
  } */

   /* Overlay to deepen the background mood */
   /* body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
  } */

  /* Ensure children sit above the overlay */
  .center-wrapper > * {
    position: relative;
    z-index: 1;
  }

  /* Wheel Container: Circular, Glowing, and Responsive */
  #spin_the_wheel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    border-radius: 50%;
    margin-bottom: 20px;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  /* Wheel Canvas: Keep it Circular with a Glossy Gold Border */
  #wheel {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 12px solid #d4af37;
    box-shadow:
      0 0 30px 10px rgba(255, 215, 0, 0.55),
      0 0 60px 18px rgba(255, 170, 0, 0.35),
      inset 0 0 15px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1;
  }

  /* Spin Button (Central Element on the Wheel) – remains unchanged */
  #spin {
    --arrow-shaft-length: 4rem; /* Length of the arrow shaft */
    --arrow-head-height: 2.5rem; /* Height of the arrowhead */
    --arrow-head-width: 1.2rem; /* Half-width of the arrowhead */
    font: 1.5em/0 "Lato", sans-serif;
    user-select: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12%;
    height: 12%;
    margin: -6%;
    background: #d4af37;
    color: #000;
    border-radius: 50%;
    transition: 0.8s;
    z-index: 2;
    box-shadow: 0 0 0 8px currentColor, 0 0 15px 5px rgba(0, 0, 0, 0.6);
  }

  /* Arrow Shaft – extends upward from the circle.
      Its dimensions (width and height) are defined as percentages of #spin's size. */
  #spin::before {
    content: "";
    position: absolute;
    bottom: 100%; /* Starts at the top edge of the circle */
    left: 50%;
    transform: translateX(-50%);
    width: 20%; /* Slightly thicker shaft for a bolder arrow */
    height: 75%; /* Shorter shaft (was 150%) */
    background: currentColor;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.3));
  }

  /* Arrow Head – created using a clip-path triangle.
      It sits exactly at the end of the shaft and scales with #spin. */
  #spin::after {
    content: "";
    position: absolute;
    /* Position it so that its bottom touches the top of the shaft.
        Total offset = 100% (spin button height) + 75% (shaft length) */
    bottom: calc(100% + 75%);
    left: 50%;
    transform: translateX(-50%);
    width: 40%; /* Wider arrow head for more visual weight */
    height: 40%; /* Taller arrow head for more visual weight */
    background: currentColor;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.3));
  }


  /* Spinner Button Below the Wheel */
  #spinner_btn_div {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #spinner_btn {
    font-family: "Lato", sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 215, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  }

  #spinner_btn:active {
    transform: scale(0.95);
  }


  .blob {
    height: 50px;
    width: 50px;
    color: #ffcc00;
    position: absolute;
    top: 45%;
    left: 45%;
    z-index: 1;
    font-size: 30px;
    display: none;	
  }

  /* Spinner modal: full-screen, transparent chrome */
  #spinnerModal .modal-dialog {
    max-width: none;
    width: 100vw;
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #spinnerModal .modal-content {
    width: 100%;
    height: 100%;
    background: transparent !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  #spinnerModal .modal-body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
  }

  #spinnerModal .center-wrapper {
    gap: 24px;
    width: 100%;
  }

  /* Upsize the wheel for a casino feel while staying responsive */
  #spin_the_wheel {
    width: min(80vw, 80vh);
    max-width: 720px;
  }

  #spinner_btn {
    padding: 20px 60px;
    font-size: 1.6em;
  }

  #spinner_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: saturate(60%);
  }

  /* Keep wheel/button visible on short viewports */
  @media (max-height: 700px) {
    #spinnerModal .modal-body {
      padding: 12px;
    }

    #spin_the_wheel {
      width: min(78vw, 60vh);
      max-width: 620px;
    }

    #spinner_btn {
      padding: 16px 44px;
      font-size: 1.3em;
    }
  }

  /* Popup Container */
  .popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3); /* Slight dark overlay */
    backdrop-filter: blur(10px); /* Glass effect */
    z-index: 9999;
  }

  /* Popup Content (Glassmorphic Effect) */
  .popup-content {
    padding: 30px;
    text-align: center;
    width: 100%;
  }

  /* Congrats Text */
  .congrats h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    color: #fff;
    text-shadow: 3px 3px 10px rgba(255, 255, 255, 0.8), 0px 0px 5px rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
  }

  /* Stars Animation */
  .stars-container {
    position: relative;
    height: 80px;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 9999;
  }

  .lock-icon-container {
    text-align: center;
  }

  /* RESPONSIVENESS */
  @media (max-width: 480px) {
    .popup-content {
        width: 100%;
        padding: 20px;
    }

    .congrats h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }
  }

  /* Responsive Adjustments for Smaller Screens */
  @media (max-width: 767px) {
    .center-wrapper {
      padding: 20px;
    }

    #spin_the_wheel {
      width: 90%;
      height: auto;
    }

    #wheel {
      border-width: 10px;
    }

    #spin {
      width: 15%;
      height: 15%;
      margin: -7.5%;
    }

    #spinner_btn {
      padding: 12px 30px;
      font-size: 1.2em;
    }
  }

  /* Optional: further tweak on small screens */
  @media (max-width: 767px) {
    #spin {
      /* --arrow-shaft-length: 200%; */
      --arrow-head-height: 115%;
      --arrow-head-width: 45%;
    }

    /* Spin Button (Central Element on the Wheel) */
    #spin {
      font: 1.5em/0 "Lato", sans-serif;
      user-select: none;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
      position: absolute;
      top: 50%;
      left: 50%;
      width: 18%;
      height: 18%;
      margin: -9%;
      background: #d4af37;
      color: #000;
      border-radius: 50%;
      transition: 0.8s;
      z-index: 2;
      box-shadow: 0 0 0 8px currentColor, 0 0 15px 5px rgba(0, 0, 0, 0.6);
    }

    /* Arrow Shaft: a slim line extending upward from the circle */
    #spin::before {
      content: "";
      position: absolute;
      bottom: 100%; /* start at the top edge of the circle */
      left: 50%;
      transform: translateX(-50%);
      width: 0.45rem; /* Thicker shaft on small screens */
      height: var(--arrow-shaft-length);
      background: currentColor;
      filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.3));
    }

    /* Arrow Head: a larger triangle at the end of the shaft */
    #spin::after {
      content: "";
      position: absolute;
      bottom: calc(
        100% + var(--arrow-shaft-length)
      ); /* place arrowhead at top of shaft */
      left: 50%;
      transform: translateX(-50%);
      border-left: var(--arrow-head-width) solid transparent;
      border-right: var(--arrow-head-width) solid transparent;
      border-bottom: var(--arrow-head-height) solid currentColor;
      filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.3));
    }
  }
