body {
  font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
  padding: 80px 15px 40px;
  background: #0a0e14;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

.mystic-bg {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, #1a2332 0%, #0a0e14 100%);
  z-index: -1;
}

/* 상단 네비게이션 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: #c5a059;
  cursor: pointer;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav-menu li {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-menu li:hover, .nav-menu li.active {
  color: #c5a059;
}

.nav-menu li.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #c5a059;
}

/* 박스 레이아웃 */
.box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 650px;
  width: 100%;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  margin-top: 20px;
  box-sizing: border-box;
}

/* 메인 배너 이미지 스타일 */
.main-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid rgba(197, 160, 89, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.main-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-section {
  text-align: center;
  margin-bottom: 40px;
}

.sub-title {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: #c5a059;
  display: block;
  margin-bottom: 10px;
  font-weight: 400;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 0;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.title-underline {
  width: 50px;
  height: 2px;
  background: #c5a059;
  margin: 20px auto 0;
}

/* 폼 컨테이너 */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 35px;
}

.input-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-row:focus-within {
  border-color: rgba(197, 160, 89, 0.6);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.1);
}

.input-row label {
  font-size: 0.9rem;
  color: #c5a059;
  font-weight: 700;
  width: 100px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  margin-right: 20px;
  flex-shrink: 0;
}

.input-row input[type="text"], 
.input-row select {
  flex: 1;
  border: none;
  padding: 8px 0;
  font-size: 1.05rem;
  outline: none;
  background: transparent;
  color: #fff;
  min-width: 0;
  font-family: inherit;
}

.input-row select option {
  background: #1a2332;
  color: #fff;
}

/* 성별/달력 옵션 */
.gender-options, .calendar-options {
  display: flex;
  gap: 15px;
  flex: 1;
}

.gender-options input, .calendar-options input {
  display: none;
}

.gender-options label, .calendar-options label {
  border: none;
  width: auto;
  margin: 0;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #aaa;
  transition: all 0.3s;
}

.gender-options input:checked + label, 
.calendar-options input:checked + label {
  background: #c5a059;
  color: #0a0e14;
  font-weight: bold;
}

/* 생년월일 입력 */
.birth-inputs {
  display: flex;
  gap: 10px;
  flex: 1;
}

.birth-inputs select {
  flex: 1;
}

