/* =========================================================
   오늘운 - style.css
   디자인 방향: 딥 네이비 밤하늘 + 은은한 골드 포인트,
   깔끔한 카드형 UI, 모바일/PC 반응형
   ========================================================= */

:root {
  --color-bg: #0b1026;
  --color-bg-soft: #121935;
  --color-card: #161f42;
  --color-card-border: rgba(255, 255, 255, 0.08);
  --color-text: #eef1fb;
  --color-text-muted: #a7aed1;
  --color-gold: #d9b978;
  --color-gold-soft: #e9d4a4;
  --color-accent: #7c9bff;
  --color-danger: #ff8fa3;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --max-width: 1080px;
}

@media (min-width: 900px) {
  :root {
    --max-width: 1180px;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

body {
  background: radial-gradient(ellipse at top, #16204a 0%, #0b1026 55%, #070a1a 100%);
  color: var(--color-text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 배경 별 효과 */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 120px 90px, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 200px 40px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 260px 150px, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 340px 60px, rgba(255,255,255,0.45), transparent),
    radial-gradient(1.5px 1.5px at 400px 200px, rgba(255,255,255,0.3), transparent);
  background-repeat: repeat;
  background-size: 420px 260px;
  opacity: 0.6;
}

.site-header {
  position: relative;
  z-index: 1;
  padding: 24px 0 0;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-gold-soft);
  margin: 0;
}

main.container {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  padding-bottom: 60px;
}

.screen.hidden {
  display: none;
}

/* ---------------- Hero ---------------- */
.hero {
  text-align: center;
  padding: 40px 0 28px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 10px;
  background: linear-gradient(90deg, #ffffff 0%, var(--color-gold-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0;
}

/* ---------------- Card base ---------------- */
.card {
  background: linear-gradient(160deg, var(--color-card) 0%, #131b3a 100%);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.form-card {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------------- Form ---------------- */
.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.required {
  color: var(--color-gold);
}

.optional {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255,255,255,0.35);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-gold);
  background: rgba(255, 255, 255, 0.07);
}

/* 날짜/시간 picker 아이콘이 어두운 배경에서도 보이도록 */
input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

/* select 본체(닫힌 상태)는 다크 디자인 유지, 펼친 옵션 목록만 밝은 배경 + 진한 글자색 */
select option {
  background: #ffffff;
  color: #111827;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

.field-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin: 6px 0 0;
  min-height: 1.2em;
}

.field-hint {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 6px 0 0;
  text-align: right;
}

/* 태어난 시간 토글 */
.birthtime-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.toggle-btn {
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.toggle-btn.active {
  border-color: var(--color-gold);
  background: rgba(217, 185, 120, 0.14);
  color: var(--color-gold-soft);
  font-weight: 600;
}

.toggle-btn:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.copy-btn:focus-visible {
  outline: 2px solid var(--color-gold-soft);
  outline-offset: 3px;
}

.birthtime-inputs.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 성별 선택 */
.gender-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pill span {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.radio-pill input:checked + span {
  border-color: var(--color-gold);
  background: rgba(217, 185, 120, 0.14);
  color: var(--color-gold-soft);
  font-weight: 600;
}

.radio-pill input:focus-visible + span {
  outline: 2px solid var(--color-gold-soft);
  outline-offset: 3px;
}

/* 버튼 */
.primary-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--color-gold) 0%, #c9a05c 100%);
  color: #1a1300;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(217, 185, 120, 0.25);
}

.primary-btn:active {
  transform: translateY(0);
}

.ghost-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.ghost-btn:hover {
  color: var(--color-text);
  border-color: var(--color-gold);
}

.privacy-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  max-width: 480px;
  margin: 22px auto 0;
}

/* ---------------- Result screen ---------------- */
.result-top {
  text-align: center;
  padding: 4px 0 20px;
}

.result-brand {
  margin: 0 0 18px;
}

.result-brand-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--color-gold);
  margin: 0 0 8px;
  text-transform: uppercase;
}

.result-brand-tagline {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #ffffff 0%, var(--color-gold-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-brand-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
}

.result-name {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 4px 0 6px;
  color: var(--color-text);
}

.result-date {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--color-gold-soft);
}

.concern-card {
  max-width: 560px;
  margin: 0 auto 24px;
  padding: 22px 24px;
}

.concern-card.hidden {
  display: none;
}

.concern-label {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 0 0 8px;
}

.concern-text {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.total-card {
  max-width: 560px;
  margin: 0 auto 36px;
  padding: 34px 28px;
  text-align: center;
}

.gauge-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
}

.gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.gauge-fg {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.8s ease;
}

.gauge-score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text);
}

.total-status {
  display: inline-block;
  color: var(--color-gold-soft);
  background: rgba(217, 185, 120, 0.12);
  border: 1px solid rgba(217, 185, 120, 0.3);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 4px 0 14px;
}

.total-comment-group {
  margin: 4px 0 0;
  text-align: left;
}

.total-comment-group p {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 10px;
}

.total-comment-group p:last-child {
  margin-bottom: 0;
}

/* 세부 운세 카드 그리드 */
.detail-section {
  margin-bottom: 36px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.detail-card {
  padding: 22px;
  transition: border-color 0.15s ease;
}

.detail-card.highlight {
  border-color: var(--color-gold);
  background: linear-gradient(160deg, #1c2650 0%, #182047 100%);
  box-shadow: 0 10px 30px rgba(217, 185, 120, 0.12);
}

.detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.detail-card-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.detail-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 185, 120, 0.12);
  color: var(--color-gold);
}

.detail-icon svg {
  width: 18px;
  height: 18px;
}

.detail-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.highlight-badge {
  font-size: 0.72rem;
  color: #1a1300;
  background: var(--color-gold-soft);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.stars-rating {
  color: var(--color-gold);
  letter-spacing: 2px;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.detail-card-text {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0 0 8px;
}

.detail-card-text:last-of-type {
  margin-bottom: 0;
}

/* 행운 정보 */
.lucky-section {
  margin-bottom: 10px;
}

.lucky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.lucky-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
}

.lucky-icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: rgba(217, 185, 120, 0.1);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lucky-icon svg {
  width: 16px;
  height: 16px;
}

.color-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex: none;
}

.lucky-value.with-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lucky-item.wide {
  grid-column: 1 / -1;
  text-align: left;
}

.lucky-label {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 0 0 6px;
}

.lucky-value {
  color: var(--color-gold-soft);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.lucky-value.quote {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
  font-style: italic;
}

/* 결과 복사 */
.copy-section {
  text-align: center;
  margin-top: 8px;
}

.copy-btn {
  width: 100%;
  max-width: 360px;
  padding: 13px 20px;
  border: 1px solid rgba(217, 185, 120, 0.4);
  border-radius: var(--radius-md);
  background: rgba(217, 185, 120, 0.08);
  color: var(--color-gold-soft);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.copy-btn:hover {
  background: rgba(217, 185, 120, 0.16);
  transform: translateY(-1px);
}

.copy-toast {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--color-gold-soft);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.copy-toast.visible {
  opacity: 1;
}

/* ---------------- Footer ---------------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 24px 0 40px;
}

.disclaimer {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------------- PC / 넓은 화면 ---------------- */
@media (min-width: 900px) {
  .hero-title {
    font-size: 2.6rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .form-card {
    padding: 40px;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .lucky-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  main.container {
    padding-top: 12px;
  }

  .result-brand-tagline {
    font-size: 1.6rem;
  }

  .concern-card {
    max-width: 640px;
  }

  .total-card {
    max-width: 640px;
    padding: 44px 48px;
  }

  .gauge-wrap {
    width: 200px;
    height: 200px;
  }

  .gauge-score {
    font-size: 2.7rem;
  }

  .total-comment-group p {
    font-size: 1.08rem;
  }

  .section-title {
    font-size: 1.28rem;
  }

  .detail-card {
    padding: 26px;
  }
}

/* ---------------- 모바일 ---------------- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .card {
    padding: 20px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .gender-options {
    justify-content: space-between;
  }

  .radio-pill {
    flex: 1 1 auto;
  }

  .radio-pill span {
    display: block;
    text-align: center;
  }

  .result-brand-tagline {
    font-size: 1.2rem;
  }

  .total-card {
    padding: 26px 18px;
  }

  .gauge-wrap {
    width: 140px;
    height: 140px;
  }

  .gauge-score {
    font-size: 1.9rem;
  }

  .copy-btn {
    max-width: 100%;
  }
}

/* ---------------- V3.14 service navigation ---------------- */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.service-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.service-nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
}

.service-nav-link:hover,
.service-nav-link:focus-visible {
  color: var(--color-text);
}

.service-nav-link:focus-visible {
  outline: 2px solid var(--color-gold-soft);
  outline-offset: 2px;
}

.service-nav-link.active {
  color: #1a1300;
  background: var(--color-gold-soft);
}

@media (max-width: 480px) {
  .header-inner {
    align-items: flex-start;
  }

  .service-nav-link {
    font-size: 0.78rem;
    padding: 6px 9px;
  }
}
