:root {
  --bg: #f6f8ff;
  --card: #ffffff;
  --accent: #5a5cff;
  --text: #1a1a2e;
  --muted: #5f6c85;
  --border: rgba(90, 92, 255, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Noto Sans KR', sans-serif;
  background:
    radial-gradient(
      circle at top,
      #dfe7ff 0%,
      var(--bg) 45%
    );

  color: var(--text);

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 24px;
}

.container {
  width: min(1200px, 98%);
  text-align: center;
}

h1 {
  margin: 0 0 12px;

  font-size:
    clamp(2rem, 3vw, 2.8rem);
}

.description {
  margin: 0 0 24px;

  color: var(--muted);

  line-height: 1.6;
}

.card,
.history-card {
  background: var(--card);

  border:
    1px solid var(--border);

  border-radius: 24px;

  box-shadow:
    0 18px 50px
    rgba(32, 40, 70, 0.08);

  padding: 28px;

  margin-bottom: 20px;
}

.draw-settings {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 12px;

  flex-wrap: wrap;

  margin-bottom: 22px;
}

.draw-settings label {
  font-weight: 700;
}

.draw-settings select {
  padding: 10px 14px;

  border-radius: 12px;

  border:
    2px solid var(--border);

  font-size: 1rem;

  font-weight: 700;

  background: white;

  cursor: pointer;
}

.number-display {
  min-height: 120px;

  display: grid;

  place-items: center;

  font-size: 3rem;

  font-weight: 800;

  border:
    2px dashed var(--border);

  border-radius: 24px;

  margin-bottom: 22px;

  color: var(--accent);

  letter-spacing: 0.02em;

  background: #fbfcff;

  padding: 20px;

  word-break: break-word;
}

.number-display.placeholder {

  font-size: 1.15rem;

  font-weight: 700;

  color: var(--muted);

  background:
    linear-gradient(
      135deg,
      rgba(123, 63, 255, 0.18),
      rgba(109, 114, 255, 0.12)
    );
}

.number-display.notice {

  font-size: 1.05rem;

  font-weight: 900;

  color: white;

  background:
    linear-gradient(
      135deg,
      #ff6b6b,
      #ff8e72
    );

  border: none;
}

button {

  width: 100%;

  border: none;

  border-radius: 16px;

  padding: 16px 18px;

  font-size: 1.05rem;

  font-weight: 700;

  cursor: pointer;

  transition: 0.2s;
}

#drawButton {

  background:
    linear-gradient(
      135deg,
      #5a5cff,
      #6d72ff
    );

  color: white;

  margin-bottom: 12px;
}

.secondary {

  background: #eef0ff;

  color: var(--text);
}

button:hover {
  transform: translateY(-2px);
}

.picked-numbers {

  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 10px;

  padding-top: 12px;

  min-height: 72px;
}

.picked-numbers span {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: 46px;

  height: 46px;

  border-radius: 14px;

  background: #f4f5ff;

  font-weight: 700;
}

.number-grid {

  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 16px;

  margin-top: 20px;

  padding: 18px;
}

.number-cell {

  display: flex;

  align-items: center;

  justify-content: center;

  min-height: 84px;

  border-radius: 14px;

  background:
    linear-gradient(
      180deg,
      #e0c3fc 0%,
      #8ec5fc 100%
    );

  font-weight: 900;

  color: #0b1430;

  font-size:
    clamp(1rem, 2.4vw, 1.6rem);

  transition: 0.15s;

  box-shadow:
    0 14px 34px rgba(14,30,80,0.08),
    inset 0 6px 18px rgba(255,255,255,0.25);
}

.number-cell.spark {

  transform: scale(1.05);

  border: 4px solid gold;

  box-shadow:
    0 0 24px rgba(255, 215, 0, 0.8),
    0 0 60px rgba(255, 200, 0, 0.4);
}

.number-cell.picked {

  color: white;

  background:
    linear-gradient(
      135deg,
      #ffd56b 0%,
      #ff9a6b 50%,
      #ff6b6b 100%
    );

  transform: scale(1.08);
}

.big-overlay {

  position: fixed;

  inset: 0;

  display: grid;

  place-items: center;

  backdrop-filter: blur(6px);

  background: rgba(0,0,0,0.3);

  z-index: 1000;

  opacity: 0;

  pointer-events: none;

  transition: 0.25s;
}

.big-overlay.show {

  opacity: 1;

  pointer-events: auto;
}

.big-number {

  width: min(92vw, 980px);

  min-height: 300px;

  border-radius: 28px;

  display: grid;

  place-items: center;

  padding: 30px;

  font-size:
    clamp(3rem, 10vw, 8rem);

  font-weight: 900;

  color: white;

  text-align: center;

  word-break: break-word;

  background:
    linear-gradient(
      135deg,
      #7b2ff7 0%,
      #ff6b6b 60%
    );

  box-shadow:
    0 60px 120px
    rgba(120,40,200,0.22);
}

@media (max-width: 600px) {

  .number-grid {

    grid-template-columns:
      repeat(4, 1fr);
  }

  .number-display {

    font-size: 2rem;
  }
}