/* 메인 버튼 */
.main-btn {
  width: 100%;
  padding: 18px;
  background: #c5a059;
  color: #0a0e14;
  border: none;
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.main-btn:hover {
  background: #d4b475;
  transform: translateY(-3px);
}

/* 결과 탭 */
.result-tabs {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 5px;
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 0.9rem;
  color: #aaa;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 10px 10px 0 0;
}

.tab-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tab-item.active {
  background: rgba(197, 160, 89, 0.15);
  color: #c5a059;
  font-weight: bold;
  border-bottom: 2px solid #c5a059;
}

/* 결과 카드 */
.result {
  margin-top: 20px;
}

.fortune-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(197, 160, 89, 0.3);
  padding: 30px;
  border-radius: 0 0 20px 20px;
  color: #e0e0e0;
  line-height: 1.7;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  background: rgba(197, 160, 89, 0.15);
  color: #c5a059;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* 점수 바 */
.score-section {
  margin-bottom: 25px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.score-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.score-value {
  color: #c5a059;
  font-weight: 900;
  font-size: 1.2rem;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c5a059, #ffd700);
  width: 0%;
  transition: width 1s ease-out;
}

.content { color: #fff; font-size: 1.05rem; }

.extra-info {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.info-item {
  padding: 15px;
  background: rgba(197, 160, 89, 0.05);
  border-radius: 15px;
  text-align: center;
  color: #c5a059;
  border-left: 4px solid #c5a059;
}

.info-item strong {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 5px;
  opacity: 0.7;
}

.info-item span {
  font-size: 1rem;
  font-weight: 800;
}

.source-info {
  margin-top: 25px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* 로딩 애니메이션 */
.loading {
  color: #c5a059;
  margin-top: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  display: none;
  text-align: center;
  letter-spacing: 0.1em;
}

/* 결과 카드 gold-border */
.fortune-card.gold-border {
  border-color: #c5a059;
  box-shadow: 0 0 25px rgba(197, 160, 89, 0.35);
}

/* 저장 버튼 */
.save-btn {
  padding: 12px 30px;
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 10px;
  color: #c5a059;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.save-btn:hover { background: rgba(197, 160, 89, 0.25); }

/* 만남 운세 유형 탭 */
.fortune-type-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.fortune-type-tab {
  flex: 1;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #aaa;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.fortune-type-tab:hover { border-color: rgba(197, 160, 89, 0.4); color: #c5a059; }
.fortune-type-tab.active {
  background: rgba(197, 160, 89, 0.15);
  border-color: #c5a059;
  color: #c5a059;
}

/* 점성술 결과 - 별자리 헤더 */
.zodiac-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(197, 160, 89, 0.07);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(197, 160, 89, 0.2);
}
.zodiac-symbol { font-size: 2.5rem; line-height: 1; }
.zodiac-name { font-size: 1.3rem; font-weight: 800; color: #c5a059; }
.zodiac-sub { font-size: 0.8rem; color: rgba(255,255,255,0.45); margin-top: 4px; }

/* 타로 결과 헤더 */
.tarot-result-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(197, 160, 89, 0.07);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(197, 160, 89, 0.2);
}
.tarot-big-emoji { font-size: 2.8rem; line-height: 1; }
.tarot-result-name { font-size: 1.3rem; font-weight: 800; color: #c5a059; }
.tarot-result-en { font-size: 0.8rem; color: rgba(255,255,255,0.45); margin-top: 3px; }
.tarot-keyword-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: rgba(197, 160, 89, 0.75);
  font-style: italic;
  letter-spacing: 0.03em;
}

/* 타로 카드 UI */
.tarot-instruction {
  text-align: center;
  color: #c5a059;
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tarot-cards-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tarot-card-wrap {
  cursor: pointer;
  transition: transform 0.3s, opacity 0.4s, filter 0.4s;
}
.tarot-card-wrap:hover { transform: translateY(-10px); }

.tarot-card {
  width: 88px;
  height: 145px;
}

.tarot-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }

.tarot-front, .tarot-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tarot-front {
  background: linear-gradient(145deg, #1a1030, #2a1a4e);
  border: 2px solid rgba(197, 160, 89, 0.5);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 0 20px rgba(100,60,150,0.15);
}
.tarot-mystery { font-size: 2rem; opacity: 0.85; }
.tarot-num { font-size: 0.72rem; color: rgba(197, 160, 89, 0.65); font-weight: bold; }

.tarot-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #2a1040, #1a0830);
  border: 2px solid #c5a059;
  box-shadow: 0 4px 20px rgba(197, 160, 89, 0.3);
}
.tarot-revealed-emoji { font-size: 2.2rem; }
.tarot-revealed-name { font-size: 0.75rem; font-weight: 800; color: #c5a059; text-align: center; padding: 0 5px; }
.tarot-revealed-en { font-size: 0.58rem; color: rgba(255,255,255,0.35); text-align: center; padding: 0 3px; }

/* 모바일 최적화 */
@media (max-width: 600px) {
  body {
    padding: 105px 10px 20px; /* 60px nav + 45px 2줄 메뉴 */
  }

  .nav-container {
    padding: 0 15px;
    height: 50px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-menu {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 20, 0.95);
    height: 45px;
    overflow-x: auto;
    padding: 0 15px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    gap: 15px;
    scrollbar-width: none;
  }

  .nav-menu::-webkit-scrollbar {
    display: none;
  }

  .nav-menu li {
    font-size: 0.85rem;
  }

  .box {
    padding: 25px 15px;
    border-radius: 20px;
    margin-top: 0;             /* body padding으로 처리하므로 0 */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  }

  .main-banner {
    margin-bottom: 20px;
    border-radius: 12px;
  }

  .header-section {
    margin-bottom: 30px;
  }

  .input-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 15px;
  }

  .input-row label {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 0;
    margin-bottom: 10px;
    padding-bottom: 6px;
    font-size: 0.8rem;
  }

  .birth-inputs {
    width: 100%;
    gap: 8px;
  }

  .main-btn {
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 12px;
  }
}
