@charset "UTF-8";

.random-number-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 56px;
}

/* 상단 */

.random-number-page .utility-top {
  padding: 32px 20px 28px;
  text-align: center;
}

.random-number-page .utility-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.random-number-page .utility-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.random-number-page .utility-desc {
  max-width: 860px;
  margin: 16px auto 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}

/* 요약 카드 */

.random-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.random-summary-item {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.random-summary-item::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.random-summary-item strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.random-summary-item span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

/* 메인 카드 */

.random-main-card,
.random-history-card {
  padding: 30px;
  margin-top: 18px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.random-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.random-card-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.random-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.random-status-badge {
  flex: 0 0 auto;
  min-width: 90px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

/* 레이아웃 */

.random-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
}

/* 결과 카드 */

.random-result-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.random-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.random-result-top span {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.random-result-top small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

/* 결과 영역 */

.random-result-box {
  min-height: 240px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 18% 18%, rgba(6, 182, 212, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef8fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: clamp(72px, 8vw, 108px);
  font-weight: 950;
  letter-spacing: -0.06em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 18px 34px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.random-result-box.is-animating {
  animation: randomPulse 0.6s ease;
}

@keyframes randomPulse {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.04);
  }

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

/* 여러 개 결과 */

.result-chip-wrap {
  flex-wrap: wrap;
  gap: 12px;
  align-content: center;
  padding: 26px;
  font-size: initial;
}

.result-chip {
  min-width: 64px;
  height: 64px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

/* 통계 */

.random-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.random-stat-grid div,
.random-history-summary div {
  min-height: 88px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.random-stat-grid span,
.random-history-summary span {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.random-stat-grid strong,
.random-history-summary strong {
  display: block;
  color: #0f172a;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

/* 컨트롤 카드 */

.random-control-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.random-range-grid {
  display: grid;
  grid-template-columns: 1fr 26px 1fr;
  align-items: end;
  gap: 10px;
}

.random-range-divider {
  padding-bottom: 14px;
  color: #94a3b8;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.random-option-group {
  margin-top: 22px;
}

.random-option-title {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

/* 칩 버튼 */

.random-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.random-chip-btn,
.random-count-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.random-chip-btn:hover,
.random-count-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.random-chip-btn.is-active,
.random-count-btn.is-active {
  border-color: rgba(6, 182, 212, 0.4);
  background: #ecfeff;
  color: #155e75;
}

/* 옵션 */

.random-option-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.random-option-pill {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.random-option-pill input {
  width: 14px;
  height: 14px;
  accent-color: #06b6d4;
}

.random-hidden-input {
  display: none;
}

/* 입력 */

.random-select {
  width: 100%;
}

.random-exclude-box {
  min-height: 100px;
  resize: vertical;
}

.random-field-help {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.7;
}

/* 버튼 */

.random-btn-row {
  margin-top: 22px;
}

.random-number-page .utility-btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

.random-number-page .utility-btn-primary {
  border-color: #0f172a;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
}

.random-number-page .utility-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

/* 메시지 */

.random-message {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(6, 182, 212, 0.16);
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  color: #155e75;
  font-size: 14px;
  line-height: 1.7;
}

/* 기록 */

.random-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.random-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.random-history-list li {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.random-history-empty {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 120px !important;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.history-index {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
}

.history-result {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  word-break: break-word;
}

.history-extra {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.random-history-clear {
  background: #ffffff;
}

/* 도움말 */

.random-number-page .help-panel {
  margin-top: 34px;
}

.random-number-page .help-panel > h2 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.random-number-page .help-box {
  border-radius: 22px;
}

.random-number-page .help-toggle-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  color: #0f172a;
  font-size: 1.06rem;
  font-weight: 800;
}

.random-number-page .help-toggle-box summary::-webkit-details-marker {
  display: none;
}

.random-number-page .help-toggle-box summary::after {
  content: "+";
  flex: 0 0 auto;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 700;
}

.random-number-page .help-toggle-box[open] summary::after {
  content: "−";
}

.random-number-page .help-toggle-content {
  margin-top: 14px;
}

.random-number-page .help-toggle-content p {
  margin: 0;
  color: #334155;
  line-height: 1.8;
}

/* 반응형 */

@media (max-width: 980px) {
  .random-summary-card,
  .random-layout {
    grid-template-columns: 1fr;
  }

  .random-control-card {
    order: -1;
  }
}

@media (max-width: 768px) {
  .random-main-card,
  .random-history-card {
    padding: 22px;
    border-radius: 22px;
  }

  .random-card-head {
    flex-direction: column;
  }

  .random-stat-grid,
  .random-history-summary,
  .random-option-box {
    grid-template-columns: 1fr;
  }

  .random-range-grid {
    grid-template-columns: 1fr;
  }

  .random-range-divider {
    display: none;
  }

  .random-history-list li {
    grid-template-columns: 1fr;
  }

  .history-extra {
    text-align: left;
  }

  .random-result-box {
    min-height: 180px;
    font-size: 72px;
  }

  .result-chip {
    min-width: 56px;
    height: 56px;
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .random-chip-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .random-number-page .utility-title {
    font-size: 32px;
  }
}