@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: url('https://spin-ambon.top/assets/images/background2.webp') no-repeat center center fixed;
  background-size: cover;
  color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 15px;
  position: relative;
  z-index: 1;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

.container {
  background: rgba(20, 30, 30, 0.85);
  border: 2px solid #00ff88;
  border-radius: 16px;
  box-shadow: 0 0 30px #00ff8899, 0 0 15px #00ff8855 inset;
  max-width: 400px;
  width: 100%;
  padding: 20px;
  text-align: center;
}

.logo {
  max-width: 100%;
  width: 250px;
  height: auto;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 0 15px #00ff88);
}

.title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 20px;
  color: #00ff88;
  text-shadow: 0 0 10px #00ff88aa, 0 0 20px #00ff8877;
}

#spinForm {
  margin-bottom: 20px;
}

#username {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  margin-bottom: 15px;
  outline: none;
  background: #111;
  color: #00ff88;
  box-shadow: 0 0 10px #00ff8844 inset;
  text-align: center;
}

/* Tambahan untuk ratakan placeholder ke tengah */
#username::placeholder {
  text-align: center;
}
#username::-webkit-input-placeholder {
  text-align: center;
}
#username:-moz-placeholder {
  text-align: center;
}
#username::-moz-placeholder {
  text-align: center;
}
#username:-ms-input-placeholder {
  text-align: center;
}

.spin-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(90deg, #00ff88, #00ffaa);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  box-shadow: 0 6px 12px #00ffaa55;
  transition: all 0.3s ease;
  user-select: none;
}

.spin-btn:hover {
  background: linear-gradient(90deg, #00ffaa, #00ffcc);
  box-shadow: 0 8px 16px #00ffcc55;
}

.wheel-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto 25px;
}

.wheel {
  width: 100%;
  border-radius: 50%;
  box-shadow: 0 0 20px #00ff88bb inset;
  transition: transform 4s cubic-bezier(0.33, 1, 0.68, 1);
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 350px;
  background: rgba(10, 20, 20, 0.95);
  border-radius: 16px;
  box-shadow: 0 0 20px #00ff88bb;
  transform: translate(-50%, -50%);
  padding: 25px;
  text-align: center;
  z-index: 9999;
  color: #00ff88;
  font-weight: 600;
  user-select: none;
}

.popup h2 {
  margin: 0 0 15px;
  font-size: 1rem;
  text-shadow: 0 0 10px #00ff88;
}

.popup p {
  font-size: 1.3rem;
  margin-bottom: 25px;
  color: #fff;
}

.popup button {
  background: #00ff88;
  border: none;
  padding: 12px 25px;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  color: #111;
  box-shadow: 0 4px 10px #00ff8855;
  user-select: none;
  transition: 0.3s;
}

.popup button:hover {
  background: #00ffaa;
  box-shadow: 0 6px 16px #00ffaa88;
}

.popup.hidden {
  display: none;
}

@media (max-width: 450px) {
  body {
    padding: 10px;
  }

  .container {
    max-width: 100%;
    padding: 15px;
  }

  .wheel-container {
    width: 260px;
    height: 260px;
  }

  #lottieWheel {
    width: 100% !important;
    height: 100% !important;
  }

  .popup {
    width: 95%;
    padding: 20px;
  }
}
