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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

h1 {
  color: #333;
  margin-bottom: 30px;
  font-size: 28px;
}

.lotto-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.ball {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: white;
  background: #ccc;
  transition: all 0.3s ease;
}

.ball.active {
  animation: pop 0.3s ease;
}

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

.ball.range1 { background: #fbc400; }
.ball.range2 { background: #69c8f2; }
.ball.range3 { background: #ff7272; }
.ball.range4 { background: #aaa; }
.ball.range5 { background: #b0d840; }

.plus {
  font-size: 24px;
  font-weight: bold;
  color: #666;
}

.bonus {
  border: 3px solid #ff7272;
}

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 50px;
  font-size: 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button:active {
  transform: translateY(0);
}

.history {
  margin-top: 30px;
  text-align: left;
}

.history h3 {
  color: #666;
  margin-bottom: 15px;
  font-size: 16px;
}

#historyList {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
}

#historyList li {
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

#historyList:empty::after {
  content: '아직 생성된 번호가 없습니다.';
  color: #999;
  font-size: 14px;
}
