:root {
  --primary: #6366f1;
  --secondary: #a855f7;
  --accent: #ec4899;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-color: #0f172a;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at top right, #1e1b4b, #0f172a);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  color: #fff;
  padding: 2rem 0;
}

.background-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  animation: float 20s infinite alternate;
  opacity: 0.5;
}

.shape-1 { width: 350px; height: 350px; background: var(--primary); top: -10%; left: -10%; }
.shape-2 { width: 450px; height: 450px; background: var(--secondary); bottom: -20%; right: -10%; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; background: var(--accent); top: 40%; left: 50%; animation-delay: -10s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 50px) scale(1.1); }
  100% { transform: translate(-50px, -20px) scale(0.9); }
}

.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 3rem;
  border-radius: 28px;
  text-align: center;
  max-width: 700px;
  width: 90%;
  z-index: 10;
  margin: auto;
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

header p { color: #94a3b8; margin-top: 0; margin-bottom: 2rem; font-size: 1.1rem; font-weight: 300; }

.settings-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.settings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.settings-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #94a3b8;
  margin: 0;
}

.count-chips {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chip {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.chip:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.chip.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Updated Lucky Number Dropdown Styling */
.lucky-input-wrapper select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 160px;
  height: 52px;
  border-radius: 15px;
  padding: 0 15px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  transition: all 0.3s;
}

.lucky-input-wrapper select:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.lucky-input-wrapper select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.lucky-input-wrapper select option {
  background-color: #1e1b4b;
  color: white;
  padding: 10px;
}

.games-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 3rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 5px;
}

.games-wrapper::-webkit-scrollbar { width: 6px; }
.games-wrapper::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }

.lotto-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.4), 
              inset 0 -4px 8px rgba(0, 0, 0, 0.3), 
              inset 0 4px 8px rgba(255, 255, 255, 0.4);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.placeholder {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
  text-shadow: none;
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: none;
}

@keyframes popIn { to { opacity: 1; transform: scale(1) translateY(0); } }

.ball.range-1 { background: radial-gradient(circle at 30% 30%, #ffe066, #fbc400, #c29800); }
.ball.range-11 { background: radial-gradient(circle at 30% 30%, #99dfff, #38bdf8, #0284c7); }
.ball.range-21 { background: radial-gradient(circle at 30% 30%, #fca5a5, #ef4444, #b91c1c); }
.ball.range-31 { background: radial-gradient(circle at 30% 30%, #d1d5db, #9ca3af, #4b5563); }
.ball.range-41 { background: radial-gradient(circle at 30% 30%, #d9f99d, #84cc16, #4d7c0f); }

.glow-on-hover {
  width: 100%;
  max-width: 320px;
  height: 65px;
  border: none;
  outline: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 35px;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.glow-on-hover:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(99, 102, 241, 0.7); }
.glow-on-hover:active { transform: translateY(2px); box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.glow-on-hover:disabled { background: #475569; box-shadow: none; cursor: not-allowed; transform: none; }

.glow-on-hover:before {
  content: '';
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  position: absolute;
  top: -3px; left:-3px;
  background-size: 400%;
  z-index: -1;
  filter: blur(12px);
  width: calc(100% + 6px); height: calc(100% + 6px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  border-radius: 35px;
}

.glow-on-hover:hover:before { opacity: 1; }
.glow-on-hover:after { z-index: -1; content: ''; position: absolute; width: 100%; height: 100%; background: inherit; left: 0; top: 0; border-radius: 35px; }

@keyframes glowing { 0% { background-position: 0 0; } 50% { background-position: 400% 0; } 100% { background-position: 0 0; } }

@media (max-width: 600px) {
  .glass-panel { padding: 2rem 1rem; width: 92%; }
  header h1 { font-size: 1.8rem; }
  .ball { width: 45px; height: 45px; font-size: 1.1rem; }
  .settings-container { gap: 20px; }
  .chip { width: 38px; height: 38px; }
}
