* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  background-color: #000000;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100vw;
}
body {
  background: radial-gradient(circle at top, #2c0101 0%, #000000 100%);
  color: white;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  
  overflow-x: hidden; 
  width: 100%;
  max-width: 100vw;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, select {
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  user-select: auto !important;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: preloaderSpin 1s linear infinite;
}

@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding-top: env(safe-area-inset-top);
  background: rgba(17, 17, 17, 0.95);
  border-bottom: 2px solid #d4af37;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 6px 20px;
  gap: 8px;
}
.header-logo {
  height: 38px;
  max-width: 55%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}
.header-title {
  color: #ffd700;
  font-weight: 900;
  font-size: clamp(0.7rem, 3.5vw, 1.1rem);
  white-space: nowrap;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-style: italic;
  margin-right: 10px;
}

.running-text-wrapper {
  width: 95%;
  max-width: 1000px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #d4af37;
  border-radius: 50px;
  overflow: hidden;
  margin: 65px auto 10px;
  padding: 8px 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.running-text {
  white-space: nowrap;
  animation: marqueeText 20s linear infinite;
  font-size: 0.85rem;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.5px;
}
@keyframes marqueeText {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.container {
  background: rgba(0, 0, 0, 0.6);
  padding: 30px 20px;
  width: 95%;
  max-width: 500px;
  border: 2px solid gold;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  margin: 10px auto 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 800px) {
  .container {
    max-width: 1000px;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 40px;
  }
  .wheel-container {
    margin: 0 !important;
  }
  .controls {
    width: 100%;
    max-width: 400px;
  }
}

.wheel-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1 !important;
  flex: none !important;
  align-self: center;
  margin: 10px auto 20px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    #fffde4,
    #ffd700,
    #b8860b,
    #5c4302
  );
  padding: 16px;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.8),
    inset 0 -5px 15px rgba(0, 0, 0, 0.5),
    inset 0 5px 15px rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.wheel-container::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border-radius: 50%;
  border: 4px solid #111;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.wheel-container::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ff0055,
    #4361ee,
    #fbc531,
    #20bf6b,
    #ff0055
  );
  z-index: -1;
  -webkit-filter: blur(25px);
  filter: blur(25px);
  opacity: 0.6;
  animation: spinAura 3s linear infinite;
}

@keyframes spinAura {
  to {
    transform: rotate(360deg);
  }
}

canvas {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: block;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 50%;
  background: transparent;
  border: none;
  
  image-rendering: -webkit-optimize-contrast;
  -webkit-transform-origin: center center;
  transform-origin: center center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
  -webkit-transform: translateZ(0) rotate(0deg);
  transform: translateZ(0) rotate(0deg);
  will-change: transform;
}

.pointer {
  position: absolute;
  top: -25px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 10;
  width: 45px;
  height: 65px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 120" xmlns="http://www.w3.org/2000/svg"><path d="M20 10 L80 10 L50 110 Z" fill="%23ff0055" stroke="%23ffffff" stroke-width="6" stroke-linejoin="round"/><circle cx="50" cy="25" r="15" fill="%23ffd700" stroke="%23ffffff" stroke-width="4"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  -webkit-filter: drop-shadow(0px 5px 8px rgba(0, 0, 0, 0.7));
  filter: drop-shadow(0px 5px 8px rgba(0, 0, 0, 0.7));
  -webkit-animation: pointerHover 1.5s ease-in-out infinite alternate;
  animation: pointerHover 1.5s ease-in-out infinite alternate;
}

@-webkit-keyframes pointerHover {
  from {
    -webkit-transform: translateX(-50%) translateY(0px);
    transform: translateX(-50%) translateY(0px);
  }
  to {
    -webkit-transform: translateX(-50%) translateY(-8px);
    transform: translateX(-50%) translateY(-8px);
  }
}
@keyframes pointerHover {
  from {
    transform: translateX(-50%) translateY(0px);
  }
  to {
    transform: translateX(-50%) translateY(-8px);
  }
}

