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

/* ── 다크 모드 (기본) ── */
[data-theme="dark"] {
  --bg: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  --text: #ffffff;
  --subtitle: #aaaaaa;
  --theme-btn-bg: rgba(255,255,255,0.1);
  --theme-btn-color: #fff;
  --theme-btn-border: rgba(255,255,255,0.2);
}

/* ── 라이트 모드 ── */
[data-theme="light"] {
  --bg: linear-gradient(135deg, #e0eafc, #cfdef3, #a8c0ff);
  --text: #1a1a2e;
  --subtitle: #555555;
  --theme-btn-bg: rgba(0,0,0,0.08);
  --theme-btn-color: #1a1a2e;
  --theme-btn-border: rgba(0,0,0,0.15);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: 'Segoe UI', sans-serif;
  color: var(--text);
  transition: background 0.4s, color 0.4s;
}

/* ── 테마 토글 버튼 ── */
#themeBtn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--theme-btn-border);
  background: var(--theme-btn-bg);
  color: var(--theme-btn-color);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
  backdrop-filter: blur(6px);
}

#themeBtn:hover {
  transform: scale(1.1);
}

.container {
  text-align: center;
  padding: 40px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  letter-spacing: 2px;
  color: var(--text);
}

.subtitle {
  font-size: 1rem;
  color: var(--subtitle);
  margin-bottom: 40px;
}

.numbers {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
  min-height: 80px;
  align-items: center;
}

.ball {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  animation: popIn 0.4s ease forwards;
  opacity: 0;
}

.ball:nth-child(1) { animation-delay: 0.0s; }
.ball:nth-child(2) { animation-delay: 0.1s; }
.ball:nth-child(3) { animation-delay: 0.2s; }
.ball:nth-child(4) { animation-delay: 0.3s; }
.ball:nth-child(5) { animation-delay: 0.4s; }
.ball:nth-child(6) { animation-delay: 0.5s; }

@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 번호 구간별 색상 */
.range-1 { background: linear-gradient(145deg, #f9ca24, #f0932b); }
.range-2 { background: linear-gradient(145deg, #6ab04c, #badc58); }
.range-3 { background: linear-gradient(145deg, #eb4d4b, #ff7979); }
.range-4 { background: linear-gradient(145deg, #7c67ee, #a29bfe); }
.range-5 { background: linear-gradient(145deg, #74b9ff, #0984e3); }

#pickBtn {
  padding: 16px 48px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #f9ca24, #f0932b);
  color: #1a1a2e;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249,202,36,0.4);
  transition: transform 0.1s, box-shadow 0.1s;
}

#pickBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(249,202,36,0.5);
}

#pickBtn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(249,202,36,0.3);
}

.contact-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--subtitle);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.contact-link:hover {
  color: var(--text);
  border-color: var(--text);
}
