/* /var/www/html/assets/css/lotto.css : 로또 번호 생성기 전용 스타일.
   style.css 다크 테마 위에 얹는다. 로또 공식 볼 색상(1~10 노랑 / 11~20 파랑 / 21~30 빨강 / 31~40 회색 / 41~45 초록). */

.lt-tool {
  display: block;
  margin-top: 6px;
}

/* ---------- 설정 영역 ---------- */
.lt-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.lt-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lt-field-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

/* 게임 수 스테퍼 */
.lt-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.lt-step {
  appearance: none;
  width: 40px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lt-step:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.lt-step:disabled { opacity: 0.35; cursor: not-allowed; }
.lt-count-input {
  width: 56px;
  height: 44px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  -moz-appearance: textfield;
}
.lt-count-input::-webkit-outer-spin-button,
.lt-count-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.lt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ---------- 제외 번호 그리드(접이식) ---------- */
.lt-exclude {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
.lt-exclude summary {
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lt-exclude summary::-webkit-details-marker { display: none; }
.lt-exclude summary::before { content: "▸"; color: var(--muted); transition: transform 0.15s ease; }
.lt-exclude[open] summary::before { transform: rotate(90deg); }
.lt-exclude-body { padding: 0 16px 16px; }
.lt-exclude-hint { margin: 0 0 12px; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.lt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 7px;
}
.lt-cell {
  aspect-ratio: 1 / 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}
.lt-cell:hover { transform: translateY(-1px); border-color: var(--text); }
.lt-cell.is-excluded {
  background: rgba(235, 111, 111, 0.9);
  border-color: rgba(235, 111, 111, 0.9);
  color: #fff;
  text-decoration: line-through;
}

/* ---------- 결과 영역 ---------- */
.lt-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.lt-game {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.lt-game-label {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--text);
  color: #111;
  font-weight: 800;
}
.lt-balls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lt-ball {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.05rem;
  color: #1a1a1a;
  box-shadow: inset -3px -4px 6px rgba(0,0,0,0.28), inset 2px 2px 5px rgba(255,255,255,0.55), 0 3px 6px rgba(0,0,0,0.35);
  will-change: transform, opacity;
}
/* 애니메이션: 튀어오르며 등장 */
.lt-ball.is-anim { animation: lt-pop 0.45s cubic-bezier(0.18, 0.9, 0.32, 1.35) both; }
@keyframes lt-pop {
  0%   { transform: scale(0) rotate(-160deg); opacity: 0; }
  70%  { transform: scale(1.12) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lt-ball.is-anim { animation: none; }
}

/* 구간별 공식 색상 */
.lt-ball.r1 { background: radial-gradient(circle at 34% 30%, #ffe07a, #fbc400); color: #4a3800; }   /* 1-10 노랑 */
.lt-ball.r2 { background: radial-gradient(circle at 34% 30%, #a9def8, #69c8f2); color: #0b3247; }   /* 11-20 파랑 */
.lt-ball.r3 { background: radial-gradient(circle at 34% 30%, #ffabab, #ff5b5b); color: #4d0000; }   /* 21-30 빨강 */
.lt-ball.r4 { background: radial-gradient(circle at 34% 30%, #cfcfcf, #9a9a9a); color: #1e1e1e; }   /* 31-40 회색 */
.lt-ball.r5 { background: radial-gradient(circle at 34% 30%, #cfe97a, #a5cf3f); color: #223000; }   /* 41-45 초록 */

/* 보너스 구분자 + 라벨 */
.lt-plus { flex: 0 0 auto; color: var(--muted); font-size: 1.4rem; font-weight: 700; }
.lt-bonus-tag {
  flex: 0 0 auto;
  align-self: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.lt-game-stat {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
  line-height: 1.5;
}
.lt-game-stat b { color: var(--text); }

.lt-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.lt-status { margin-top: 14px; min-height: 20px; color: var(--muted); font-size: 0.9rem; }
.lt-status.is-error { color: #eb6f6f; }

/* ---------- 가이드 ---------- */
.lt-guide { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.lt-guide h2 { font-size: 1.25rem; margin: 0 0 10px; }
.lt-guide h3 { margin: 20px 0 4px; font-size: 1rem; }
.lt-guide p, .lt-guide li { color: rgba(245, 245, 242, 0.78); line-height: 1.7; }

@media (max-width: 560px) {
  .lt-actions { margin-left: 0; width: 100%; }
  .lt-actions .btn { flex: 1; }
  .lt-ball { width: 40px; height: 40px; font-size: 0.95rem; }
  .lt-game-stat { margin-left: 0; width: 100%; text-align: left; }
}
