/* === CARD === */
.lucky-wrapper {
  width: 340px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 0 35px rgba(59, 130, 246, 0.4),
              0 8px 24px rgba(0, 0, 0, 0.3);
  border: 2px solid #3b82f6;
  text-align: center;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

.lucky-wrapper::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    transparent 20%, 
    rgba(59, 130, 246, 0.2) 50%, 
    transparent 80%);
  border-radius: 20px;
  z-index: -1;
  opacity: 0.6;
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

/* TITLE */
.lucky-title {
  color: #60a5fa;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.8),
               0 0 20px rgba(59, 130, 246, 0.5);
  font-size: 24px;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.lucky-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    #60a5fa, 
    #3b82f6, 
    #60a5fa, 
    transparent);
  border-radius: 2px;
}

/* SLOT */
.slot-box {
  display: flex;
  justify-content: space-between;
  background: linear-gradient(180deg, #334155, #1e293b);
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 22px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3),
              0 6px 12px rgba(0, 0, 0, 0.2);
  position: relative;
}

.slot-box::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, 
    transparent, 
    rgba(96, 165, 250, 0.3), 
    transparent);
  border-radius: 17px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slot-box:hover::before {
  opacity: 1;
}

.slot {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f8fafc, #e5e7eb);
  border-radius: 14px;
  font-size: 34px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e40af;
  border: 2px solid #3b82f6;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
              inset 0 1px 3px rgba(255, 255, 255, 0.5);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.slot:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3),
              inset 0 1px 3px rgba(255, 255, 255, 0.5);
}

/* BUTTON */
.spin-btn {
  background: linear-gradient(180deg, #3b82f6, #1e40af);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 22px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 6px 0 #1e3a8a,
              0 8px 20px rgba(59, 130, 246, 0.4);
  border: 1px solid rgba(96, 165, 250, 0.5);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.spin-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.6s ease;
}

.spin-btn:hover {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #1e3a8a,
              0 12px 25px rgba(96, 165, 250, 0.5);
  filter: brightness(1.1);
}

.spin-btn:hover::after {
  left: 150%;
}

.spin-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 0 #1e3a8a,
              0 6px 15px rgba(59, 130, 246, 0.4);
}

/* RESULT */
.result-text {
  color: #cbd5e1;
  margin-top: 20px;
  font-size: 15px;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.result-text.win {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.5);
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
  animation: winPulse 1s ease-in-out;
}

@keyframes winPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(96, 165, 250, 0);
  }
  50% {
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
  }
}

/* ROLLING */
.rolling {
  animation: roll 0.15s infinite linear;
}

@keyframes roll {
  0% { 
    transform: translateY(0) rotate(0deg); 
    opacity: 1; 
  }
  25% { 
    transform: translateY(-6px) rotate(90deg); 
    opacity: 0.8; 
  }
  50% { 
    transform: translateY(0) rotate(180deg); 
    opacity: 0.7; 
  }
  75% { 
    transform: translateY(6px) rotate(270deg); 
    opacity: 0.8; 
  }
  100% { 
    transform: translateY(0) rotate(360deg); 
    opacity: 1; 
  }
}

/* Winning animation for slots */
.winning {
  animation: winGlow 0.5s ease-in-out 3;
}

@keyframes winGlow {
  0%, 100% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                inset 0 1px 3px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.8),
                0 0 30px rgba(59, 130, 246, 0.6),
                inset 0 1px 3px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .lucky-wrapper {
    width: 300px;
    padding: 20px;
    margin-top: 30px;
  }
  
  .slot {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
  
  .lucky-title {
    font-size: 20px;
  }
  
  .spin-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}