/* Popup nền */
.spin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.spin-content {
  position: relative;
  width: 400px;
  height: 650px;
  border-radius: 15px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0,0,0,0.4);
}
.spin-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* Vòng xoay */
.spin-wheel-container {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
}
.spin-wheel-img {
  width: 100%;
  transition: transform 4s ease-out;
}
.spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ff0055;
  color: #fff;
  font-weight: bold;
  border-radius: 50%;
  padding: 15px 5px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255,0,100,0.5);
}

/* Mũi tên chỉ lên */
.spin-pointer {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid #ff0055;
  filter: drop-shadow(0 0 5px rgba(255,0,100,0.6));
  z-index: 5;
}

/* Popup form */
.spin-hidden { display: none !important; }

.spin-form-wrapper {
  color: #333;
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.spin-form-header {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    margin-top: 20px;
    border-radius: 12px;
}
.spin-form-header p {
    font-size: 20px;
    margin: 0;
    color: #130054;
}
.spin-form-header h2 {
    font-size: 26px;
    color: #130054;
    margin: 5px 0 0;
}
.spin-form-sub {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 30px;
}
.spin-form-sub p:first-child {
    font-size: 26px;
    font-weight: bold;
    color: #130054;
    margin-bottom: 0;
}
.spin-form-sub p:last-child {
    font-size: 26px;
    color: #130054;
    font-weight: bold;
}
.spin-form-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}
.spin-form-body input {
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.spin-submit-btn {
  padding: 12px;
  background: #130054;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

#spinFormPopup .spin-content {
    background: #fff;
    width: 450px;
}

#spinFormPopup .spin-close {
    color: #d40000;
}

/* Khi JS cần hiển thị form popup */
#spinFormPopup {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* JS sẽ thêm class này khi quay xong */
#spinFormPopup.active {
  display: flex;
  opacity: 1;
}

@media (max-width: 768px) {
    .spin-content {
        width: 375px;  
    }

    #spinFormPopup .spin-content {
        width: 375px;
    }
}