/* ============================================
   로또 추첨 페이지 - 공 디자인 · 레이아웃
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

.lotto-draw-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1a1a1a 0%, #0a0a0a 50%, #000 100%);
  color: #fff;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  padding: 5rem 1rem 2rem;
}

/* ========== 추첨 영역 ========== */
.draw-area {
  max-width: 400px;
  margin: 0 auto 2rem;
}

.draw-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ========== 글래스 원통 (반투명) ========== */
.glass-tube {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 60px / 40px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.05),
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ========== 공 컨테이너 (가로 정렬) ========== */
.balls-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-height: 80px;
}

/* ========== 공 디자인 (radial-gradient 입체 구체) ========== */
.lotto-ball {
  --ball-color: #999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.5) 15%,
    var(--ball-color) 40%,
    color-mix(in srgb, var(--ball-color) 80%, black) 100%
  );
  box-shadow:
    inset -3px -3px 8px rgba(0, 0, 0, 0.3),
    inset 2px 2px 6px rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
}

.lotto-ball .ball-inner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #000;
}

/* ========== 번호 생성 버튼 ========== */
.btn-generate {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 50%, #922b21 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  transition: opacity 0.2s, transform 0.2s;
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== 공유 / 당첨예측 버튼 ========== */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.btn-action {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-action:hover {
  transform: translateY(-1px);
}

.btn-share {
  background: linear-gradient(180deg, #4a6fa5 0%, #2d4a6f 100%);
  color: #fff;
  border: none;
}

.btn-prediction {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ========== 히스토리 영역 ========== */
.history-area {
  max-width: 400px;
  margin: 0 auto;
}

.history-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.recent-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: transform 0.35s ease, opacity 0.35s ease, max-height 0.35s ease;
}

.history-line-remove {
  transform: translateY(-100%);
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -0.5rem;
  overflow: hidden;
}

.history-line .mini-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.8) 0%,
    var(--ball-color) 50%
  );
}
