@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

:root {
  --gold: #ffd700;
  --gold-dark: #b8860b;
  --red: #ff4757;
  --purple: #8b5cf6;
  --cyan: #00d4ff;
  --dark-bg: #0a0a1a;
  --dark-card: #12122a;
}

body {
  font-family: 'Roboto', sans-serif;
  background: var(--dark-bg);
  background-image: url('background.png?v=3');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

/* Particles Background */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  animation: float 15s infinite;
  opacity: 0.6;
}

@keyframes float {
  0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* Auth Section */
.auth-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.logo-container {
  position: relative;
  margin-bottom: 40px;
  text-align: center;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.main-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(180deg, #fff 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
  line-height: 1.2;
  position: relative;
}

.main-title span {
  font-size: 4rem;
  display: block;
  background: linear-gradient(180deg, var(--gold) 0%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.auth-box {
  background: linear-gradient(145deg, rgba(30, 30, 60, 0.9), rgba(20, 20, 40, 0.95));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 25px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(255, 215, 0, 0.1);
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-btn {
  flex: 1;
  padding: 15px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  background: transparent;
  color: #888;
  cursor: pointer;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.auth-form input {
  width: 100%;
  padding: 18px 18px 18px 50px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}


.submit-btn {
  position: relative;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #000;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
}

.btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: btnShine 3s infinite;
}

@keyframes btnShine {
  0% { left: -50%; }
  100% { left: 150%; }
}

.error {
  color: var(--red);
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.hidden { display: none !important; }

/* Game Section */
.game-section {
  min-height: 100vh;
  padding: 20px;
  padding-top: 10px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 15px 25px;
  background: linear-gradient(135deg, rgba(30, 30, 60, 0.8), rgba(20, 20, 40, 0.9));
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 30px;
}

.logo-small h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--gold), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
}

.user-icon { font-size: 20px; }

.spins-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 25px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 25px;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.spins-icon { font-size: 24px; }
#spins-display { font-size: 24px; font-family: 'Orbitron', sans-serif; }
.spins-label { font-size: 12px; opacity: 0.8; }

.spins-container.no-spins {
  background: linear-gradient(135deg, #ff4757, #c0392b);
}

.spins-container.no-spins #spins-display {
  font-size: 14px;
  color: #fff;
}

.admin-btn, .logout-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.admin-btn {
  background: linear-gradient(135deg, var(--purple), #6366f1);
  color: #fff;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover { background: rgba(255, 71, 87, 0.3); }

/* Main Content */
.main-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Rules Sidebar - Left */
.rules-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-sidebar.collapsed {
  left: -320px;
}

.rules-sidebar.collapsed .toggle-icon::after {
  content: '▶';
}

.rules-toggle {
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 60px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: 0 15px 15px 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.rules-toggle:hover {
  width: 55px;
  background: linear-gradient(135deg, var(--gold), var(--red));
}

.toggle-icon {
  font-size: 20px;
}

.toggle-icon::after {
  content: '◀';
}

.rules-content {
  background: linear-gradient(145deg, rgba(30, 30, 60, 0.98), rgba(20, 20, 40, 0.98));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-left: none;
  border-radius: 0 25px 25px 0;
  padding: 25px;
  width: 320px;
  backdrop-filter: blur(20px);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
}

.wheel-section {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px;
}


/* Wheel Frame - Professional Design */
.wheel-frame {
  position: relative;
  width: 520px;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wheel-outer-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #2a2a4a, #1a1a3a, #2a2a4a, #1a1a3a, #2a2a4a, #1a1a3a, #2a2a4a, #1a1a3a);
  box-shadow: 
    0 0 60px rgba(255, 215, 0, 0.3),
    inset 0 0 60px rgba(0, 0, 0, 0.5);
  border: 8px solid;
  /*border-image: linear-gradient(135deg, var(--gold), var(--gold-dark), var(--gold)) 1;*/
  border-radius: 50%;
  border-style: solid;
  border-color: var(--gold);
}

.wheel-lights {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

.wheel-light {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold);
  animation: lightBlink 0.5s ease-in-out infinite alternate;
}

.wheel-light.off {
  background: #333;
  box-shadow: none;
}

@keyframes lightBlink {
  0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
}

/* Pointer */
.pointer-container {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.pointer {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-top: 55px solid var(--gold);
  filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.6));
  position: relative;
}

.pointer::after {
  content: '';
  position: absolute;
  top: -55px;
  left: -20px;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 45px solid var(--gold-dark);
}

.pointer-glow {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 70%);
  animation: pointerPulse 1s ease-in-out infinite;
}

@keyframes pointerPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
}

/* Center Spin Button */
.center-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
  box-shadow: 
    0 0 40px rgba(255, 215, 0, 0.5),
    inset 0 -5px 20px rgba(0, 0, 0, 0.5),
    inset 0 5px 20px rgba(255, 255, 255, 0.1);
  z-index: 15;
  transition: all 0.3s;
  overflow: hidden;
}

.center-spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 
    0 0 60px rgba(255, 215, 0, 0.7),
    inset 0 -5px 20px rgba(0, 0, 0, 0.5),
    inset 0 5px 20px rgba(255, 255, 255, 0.1);
}

.center-spin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.spin-btn-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--red));
  margin: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
}