.center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 14%;
  height: 14%;
  z-index: 5;
  border-radius: 50%;
  object-fit: contain;
  background-color: #111111;
  padding: 5px;
  border: 3px solid #d4af37;
  -webkit-filter: drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.8));
  filter: drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.8));
}

.controls input {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #d4af37;
  background: #111;
  color: gold;
  font-weight: bold;
  font-size: 16px;
  appearance: none;
}

.controls input::placeholder {
  color: #888;
}

button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(to bottom, #ffd700, #b8860b);
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  border-radius: 8px;
  color: #000;
  text-transform: uppercase;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

button:hover {
  transform: scale(1.02);
  filter: brightness(1.2);
}

.secondary-btn {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: transparent;
  border: 2px solid #d4af37;
  cursor: pointer;
  font-weight: bold;
  font-size: 1em;
  border-radius: 8px;
  color: #d4af37;
  text-transform: uppercase;
  transition: 0.3s;
}

.secondary-btn:hover {
  background: #d4af37;
  color: #000;
}

.custom-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  padding: 15px;
}

.custom-popup-content {
  background: linear-gradient(135deg, #2c0101 0%, #110000 100%);
  border: 3px solid #d4af37;
  border-radius: 20px;
  padding: 40px 30px;
  width: 95%;
  max-width: 500px;
  text-align: center;
  color: white;
  animation: popupFadeIn 0.5s ease;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
  position: relative;
  
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  user-select: auto !important;
  -webkit-touch-callout: default !important;
}

.congrats-icon {
  font-size: 3.5rem;
  color: #ff0055;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 0, 85, 0.8);
  animation: bounceIcon 1s infinite alternate ease-in-out;
}

@keyframes bounceIcon {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-10px) scale(1.1);
  }
}

.custom-popup-content h2 {
  color: #ffd700;
  margin-top: 0;
  margin-bottom: 5px;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  letter-spacing: 1px;
}

.winner-subtitle {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 10px;
  font-weight: 500;
}

.custom-popup-content .prize-text {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  font-weight: bold;
  color: #ffd700;
  margin: 10px 0;
  padding: 10px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px dashed #d4af37;
  border-radius: 12px;
  text-transform: uppercase;
  animation: pulsePrize 1.5s infinite alternate;
}

@keyframes pulsePrize {
  from {
    transform: scale(1);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
  }
  to {
    transform: scale(1.05);
    box-shadow:
      inset 0 0 25px rgba(212, 175, 55, 0.5),
      0 0 15px rgba(212, 175, 55, 0.3);
  }
}

.winner-footer {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 25px;
  color: #ccc;
  font-style: italic;
}

.instruction-box {
  background: rgba(0, 0, 0, 0.5);
  border-left: 4px solid #ff0055;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.custom-popup-content .instruction-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #eee;
  text-align: justify;
  margin: 0;
}

.custom-popup-btn {
  padding: 12px 30px;
  background: linear-gradient(to bottom, #ffd700, #b8860b);
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 8px;
  color: #000;
  text-transform: uppercase;
  transition: 0.3s;
}

.custom-popup-btn:hover {
  filter: brightness(1.2);
}

#last-winners-list {
  margin-top: 20px;
  text-align: left;
  max-height: 50vh;
  overflow-y: auto;
}

.winner-item {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #d4af37;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 0 8px 8px 0;
}

.winner-item p {
  margin: 0;
  line-height: 1.4;
}

.winner-item .winner-id {
  font-weight: bold;
  color: #fff;
}

.winner-item .winner-prize {
  font-weight: bold;
  color: #ffd700;
}

.winner-item .winner-time {
  font-size: 0.8rem;
  color: #aaa;
}

#livechat-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  transition: transform 0.3s ease;
}

#livechat-wrapper:hover {
  transform: scale(1.1);
}

