:root {
  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --primary-color: #6c5ce7;
  --primary-hover: #5649c0;
  --text-color: #2d3436;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  /* 로또 공 색상 (한국 로또 기준) */
  --ball-color-1: #fbc400; /* 1-10 */
  --ball-color-2: #69c8f2; /* 11-20 */
  --ball-color-3: #ff7272; /* 21-30 */
  --ball-color-4: #aaaaaa; /* 31-40 */
  --ball-color-5: #b0d840; /* 41-45 */
}

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

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  background-color: var(--card-bg);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  text-align: center;
  width: 90%;
  max-width: 600px;
  transition: transform 0.3s ease;
}

.container:hover {
  transform: translateY(-5px);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-shadow: 2px 2px 0px rgba(108, 92, 231, 0.1);
}

header p {
  color: #636e72;
  margin-bottom: 2.5rem;
}

.balls-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 3rem;
  min-height: 60px;
  flex-wrap: wrap;
}

.placeholder-text {
  color: #b2bec3;
  font-size: 1.2rem;
  line-height: 60px;
  animation: pulse 2s infinite;
}

.ball {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  box-shadow: 
    inset -5px -5px 10px rgba(0,0,0,0.3),
    inset 5px 5px 10px rgba(255,255,255,0.3),
    0 5px 10px rgba(0,0,0,0.2);
  transform: scale(0);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 번호대별 색상 적용 */
.ball[data-range="1"] { background-color: var(--ball-color-1); text-shadow: 1px 1px 2px #d4a500; }
.ball[data-range="2"] { background-color: var(--ball-color-2); text-shadow: 1px 1px 2px #4da3c9; }
.ball[data-range="3"] { background-color: var(--ball-color-3); text-shadow: 1px 1px 2px #d65151; }
.ball[data-range="4"] { background-color: var(--ball-color-4); text-shadow: 1px 1px 2px #888888; }
.ball[data-range="5"] { background-color: var(--ball-color-5); text-shadow: 1px 1px 2px #8cb32f; }

.generate-btn {
  position: relative;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.generate-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.6);
}

.generate-btn:active {
  transform: translateY(1px);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shine 3s infinite;
}

@keyframes popIn {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

@media (max-width: 480px) {
  .container { padding: 1.5rem; width: 95%; }
  .ball { width: 45px; height: 45px; font-size: 1.2rem; }
  .balls-container { gap: 8px; }
  header h1 { font-size: 1.8rem; }
}