/* ================================
   기본 초기화
================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, "Noto Sans KR", sans-serif;
  background: #0d0f16;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ================================
   전체 페이지
================================ */
.page-wrap {
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 204, 0, 0.12), transparent 35%),
    #0d0f16;
}

/* ================================
   광고 영역 공통
================================ */
.ad-box {
  border: none;
  background: transparent;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0;
}

.ad-top,
.ad-bottom {
  width: min(1200px, calc(100% - 32px));
  height: 90px;
  margin: 0 auto;
}

.ad-top {
  margin-top: 16px;
}

.ad-bottom {
  margin-top: 30px;
  margin-bottom: 20px;
}

/* ================================
   헤더
================================ */
.site-header {
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 900;
  color: #ffcf33;
  letter-spacing: -1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.2s;
}

.main-nav a:hover {
  background: #ffcf33;
  color: #111111;
}

/* ================================
   메인 레이아웃
================================ */
.main-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 20px;
  align-items: stretch;
}

.ad-side {
  min-height: 620px;
  border-radius: 18px;
}

.main-content {
  min-width: 0;
}

/* ================================
   남은 경우의 수 카드
   은은한 골드 라인 효과
================================ */
.combination-card {
  position: relative;
  overflow: hidden;
  padding: 34px 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top, rgba(255, 207, 51, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(255, 207, 51, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 207, 51, 0.24);
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 카드 상단 골드 라인 */
.combination-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 207, 51, 0.85),
    transparent
  );
  opacity: 0.9;
}

/* 카드 안쪽 은은한 골드 빛 */
.combination-card::after {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 360px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(255, 207, 51, 0.16),
    rgba(255, 207, 51, 0.06) 38%,
    transparent 70%
  );
  pointer-events: none;
}

/* 카드 안의 글자와 숫자를 빛 효과 위로 올림 */
.combination-card > * {
  position: relative;
  z-index: 1;
}

.section-label {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.12);
  border: 1px solid rgba(255, 207, 51, 0.35);
  color: #ffcf33;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.combination-count {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -2px;
  text-shadow:
    0 2px 0 rgba(255, 207, 51, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.42);
  transform-origin: center;
  animation: countBreath 3.8s ease-in-out infinite;
  will-change: transform;
}