@media (max-width: 480px) {
  #livechat-wrapper {
    position: fixed !important;
    bottom: 15px;
    right: 15px;
  }
}

.contact-area {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.contact-btn {
  position: relative;
  text-decoration: none;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, filter 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  width: 100%; 
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.contact-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.contact-btn i, .contact-btn img {
  position: absolute;
  left: 20px;
  font-size: 1.5rem;
  max-height: 25px;
  width: auto;
}

.contact-btn span {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.popup-content {
  position: relative;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popupFadeIn 0.5s ease;
  overflow-y: auto;
}

.banner-area {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 20px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  aspect-ratio: 600 / 200;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  background: transparent;
}

.banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.promo-banner-img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: block;
  object-fit: fill;
}

.popup-content img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
  border: 2px solid gold;
  margin-bottom: 10px;
}

.popup-text-body {
  background: #fff;
  color: #333;
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  border: 2px solid #d4af37;
}

.popup-text-body p {
  margin-bottom: 10px;
}

.popup-text-body ul,
.popup-text-body ol {
  margin: 10px 0 10px 20px;
  padding-left: 20px;
  text-align: left;
}

.popup-text-body li {
  margin-bottom: 5px;
}

.popup-text-body a {
  color: #4361ee;
  text-decoration: none;
}

.popup-text-body a:hover {
  text-decoration: underline;
}

.close-popup-btn {
  margin-top: 15px;
  padding: 10px 25px;
  background: linear-gradient(to bottom, #ff4b1f, #ff9068);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(255, 75, 31, 0.4);
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.close-popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 75, 31, 0.6);
  filter: brightness(1.1);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.seo-rules-section {
  width: 95%;
  max-width: 850px;
  margin: 0 auto 50px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 15px;
  padding: 35px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

.seo-rules-content h3 {
  color: #ffd700;
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.seo-rules-content p {
  color: #e2e2e2;
  font-size: 0.95rem;
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 15px;
  letter-spacing: 0.3px;
}

.seo-rules-content p:last-child {
  margin-bottom: 0;
}

.site-footer {
  width: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  color: #999;
  text-align: center;
  padding: 25px 15px;
  font-size: 0.9rem;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  margin-top: auto;
}

/* =========================================
   INFO HADIAH POPUP & BUTTON STYLES
   ========================================= */
.btn-info-icon {
  position: absolute;
  top: -10px;
  left: -10px;
  background: linear-gradient(135deg, #d4af37, #f39c12);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  border: 2px solid #fff;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 20;
}
.btn-info-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(212, 175, 55, 0.6);
}

.info-hadiah-container {
  width: 90%;
  max-width: 400px;
  background: #1e1e24;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid #d4af37;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.hadiah-item {
  display: flex;
  align-items: center;
  background: #2a2a35;
  padding: 10px 15px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid #3f3f4e;
  transition: 0.3s;
}
.rank-badge {
  background: #4361ee;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
.hadiah-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
  border: 1px solid #555;
  background: #111;
}
.hadiah-item .hadiah-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex: 1;
  text-align: left;
}

.hadiah-item.jackpot {
  background: linear-gradient(135deg, #4b3800, #2b2000);
  border: 2px solid #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
  padding: 15px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.hadiah-item.jackpot::before {
  content: "SUPER JACKPOT";
  position: absolute;
  top: 0;
  right: 0;
  background: #d4af37;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 10px;
  border-bottom-left-radius: 10px;
  letter-spacing: 1px;
}
.hadiah-item.jackpot img {
  width: 65px;
  height: 65px;
  border-color: #d4af37;
  border-width: 2px;
}
.hadiah-item.jackpot .rank-badge {
  background: #d4af37;
  color: #000;
}
.hadiah-item.jackpot .hadiah-name {
  color: #f9d976;
  font-size: 18px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.hadiah-item.jackpot i.fa-crown {
  color: #d4af37;
  font-size: 24px;
  margin-right: 15px;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.8));
}