.spin-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #000;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

.spin-btn-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--gold);
  animation: ringRotate 3s linear infinite;
  border-top-color: transparent;
  border-right-color: var(--red);
}

@keyframes ringRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Rules Section */
.rules-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.rules-icon { font-size: 24px; }

.rules-header h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--gold), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rules-list {
  list-style: none;
}

.rules-list li {
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border-left: 3px solid var(--gold);
  font-size: 12px;
  line-height: 1.4;
  transition: all 0.3s;
}

.rules-list li:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateX(5px);
}

.rule-highlight {
  color: var(--cyan);
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
}

.reward {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
}

.max-rule {
  background: rgba(255, 71, 87, 0.2) !important;
  border-left-color: var(--red) !important;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  background: linear-gradient(145deg, #1e1e3e, #12122a);
  padding: 50px;
  border-radius: 30px;
  text-align: center;
  border: 3px solid var(--gold);
  box-shadow: 0 0 100px rgba(255, 215, 0, 0.3);
  animation: modalPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
  max-width: 90%;
}

@keyframes modalPop {
  0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.modal-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--gold), transparent, var(--red), transparent);
  animation: modalGlowRotate 4s linear infinite;
  opacity: 0.1;
}

@keyframes modalGlowRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-content h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--gold), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  position: relative;
}

.prize-display {
  margin: 30px 0;
}

.prize-icon {
  font-size: 80px;
  animation: prizeFloat 2s ease-in-out infinite;
}

.prize-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: prizeFloat 2s ease-in-out infinite;
}

.prize-image.hidden {
  display: none;
}

@keyframes prizeFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

#result-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 20px;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.modal-btn {
  padding: 18px 60px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #000;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.modal-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
}

/* No Spins Modal */
.no-spins-content {
  border-color: var(--red);
  box-shadow: 0 0 100px rgba(255, 71, 87, 0.3);
}