.combination-desc {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

/* ================================
   번호 생성 카드
================================ */
.generator-card,
.closed-card {
  margin-top: 22px;
  padding: 34px 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(55, 220, 120, 0.15);
  border: 1px solid rgba(55, 220, 120, 0.35);
  color: #69ef9d;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.generator-card h2,
.closed-card h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -1px;
}

.generator-desc {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

/* ================================
   번호공
================================ */
.number-result {
  margin: 30px auto 26px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lotto-ball {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffdf4d, #f6a900);
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  box-shadow:
    inset 0 3px 8px rgba(255, 255, 255, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

/* ================================
   버튼
================================ */
.generate-btn {
  width: min(360px, 100%);
  height: 60px;
  border: none;
  border-radius: 999px;
  background: #ffcf33;
  color: #111111;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(255, 207, 51, 0.25);
  transition: 0.2s;
}

.generate-btn:hover {
  transform: translateY(-2px);
  background: #ffd84d;
}

.notice-text {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.6;
}

/* ================================
   마감 카드
================================ */
.closed-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 78, 78, 0.15);
  border: 1px solid rgba(255, 78, 78, 0.35);
  color: #ff7b7b;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.closed-card p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.countdown-box {
  margin: 28px auto 0;
  padding: 22px 18px;
  max-width: 520px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.countdown-label {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
}

.countdown-time {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.countdown-time span {
  min-width: 86px;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 17px;
  font-weight: 900;
}


/* ================================
   로그인 / 회원가입 페이지
================================ */
.auth-header {
  margin-top: 24px;
}

.auth-layout {
  width: min(520px, calc(100% - 32px));
  margin: 42px auto 0;
  padding-bottom: 60px;
}

.auth-card {
  padding: 34px 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.auth-card h1 {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: -1px;
}

.auth-desc {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.6;
}

.auth-form {
  margin-top: 26px;
  text-align: left;
}

.auth-form label {
  display: block;
  margin: 16px 0 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  background: rgba(0, 0, 0, 0.24);
  color: #ffffff;
  font-size: 16px;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.auth-form input:focus {
  border-color: rgba(255, 207, 51, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 207, 51, 0.12);
}

.auth-btn {
  margin-top: 26px;
  width: 100%;
}

.auth-bottom-text {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.auth-bottom-text a {
  color: #ffcf33;
  font-weight: 900;
}

.message-box {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.error-box {
  background: rgba(255, 78, 78, 0.13);
  border: 1px solid rgba(255, 78, 78, 0.35);
  color: #ff8c8c;
}

.success-box {
  background: rgba(55, 220, 120, 0.13);
  border: 1px solid rgba(55, 220, 120, 0.35);
  color: #7dffa8;
}

.login-name {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.12);
  border: 1px solid rgba(255, 207, 51, 0.28);
  color: #ffcf33;
  font-size: 14px;
  font-weight: 900;
}

/* ================================
   번호추출 기록 페이지
================================ */
.history-layout {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  padding-bottom: 20px;
}

.history-header-card {
  padding: 34px 24px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 207, 51, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 207, 51, 0.24);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.history-header-card h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1px;
}

.history-header-card p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

.history-message {
  width: 100%;
}

.empty-history-card {
  margin-top: 22px;
  padding: 40px 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.empty-history-card h2 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
}

.empty-history-card p {
  margin-top: 12px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.history-main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.history-list {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.history-item {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}

.history-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.history-id {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.12);
  border: 1px solid rgba(255, 207, 51, 0.28);
  color: #ffcf33;
  font-size: 13px;
  font-weight: 900;
}

.history-date {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.history-rank {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(55, 220, 120, 0.13);
  border: 1px solid rgba(55, 220, 120, 0.35);
  color: #7dffa8;
  font-size: 13px;
  font-weight: 900;
}

.history-number-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-ball {
  width: 50px;
  height: 50px;
  font-size: 21px;
}

.history-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 700;
}

/* 모바일 기록 페이지 */
@media (max-width: 600px) {
  .history-item {
    padding: 18px;
    border-radius: 20px;
  }

  .history-item-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-number-row {
    justify-content: center;
  }

  .history-ball {
    width: 46px;
    height: 46px;
    font-size: 19px;
  }

  .history-meta {
    justify-content: center;
  }
}



/* 모바일 로그인 페이지 */
@media (max-width: 900px) {
  .login-name {
    font-size: 13px;
    padding: 8px 11px;
  }

  .auth-layout {
    margin-top: 28px;
  }

  .auth-card {
    padding: 28px 18px;
    border-radius: 22px;
  }
}

/* ================================
   모바일 반응형
================================ */
@media (max-width: 900px) {
  .ad-top,
  .ad-bottom {
    height: 74px;
  }

  .header-inner {
    padding: 16px;
    flex-direction: column;
    gap: 14px;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .main-nav a {
    font-size: 13px;
    padding: 8px 11px;
  }

  .main-layout {
    display: block;
  }

  .ad-side {
    display: none;
  }

  .combination-card,
  .generator-card,
  .closed-card {
    border-radius: 22px;
    padding: 28px 18px;
  }

  .lotto-ball {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .number-result {
    gap: 9px;
  }

  .generate-btn {
    height: 56px;
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .logo {
    font-size: 22px;
  }

  .combination-count {
    font-size: 42px;
  }

  .lotto-ball {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .countdown-time span {
    min-width: 70px;
    font-size: 15px;
  }
}

/* ================================
   카운트다운 안내 문구
================================ */
.countdown-notice {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.6;
}

/* ================================
   현재 회차 표시
================================ */
.current-draw-text {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.6;
}

.current-draw-text strong {
  color: #ffcf33;
  font-weight: 900;
}

/* =========================
   Premium Footer
========================= */
.site-footer {
  width: min(1200px, calc(100% - 32px));
  margin: 90px auto 42px;
  color: #d1d5db;
}

.footer-inner {
  width: 100%;
  padding: 34px 36px 30px;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(31, 41, 55, 0.96), rgba(12, 15, 22, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 24px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: #facc15;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.footer-brand p {
  margin: 14px 0 0;
  color: #aeb4c0;
  font-size: 14px;
  line-height: 1.7;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 420px;
}

.footer-menu a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}

.footer-menu a:hover {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.08);
}

.footer-notice {
  margin-top: 22px;
  padding: 15px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(250, 204, 21, 0.22);
}

.footer-notice p {
  margin: 0;
  color: #c7cdd6;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
}

.footer-bottom p {
  margin: 0;
  color: #7f8794;
  font-size: 12px;
}

@media (max-width: 720px) {
  .site-footer {
    width: calc(100% - 28px);
    margin: 70px auto 34px;
  }

  .footer-inner {
    padding: 28px 20px 26px;
    border-radius: 20px;
  }

  .footer-top {
    flex-direction: column;
    gap: 22px;
    text-align: center;
    align-items: center;
  }

  .footer-brand p {
    font-size: 13px;
  }

  .footer-menu {
    justify-content: center;
    max-width: 100%;
  }

  .footer-menu a {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .footer-notice p {
    font-size: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .footer-bottom p {
    font-size: 11px;
  }
}

/* ================================
   약관 / 개인정보처리방침 페이지
================================ */
.policy-layout {
  width: min(920px, calc(100% - 32px));
  margin: 42px auto 0;
  display: block;
}

.policy-card {
  padding: 40px 34px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 207, 51, 0.12), rgba(255, 255, 255, 0.055));
  border: 1px solid rgba(255, 207, 51, 0.20);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.policy-card h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -1.5px;
  text-align: center;
}

.policy-desc {
  max-width: 680px;
  margin: 16px auto 34px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

.policy-content {
  padding: 28px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.policy-content h2 {
  margin-top: 30px;
  margin-bottom: 10px;
  color: #ffcf33;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.policy-content h2:first-child {
  margin-top: 0;
}

.policy-content p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.85;
  word-break: keep-all;
}

.policy-date {
  margin-top: 34px !important;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.50) !important;
  font-size: 13px !important;
  text-align: right;
}

@media (max-width: 720px) {
  .policy-layout {
    margin-top: 30px;
  }

  .policy-card {
    padding: 30px 18px;
    border-radius: 22px;
  }

  .policy-content {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .policy-card h1 {
    font-size: 32px;
  }

  .policy-desc,
  .policy-content p {
    font-size: 14px;
  }

  .policy-content h2 {
    font-size: 18px;
  }

  .policy-date {
    text-align: left;
  }
}

/* ================================
   당첨기록 페이지
================================ */
.winners-layout {
  width: min(1100px, calc(100% - 32px));
  margin: 42px auto 0;
}

/* 상단 광고 영역 */
.winners-ad-top {
  margin-top: 18px;
  margin-bottom: 0;
}

/* 하단 광고 영역 */
.winners-ad-bottom {
  margin-top: 34px;
  margin-bottom: 0;
}

/* 당첨기록 상단 소개 */
.winners-hero {
  padding: 42px 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(255, 207, 51, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 207, 51, 0.13), rgba(255, 255, 255, 0.055));
  border: 1px solid rgba(255, 207, 51, 0.22);
  text-align: center;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.winners-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -1.8px;
  color: #ffffff;
}

.winners-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.75;
  word-break: keep-all;
}

/* 당첨기록 카드 */
.winners-card {
  margin-top: 24px;
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

/* 카드 상단 */
.winners-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.winners-card-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: #ffffff;
}

.winners-card-head p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.6;
}

/* 회차별 스크롤 */
.draw-scroll {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 460px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.draw-scroll::-webkit-scrollbar {
  height: 5px;
}

.draw-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.draw-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 207, 51, 0.35);
  border-radius: 999px;
}

.draw-chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 207, 51, 0.22);
  background: rgba(255, 207, 51, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.draw-chip:hover {
  color: #111111;
  background: #ffcf33;
  border-color: #ffcf33;
}

.draw-chip.active {
  color: #111111;
  background: #ffcf33;
  border-color: #ffcf33;
  box-shadow: 0 8px 18px rgba(255, 207, 51, 0.20);
}

/* 테이블 감싸는 영역 */
.winners-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
}

/* 테이블 */
.winners-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.winners-table th,
.winners-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
}

.winners-table th {
  background: rgba(255, 207, 51, 0.11);
  color: #ffcf33;
  font-weight: 900;
}

.winners-table td {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 700;
}

.winners-table tbody tr:last-child td {
  border-bottom: none;
}

.winners-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* 등수 배지 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.rank-1 {
  background: rgba(255, 207, 51, 0.16);
  border: 1px solid rgba(255, 207, 51, 0.38);
  color: #ffcf33;
}

.rank-2 {
  background: rgba(180, 220, 255, 0.14);
  border: 1px solid rgba(180, 220, 255, 0.34);
  color: #b8dcff;
}

.rank-3 {
  background: rgba(55, 220, 120, 0.13);
  border: 1px solid rgba(55, 220, 120, 0.35);
  color: #7dffa8;
}

.rank-4,
.rank-5 {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
}

/* 작은 번호공 */
.mini-ball-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.mini-ball-row span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffdf4d, #f6a900);
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.42),
    0 5px 12px rgba(0, 0, 0, 0.25);
}

/* 하단 설명 */
.winners-bottom-text {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
}

/* 안내 박스 */
.winners-notice {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px dashed rgba(255, 207, 51, 0.24);
  text-align: center;
}

.winners-notice strong {
  display: inline-block;
  margin-bottom: 8px;
  color: #ffcf33;
  font-size: 15px;
  font-weight: 900;
}

.winners-notice p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

/* ================================
   당첨기록 페이지
================================ */
.winners-layout {
  width: min(1100px, calc(100% - 32px));
  margin: 42px auto 0;
}

/* 상단 광고 영역 */
.winners-ad-top {
  margin-top: 18px;
  margin-bottom: 0;
}

/* 하단 광고 영역 */
.winners-ad-bottom {
  margin-top: 34px;
  margin-bottom: 0;
}

/* 당첨기록 상단 소개 */
.winners-hero {
  padding: 42px 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(255, 207, 51, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 207, 51, 0.13), rgba(255, 255, 255, 0.055));
  border: 1px solid rgba(255, 207, 51, 0.22);
  text-align: center;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.winners-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -1.8px;
  color: #ffffff;
}

.winners-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.75;
  word-break: keep-all;
}

/* 당첨기록 카드 */
.winners-card {
  margin-top: 24px;
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

/* 카드 상단 */
.winners-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.winners-card-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: #ffffff;
}

.winners-card-head p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.6;
}

/* ================================
   회차 선택 드롭다운
================================ */
.draw-select-wrap {
  position: relative;
  width: 220px;
  flex: 0 0 auto;
}

.draw-select-btn {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 207, 51, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 207, 51, 0.12), rgba(255, 255, 255, 0.045));
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  transition: 0.2s ease;
}

