/* Fonts: Roboto normal (Thin to Black) */
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto/Roboto-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto/Roboto-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto/Roboto-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto/Roboto-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito/Nunito-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  /* Mobile-first background */
  background-image: url("assets/background.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #0f0029;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  overflow-x: hidden;
}

/* Desktop background */
@media (min-width: 769px) {
  body {
    background-image: url("assets/background.desktop.webp");
    background-position: center top;
  }
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 600px;
  margin-top: 80px;
}

@media (max-width: 728px) {
  .container {
    margin-top: 110px;
  }
}

.wheel-container {
  position: relative;
  width: 495px;
  height: 495px;
}

@media (max-width: 768px) {
  .wheel-container {
    width: 450px;
    height: 450px;
    max-width: 90vw;
    max-height: 90vw;
  }
}

.wheel-header {
  position: fixed;
  top: 34px; /* exactly 24px from the top of the viewport */
  left: 50%;
  text-wrap: nowrap;
  transform: translateX(-50%);
  transform-origin: center;
  font-family: "Nunito", sans-serif;
  font-style: normal;
  font-weight: 900;
  font-size: 40px;
  line-height: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #d7b6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-transform: uppercase;
  z-index: 150;
  pointer-events: none;

  paint-order: stroke fill;
}

@media (max-width: 728px) {
  body {
    position: relative;
  }

  .wheel-header {
    top: -48px;
    position: absolute;
    transform: translateX(-50%);
    will-change: transform;
    font-size: 36px;
  }
}

.chicken-background-mobile {
  position: absolute;
  left: -100px;
  top: 400px;

  width: 312px;
  height: 344px;
  transform-origin: center;
  /* transform: rotate(-10deg); */
  object-fit: contain;
  z-index: 101;
}
@media (min-width: 729px) {
  .chicken-background-mobile {
    display: none;
  }
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  cursor: pointer;
  pointer-events: auto;
}
/* Layered image wheel */
.wheel img.layer,
.wheel-container img.layer-static {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  pointer-events: none;
  user-select: none;
}
/* Default sizes (can be overridden via CSS variables or inline) */
.wheel .layer-bg {
  width: var(--wheel-bg-w, 120%);
  height: var(--wheel-bg-h, 120%);
  z-index: 8;
}
.wheel .layer-sections {
  width: var(--wheel-sections-w, 100%);
  height: var(--wheel-sections-h, 100%);
  z-index: 9;
  opacity: 1;
  transition: opacity 300ms ease;
}
/* Optionally scale the win sections image differently if its artwork has padding */
.wheel .layer-sections.is-win {
  width: var(--wheel-sections-win-w, 100%);
  height: var(--wheel-sections-win-h, 100%);
}
.wheel .layer-sections-text {
  width: var(--wheel-sections-text-w, 80%);
  height: var(--wheel-sections-text-h, 80%);
  z-index: 9;
  opacity: 1;
  transition: opacity 300ms ease;
}
.layer-outer {
  width: var(--wheel-outer-w, 100%);
  height: var(--wheel-outer-h, 100%);
  z-index: 10;
}
.wheel .layer-button {
  width: var(--wheel-button-w, 140px);
  height: var(--wheel-button-h, 140px);
  z-index: 12;
}

.wheel-section {
  position: absolute;
  width: 50%;
  height: 50%;
  transform-origin: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  font-weight: bold;
  font-size: 14px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 11; /* above image layers */
  background: transparent; /* no colored wedges */
}
.wheel-section > span {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: bottom center;
  display: block;
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .wheel-section {
    font-size: 11px;
    padding: 8px;
  }
  .wheel .layer-button {
    width: var(--wheel-button-w, 120px);
    height: var(--wheel-button-h, 120px);
  }
}

.wheel-section:nth-child(1) {
  transform: rotate(22.5deg);
}

.wheel-section:nth-child(2) {
  transform: rotate(67.5deg);
}

.wheel-section:nth-child(3) {
  transform: rotate(112.5deg);
}

.wheel-section:nth-child(4) {
  transform: rotate(157.5deg);
}

.wheel-section:nth-child(5) {
  transform: rotate(202.5deg);
}

.wheel-section:nth-child(6) {
  transform: rotate(247.5deg);
}