.no-spins-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.no-spins-content h2 {
  background: linear-gradient(90deg, var(--red), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.no-spins-text {
  font-size: 1.1rem;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Confetti */
.confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 20px;
  top: -20px;
  animation: confettiFall 3s ease-in-out infinite;
}

@keyframes confettiFall {
  0% { transform: translateY(-100%) rotate(0deg); opacity: 1; }
  100% { transform: translateY(500px) rotate(720deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
  .wheel-frame { width: 450px; height: 450px; }
  .wheel-container { width: 420px; height: 420px; }
  
  .rules-content { width: 280px; padding: 20px; }
}

@media (max-width: 768px) {
  body {
    background-image: url('mobile.png?v=2');
  }
  
  .game-section { padding: 10px; }
  
  .header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    text-align: center;
  }
  
  .logo-small h1 { font-size: 1.3rem; }
  
  .user-info {
    width: 100%;
    justify-content: center;
    gap: 10px;
  }
  
  .user-badge { padding: 8px 15px; font-size: 14px; }
  
  .spins-container {
    padding: 8px 15px;
  }
  
  #spins-display { font-size: 20px; }
  .spins-label { font-size: 11px; }
  
  .admin-btn, .logout-btn {
    padding: 8px 15px;
    font-size: 13px;
  }
  
  .wheel-frame { width: 350px; height: 350px; }
  .wheel-container { width: 320px; height: 320px; }
  .center-spin-btn { width: 90px; height: 90px; }
  .spin-text { font-size: 15px; }
  .spin-btn-inner { margin: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
  
  .pointer { 
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 40px solid var(--gold);
  }
  
  /* Rules sidebar mobile */
  .rules-sidebar.collapsed { left: -260px; }
  .rules-content { width: 260px; padding: 15px; }
  .rules-header { margin-bottom: 15px; padding-bottom: 10px; }
  .rules-header h3 { font-size: 1rem; }
  .rules-icon { font-size: 20px; }
  .rules-list li { 
    padding: 10px; 
    margin-bottom: 6px; 
    font-size: 11px; 
    border-radius: 8px;
  }
  .rule-highlight { font-size: 11px; }
  
  .rules-toggle {
    width: 40px;
    height: 50px;
    right: -40px;
  }
  
  /* Wheel lights smaller */
  .wheel-light { width: 10px; height: 10px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  
  .game-section { 
    padding: 8px; 
    padding-top: 5px;
  }
  
  .header {
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(20, 20, 40, 0.85);
  }
  
  .logo-small h1 { font-size: 1rem; }
  
  .user-info {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .user-badge {
    padding: 5px 10px;
    font-size: 12px;
    order: 1;
  }
  
  .spins-container {
    padding: 5px 10px;
    order: 2;
  }
  
  #spins-display { font-size: 16px; }
  .spins-icon { font-size: 16px; }
  .spins-label { font-size: 9px; }
  
  .admin-btn {
    padding: 5px 10px;
    font-size: 11px;
    order: 3;
  }
  
  .logout-btn {
    padding: 5px 10px;
    font-size: 11px;
    order: 4;
  }
  
  .main-content { 
    padding: 0;
    margin-top: 25vw; /* Đẩy vòng quay xuống để thấy chữ trên background */
  }
  
  .wheel-section { padding: 10px 0; }
  
  .wheel-frame { 
    width: calc(100vw - 40px); 
    height: calc(100vw - 40px);
    max-width: 300px;
    max-height: 300px;
  }
  
  .wheel-container { 
    width: calc(100% - 20px); 
    height: calc(100% - 20px);
  }
  
  .wheel-outer-ring { border-width: 5px; }
  
  .center-spin-btn { 
    width: 70px; 
    height: 70px; 
  }
  
  .spin-text { font-size: 13px; }
  .spin-btn-inner { margin: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
  .spin-btn-ring { border-width: 3px; }
  
  .pointer { 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 35px solid var(--gold);
  }
  
  .pointer::after {
    top: -35px;
    left: -12px;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 28px solid var(--gold-dark);
  }
  
  .pointer-container { top: 0; }
  
  /* Rules sidebar mobile small */
  .rules-sidebar.collapsed { left: -220px; }
  .rules-content { 
    width: 220px; 
    padding: 12px;
    border-radius: 0 15px 15px 0;
  }
  .rules-header { margin-bottom: 12px; padding-bottom: 8px; }
  .rules-header h3 { font-size: 0.9rem; }
  .rules-icon { font-size: 18px; }
  .rules-list li { 
    padding: 8px; 
    margin-bottom: 5px; 
    font-size: 10px;
    border-left-width: 2px;
  }
  .rule-highlight { font-size: 10px; margin-bottom: 2px; }
  .reward { font-size: 10px; }
  
  .rules-toggle {
    width: 35px;
    height: 45px;
    right: -35px;
    border-radius: 0 10px 10px 0;
  }
  .toggle-icon { font-size: 16px; }
  
  /* Wheel lights mobile */
  .wheel-light { width: 8px; height: 8px; }
  
  /* Modal mobile */
  .modal-content {
    padding: 30px 20px;
    margin: 15px;
    border-radius: 20px;
    border-width: 2px;
  }
  
  .modal-content h2 { font-size: 1.8rem; margin-bottom: 15px; }
  .prize-icon { font-size: 60px; }
  #result-text { font-size: 1.5rem; margin-top: 15px; }
  .prize-display { margin: 20px 0; }
  
  .modal-btn {
    padding: 14px 40px;
    font-size: 16px;
    border-radius: 25px;
  }
}

@media (max-width: 360px) {
  .header { padding: 8px; }
  .logo-small h1 { font-size: 0.9rem; }
  
  .user-badge, .spins-container, .admin-btn, .logout-btn {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  #spins-display { font-size: 14px; }
  .spins-icon { font-size: 14px; }
  
  .main-content {
    margin-top: 20vw;
  }
  
  .wheel-frame { 
    width: calc(100vw - 30px); 
    height: calc(100vw - 30px);
    max-width: 260px;
    max-height: 260px;
  }
  
  .center-spin-btn { width: 55px; height: 55px; }
  .spin-text { font-size: 11px; }
  
  .pointer { 
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 28px solid var(--gold);
  }
  
  .rules-sidebar.collapsed { left: -200px; }
  .rules-content { width: 200px; padding: 10px; }
  .rules-list li { font-size: 9px; padding: 6px; }
  
  .modal-content h2 { font-size: 1.5rem; }
  #result-text { font-size: 1.3rem; }
  .prize-icon { font-size: 50px; }
}

/* Auth section responsive */
@media (max-width: 480px) {
  .auth-section { padding: 15px; }
  
  .main-title { font-size: 2rem; }
  .main-title span { font-size: 2.2rem; }
  
  .logo-glow { width: 200px; height: 200px; }
  
  .auth-box {
    padding: 25px 20px;
    border-radius: 20px;
  }
  
  .tab-btn { padding: 12px 15px; font-size: 14px; }
  
  .auth-form input { padding: 14px 14px 14px 45px; font-size: 15px; }
  .input-icon { font-size: 18px; left: 12px; }
  
  .submit-btn { padding: 14px; font-size: 16px; }
}

@media (max-width: 360px) {
  .main-title { font-size: 1.7rem; }
  .main-title span { font-size: 1.9rem; }
  
  .auth-box { padding: 20px 15px; }
  .tab-btn { padding: 10px 12px; font-size: 13px; }
}


/* Winner Modal Styles */
.winner-text {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 10px;
}

.winner-text span {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
}

.prize-label {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 15px;
}

/* Recent Winners Panel */
.winners-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 220px;
  background: linear-gradient(145deg, rgba(30, 30, 60, 0.95), rgba(20, 20, 40, 0.98));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.winners-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  font-weight: 700;
  font-size: 12px;
  font-family: 'Orbitron', sans-serif;
}

.winners-icon {
  font-size: 16px;
}

.winners-list {
  max-height: 200px;
  overflow-y: auto;
}

.winner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  animation: winnerSlide 0.3s ease-out;
}

@keyframes winnerSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.winner-item:last-child {
  border-bottom: none;
}

.winner-item.no-winners {
  justify-content: center;
  color: #888;
  font-style: italic;
}

.winner-name {
  color: var(--cyan);
  font-weight: 600;
}

.winner-prize {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
}

/* Scrollbar for winners list */
.winners-list::-webkit-scrollbar {
  width: 4px;
}

.winners-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.winners-list::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}

/* Responsive for winners panel */
@media (max-width: 768px) {
  .winners-panel {
    width: 180px;
    bottom: 15px;
    right: 15px;
  }
  
  .winners-header {
    padding: 10px;
    font-size: 11px;
  }
  
  .winner-item {
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .winner-prize {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .winners-panel {
    width: 160px;
    bottom: 10px;
    right: 10px;
    border-radius: 12px;
  }
  
  .winners-header {
    padding: 8px;
    font-size: 10px;
    gap: 5px;
  }
  
  .winners-icon {
    font-size: 14px;
  }
  
  .winners-list {
    max-height: 150px;
  }
  
  .winner-item {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  .winner-prize {
    font-size: 9px;
  }
}


/* Winner Modal Styles */
.winner-text {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 10px;
}

.winner-text span {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
}

.prize-label {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 15px;
}

/* Recent Winners Panel */
.winners-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 220px;
  background: linear-gradient(145deg, rgba(30, 30, 60, 0.95), rgba(20, 20, 40, 0.98));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.winners-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  font-weight: 700;
  font-size: 12px;
  font-family: 'Orbitron', sans-serif;
}

.winners-icon {
  font-size: 16px;
}

.winners-list {
  max-height: 200px;
  overflow-y: auto;
}

.winner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  animation: winnerSlide 0.3s ease-out;
}

@keyframes winnerSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.winner-item:last-child {
  border-bottom: none;
}

.winner-item.no-winners {
  justify-content: center;
  color: #888;
  font-style: italic;
}

.winner-name {
  color: var(--cyan);
  font-weight: 600;
}

.winner-prize {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
}

.winners-list::-webkit-scrollbar {
  width: 4px;
}

.winners-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.winners-list::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .winners-panel {
    width: 180px;
    bottom: 15px;
    right: 15px;
  }
  
  .winners-header {
    padding: 10px;
    font-size: 11px;
  }
  
  .winner-item {
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .winner-prize {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .winners-panel {
    width: 160px;
    bottom: 10px;
    right: 10px;
    border-radius: 12px;
  }
  
  .winners-header {
    padding: 8px;
    font-size: 10px;
    gap: 5px;
  }
  
  .winners-icon {
    font-size: 14px;
  }
  
  .winners-list {
    max-height: 150px;
  }
  
  .winner-item {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  .winner-prize {
    font-size: 9px;
  }
}


/* Register Success Modal */
.register-success-content {
  border-color: #2ecc71;
  box-shadow: 0 0 100px rgba(46, 204, 113, 0.4);
}

.register-success-content h2 {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: successPop 0.5s ease-out;
}

@keyframes successPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.success-text {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 25px;
}

.success-text span {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
}