.draw-select-btn:hover {
  border-color: rgba(255, 207, 51, 0.85);
  background:
    linear-gradient(135deg, rgba(255, 207, 51, 0.18), rgba(255, 255, 255, 0.06));
}

.draw-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffcf33;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.draw-select-btn.open .draw-arrow {
  transform: rotate(180deg);
}

.draw-options {
  position: absolute;
  top: 56px;
  left: 0;
  z-index: 50;

  width: 100%;
  max-height: 230px;
  overflow-y: auto;

  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 207, 51, 0.24);
  background:
    linear-gradient(135deg, rgba(31, 41, 55, 0.98), rgba(12, 15, 22, 0.98));

  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  display: none;
}

.draw-options.open {
  display: block;
}

.draw-options button {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: 0.18s ease;
}

.draw-options button:hover {
  background: rgba(255, 207, 51, 0.12);
  color: #ffcf33;
}

.draw-options button.active {
  background: rgba(255, 207, 51, 0.18);
  color: #ffcf33;
}

.draw-options::-webkit-scrollbar {
  width: 6px;
}

.draw-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.draw-options::-webkit-scrollbar-thumb {
  background: rgba(255, 207, 51, 0.45);
  border-radius: 999px;
}

/* 테이블 감싸는 영역 */
.winners-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
}

