/* ====================================================
   ✅ 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);
}


/* General Styles */
body {
  background-image: url('https://wallpaperaccess.com/full/322494.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* 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;
}

/* 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;
}


/* 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 */
}

.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;
}


.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;
}


/* 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%);
}

/* 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 */
#spin-btn {
  margin-top: 10px; /* Space above the button */
  padding: 12px 24px; /* Reduce button size */
  font-size: 1.5rem; /* Adjust text size */
  font-weight: bold;
  border: none;
  border-radius: 8px; /* Slightly rounded corners */
  background-color: #ffcc00;
  color: #333;
  cursor: pointer;
  width: auto; /* Prevents full-width stretching */
  display: block; /* Ensures it behaves as a block for centering */
  margin-left: auto;
  margin-right: auto;
}

#spin-btn:hover {
  background-color: #ffaa00;
}


/* 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: 100vw;
  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;
}

@media (max-width: 768px) {
  .menu {
    width: 100%;
    right: -100%;
  }
  .menu.open {
    right: 0;
  }
}


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