.wheel-section:nth-child(7) {
  transform: rotate(292.5deg);
}

.wheel-section:nth-child(8) {
  transform: rotate(337.5deg);
}
/* Remove counter-rotation so bottom of text faces center when wheel turns */

.wheel-center {
  /* SPIN */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 120px;
  min-height: 120px;
  width: 120px;
  height: 120px;
  transform-origin: center;
  font-family: "Nunito", Arial, sans-serif;
  font-style: normal;
  font-weight: 900;
  font-size: 28.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
  color: #ffd466;
  text-transform: uppercase;
  text-shadow: 0px 1.8px 0px #280031;
  z-index: 14;
  cursor: pointer;
  pointer-events: auto;
  background: none;
  border: none;
  padding: 0;
  transition: text-shadow 0.3s ease, transform 0.3s ease;
  animation: glowPulse 2s ease-in-out infinite;
}

.wheel-center:hover {
  text-shadow: 0px 1.8px 0px #280031, 0 0 10px rgba(255, 212, 102, 0.8),
    0 0 20px rgba(255, 212, 102, 0.6), 0 0 30px rgba(255, 212, 102, 0.4),
    0 0 40px rgba(255, 212, 102, 0.3);
  animation: bounce 0.6s ease, glowPulse 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-1px);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0px 1.8px 0px #280031;
  }
  50% {
    text-shadow: 0px 1.8px 0px #280031, 0 0 10px rgba(255, 212, 102, 0.8),
      0 0 20px rgba(255, 212, 102, 0.6), 0 0 30px rgba(255, 212, 102, 0.4),
      0 0 40px rgba(255, 212, 102, 0.3);
  }
}

.wheel-center-button {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 768px) {
  .wheel-center {
    min-width: 90px;
    min-height: 90px;
    width: 90px;
    height: 90px;
    font-size: 22px;
  }
}

.wheel-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 13;
  mix-blend-mode: screen;
}

/* Pointer triangle removed - integrated into wheel graphics */

.btn-get-bonus {
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  color: #20252c;
  background: linear-gradient(180deg, #eec727 0%, #ffaa00 100%);

  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 16px 0 #eec727bf, 0 2px 0 0 #a55b00;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: buttonGlowPulse 2s ease-in-out infinite;

  width: 100%;
  max-width: 265px;
}

.btn-get-bonus:hover {
  transform: translateY(-2px);
  animation: buttonGlowPulseHover 2s ease-in-out infinite;
}

@keyframes buttonGlowPulse {
  0%,
  100% {
    box-shadow: 0 0 16px 0 #eec727bf, 0 2px 0 0 #a55b00;
  }
  50% {
    box-shadow: 0 0 25px 0 rgba(238, 199, 39, 1),
      0 0 35px 0 rgba(238, 199, 39, 0.9), 0 0 45px 0 rgba(238, 199, 39, 0.7),
      0 0 55px 0 rgba(238, 199, 39, 0.5), 0 2px 0 0 #a55b00;
  }
}

@keyframes buttonGlowPulseHover {
  0%,
  100% {
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.4),
      0 0 20px 0 rgba(238, 199, 39, 0.8);
  }
  50% {
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.4), 0 0 30px 0 rgba(238, 199, 39, 1),
      0 0 40px 0 rgba(238, 199, 39, 1), 0 0 50px 0 rgba(238, 199, 39, 0.9),
      0 0 60px 0 rgba(238, 199, 39, 0.7), 0 0 70px 0 rgba(238, 199, 39, 0.5);
  }
}

.btn-get-bonus:active {
  transform: translateY(0);
}

.btn-get-bonus:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.language-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.lang-btn {
  padding: 8px 16px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-btn.active {
  background: white;
  color: #667eea;
  border-color: white;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 0, 41, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: transparent;
  border-radius: 20px;
  width: 720px;
  height: 360px;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background-image: url("assets/background.popup.webp");
  background-size: cover;
  background-position: center;
  padding: 24px;
  animation: slideUp 0.5s ease-out forwards;
}
@media (max-width: 768px) {
  .modal-content {
    width: 324px;
    height: 528px;
    padding: 16px;
  }
}

/* Modal email input */
.modal-input-wrap {
  width: 400px;
  height: 56px;
  background: #0000004d;
  border: none;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 48px; /* space for icon */
}
.modal-input-wrap svg {
  position: absolute;
  left: 16px;
  width: 24px;
  height: 24px;
}
.modal-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
}
.modal-input::placeholder {
  color: #ffffff99;
}
.modal-input-wrap--full {
  width: 100%;
  max-width: 420px;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .modal-content {
    padding: 30px 20px;
    width: 90%;
  }
}