/* 테이블 */
.winners-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.winners-table th,
.winners-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
}

.winners-table th {
  background: rgba(255, 207, 51, 0.11);
  color: #ffcf33;
  font-weight: 900;
}

.winners-table td {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 700;
}

.winners-table tbody tr:last-child td {
  border-bottom: none;
}

.winners-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* 등수 배지 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.rank-1 {
  background: rgba(255, 207, 51, 0.16);
  border: 1px solid rgba(255, 207, 51, 0.38);
  color: #ffcf33;
}

.rank-2 {
  background: rgba(180, 220, 255, 0.14);
  border: 1px solid rgba(180, 220, 255, 0.34);
  color: #b8dcff;
}

.rank-3 {
  background: rgba(55, 220, 120, 0.13);
  border: 1px solid rgba(55, 220, 120, 0.35);
  color: #7dffa8;
}

.rank-4,
.rank-5 {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
}

/* 작은 번호공 */
.mini-ball-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.mini-ball-row span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffdf4d, #f6a900);
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.42),
    0 5px 12px rgba(0, 0, 0, 0.25);
}

/* 하단 설명 */
.winners-bottom-text {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
}

/* 안내 박스 */
.winners-notice {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px dashed rgba(255, 207, 51, 0.24);
  text-align: center;
}

.winners-notice strong {
  display: inline-block;
  margin-bottom: 8px;
  color: #ffcf33;
  font-size: 15px;
  font-weight: 900;
}

.winners-notice p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

/* ================================
   당첨기록 페이지 모바일
================================ */
@media (max-width: 900px) {
  .winners-ad-top,
  .winners-ad-bottom {
    width: min(100% - 28px, 728px);
    height: 74px;
    font-size: 12px;
  }

  .winners-ad-top {
    margin-top: 16px;
  }

  .winners-ad-bottom {
    margin-top: 28px;
  }

  .winners-layout {
    width: min(100% - 28px, 728px);
    margin: 30px auto 0;
  }

  .winners-hero {
    padding: 32px 18px;
    border-radius: 22px;
  }

  .winners-hero h1 {
    font-size: 34px;
  }

  .winners-hero p {
    font-size: 14px;
  }

  .winners-card {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .winners-card-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }

  .winners-card-head h2 {
    font-size: 24px;
  }

  .draw-select-wrap {
    width: 100%;
    max-width: 240px;
  }

  .draw-select-btn {
    height: 46px;
    font-size: 15px;
  }

  .draw-options {
    top: 54px;
  }

  .draw-options button {
    height: 40px;
    font-size: 14px;
  }

  .winners-table {
    min-width: 920px;
  }

  .winners-table th,
  .winners-table td {
    padding: 14px 12px;
    font-size: 13px;
  }

  .winners-notice {
    padding: 16px 14px;
  }

  .winners-notice p {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .winners-hero h1 {
    font-size: 30px;
  }

  .winners-card-head h2 {
    font-size: 22px;
  }

  .draw-select-wrap {
    max-width: 220px;
  }

  .draw-select-btn {
    height: 44px;
    font-size: 14px;
    padding: 0 16px 0 18px;
  }

  .mini-ball-row span {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}

/* ================================
   모바일 번호공 1줄 정렬 강제 보정
================================ */
@media (max-width: 600px) {
  .number-result,
  .history-number-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .number-result .lotto-ball,
  .history-number-row .lotto-ball,
  .history-number-row .history-ball,
  .lotto-ball.history-ball {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    flex: 0 0 38px !important;
    font-size: 17px !important;
    line-height: 38px !important;
  }
}

@media (max-width: 380px) {
  .number-result,
  .history-number-row {
    gap: 4px !important;
  }

  .number-result .lotto-ball,
  .history-number-row .lotto-ball,
  .history-number-row .history-ball,
  .lotto-ball.history-ball {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    flex: 0 0 35px !important;
    font-size: 15px !important;
    line-height: 35px !important;
  }
}

/* ================================
   모바일 상단 메뉴 2줄 정렬 보정
   로그아웃 기준:
   1줄: 번호생성 / 번호추출기록 / 당첨기록
   2줄: 로또정보 / 로그인 / 회원가입

   로그인 기준:
   1줄: 번호생성 / 번호추출기록 / 당첨기록
   2줄: 로또정보 / 회원명 / 로그아웃
================================ */
@media (max-width: 600px) {
  .main-nav {
    display: grid !important;
    grid-template-columns: repeat(6, auto);
    justify-content: center;
    align-items: center;
    column-gap: 10px;
    row-gap: 12px;
    width: 100%;
  }

  .main-nav a {
    font-size: 14px !important;
    padding: 7px 5px !important;
    white-space: nowrap;
    text-align: center;
  }

  .main-nav .login-name {
    font-size: 14px !important;
    padding: 7px 12px !important;
    white-space: nowrap;
    text-align: center;
    justify-self: center;
  }

  /* 1줄: 번호생성 / 번호추출기록 / 당첨기록 */
  .main-nav a:nth-of-type(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .main-nav a:nth-of-type(2) {
    grid-column: 3 / 5;
    grid-row: 1;
  }

  .main-nav a:nth-of-type(3) {
    grid-column: 5 / 7;
    grid-row: 1;
  }

  /* 2줄 첫 번째: 로또정보 */
  .main-nav a:nth-of-type(4) {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  /* 로그아웃 상태: 로그인 */
  .main-nav a:nth-of-type(5) {
    grid-column: 3 / 5;
    grid-row: 2;
  }

  /* 로그아웃 상태: 회원가입 */
  .main-nav a:nth-of-type(6) {
    grid-column: 5 / 7;
    grid-row: 2;
  }

  /* 로그인 상태: 회원명 */
  .main-nav .login-name {
    grid-column: 3 / 5;
    grid-row: 2;
  }

  /* 로그인 상태: 로그아웃 */
  .main-nav .login-name + a {
    grid-column: 5 / 7;
    grid-row: 2;
  }
}

/* ================================
   모바일 메인 번호공 / 버튼 정리
================================ */
.generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 600px) {
  .generator-card {
    padding-bottom: 34px !important;
    overflow: visible !important;
  }

  .number-result {
    margin: 28px auto 24px !important;
    padding: 0 0 4px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 7px !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .number-result .lotto-ball {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    flex: 0 0 42px !important;
    font-size: 18px !important;
    line-height: 42px !important;
  }

  .login-required-btn {
    margin-top: 2px !important;
  }

  .notice-text {
    margin-top: 20px !important;
  }
}

@media (max-width: 380px) {
  .number-result {
    gap: 5px !important;
  }

  .number-result .lotto-ball {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    flex: 0 0 38px !important;
    font-size: 16px !important;
    line-height: 38px !important;
  }
}

/* ================================
   남은 경우의 수 숫자 은은한 호흡 효과
================================ */
@keyframes countBreath {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.018);
  }

  100% {
    transform: scale(1);
  }
}