/* Modal cannot be closed; remove close button styling */

.modal-title {
  font-size: 28px;
  font-weight: bold;
  margin: 0;
  color: #333;
}

@media (max-width: 768px) {
  .modal-title {
    font-size: 22px;
  }
}

.modal-result {
  font-size: 24px;
  color: #667eea;
  font-weight: bold;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  width: 100%;
}

/* Bonus texts in modal */
.modal-bonus-title {
  font-size: 40px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  line-height: 28px;
}
.modal-bonus-value {
  font-size: 64px;
  font-weight: 900;
  line-height: 46px;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  margin-top: 16px;
  margin-bottom: 24px;
  position: relative;
  color: transparent; /* base text hidden; layers render content */
  /* line-height: 1; */
  display: inline-block; /* ensure background-clip text works reliably */
}

/* Shadow/solid layer */
.modal-bonus-value::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #eec727;
  text-shadow: 0px 1.8px 0px #280031;
  pointer-events: none;
  z-index: 1;
  animation: modalTextGlowPulse 2s ease-in-out infinite;
}

@keyframes modalTextGlowPulse {
  0%,
  100% {
    text-shadow: 0px 1.8px 0px #280031;
  }
  50% {
    text-shadow: 0px 1.8px 0px #280031, 0 0 15px rgba(238, 199, 39, 0.45),
      0 0 25px rgba(238, 199, 39, 0.4), 0 0 35px rgba(238, 199, 39, 0.3),
      0 0 45px rgba(238, 199, 39, 0.2), 0 0 55px rgba(238, 199, 39, 0.15);
  }
}

/* Gradient overlay duplicate text (on top) */
.modal-bonus-value::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(0deg, #ffaa00, #eec727),
    linear-gradient(180deg, #eec727 0%, #ffaa00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 768px) {
  .modal-result {
    font-size: 18px;
    padding: 15px;
  }
}

.spinning {
  pointer-events: none;
}
.brand-footer {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 210px;
  height: 56px;
  object-fit: contain;
  z-index: 150;
}

@media (max-width: 728px) {
  .brand-footer {
    position: absolute;
    bottom: 16px;
    will-change: transform;
  }
}
@media (max-width: 768px) {
  .brand-header,
  .brand-header-mobile,
  .brand-header-popup,
  .brand-footer {
    width: 150px !important;
    height: 40px !important;
  }
}

.brand-header {
  position: absolute;
  left: 72px;
  top: 24px;
  width: 210px;
  height: 56px;
  object-fit: contain;
  z-index: 100;
}
@media (max-width: 1024px) {
  .brand-header {
    display: none;
  }
}

.brand-header-mobile {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 16px;
  width: 210px;
  height: 56px;
  object-fit: contain;
  z-index: 100;
}
@media (min-width: 729px) {
  .brand-header-mobile {
    display: none;
  }
}

.brand-header-popup {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 24px;
  width: 210px;
  height: 56px;
  object-fit: contain;
  z-index: 1200;
}

/* Wheel labels */
#wheelLabels {
  position: absolute;
  inset: 0;
  z-index: 13; /* above sections image and button */
  pointer-events: none;
}
.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chicken-popup {
  position: absolute;
  left: -360px;
  top: -100px;

  width: 412px;
  height: 344px;
  transform-origin: center;

  object-fit: contain;
  z-index: 101;
}

@media (max-width: 728px) {
  .chicken-popup {
    left: -50px;
    top: -150px;
    width: 406px;
    height: 346px;
  }

  .modal-bonus-title {
    font-size: 32px;
    margin-top: 150px;
  }

  .modal-bonus-value {
    font-size: 48px;
    text-wrap: nowrap;
  }

  #termsText {
    text-align: left;
  }
}
