@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Montserrat:wght@300;400;600&display=swap");

:root {
  --primary: #d4af37; /* Gold/Amber */
  --primary-light: #f4d03f;
  --bg-dark: #0a0a0a;
  --card-bg: rgba(20, 20, 20, 0.7);
  --text-light: #f5f5f5;
  --text-muted: #a0a0a0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  padding-top: 70px; /* 네비게이션 바 공간 */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 40px;
  flex-wrap: wrap; /* 작은 화면에서 줄바꿈 허용 */
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("bg.png") no-repeat center center/cover;
  filter: brightness(0.4) blur(2px);
  z-index: -1;
}

/* 네비게이션 바 어두운 테마 오버라이드 */
.navbar {
  background: rgba(20, 20, 20, 0.85) !important;
  backdrop-filter: blur(15px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5) !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar-brand {
  color: var(--primary) !important;
}

.navbar-brand:hover {
  color: var(--primary-light) !important;
}

.navbar-menu {
  gap: 8px !important;
}

.navbar-menu li a {
  color: var(--text-light) !important;
  padding: 10px 18px !important;
  border-radius: 20px !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
}

.navbar-menu li a:hover {
  color: var(--primary) !important;
  background: rgba(212, 175, 55, 0.15) !important;
  transform: translateY(-1px) !important;
}

.navbar-menu li a.active {
  color: var(--bg-dark) !important;
  background: linear-gradient(135deg, var(--primary), #8b4513) !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
  font-weight: 600 !important;
}

.navbar-toggle span {
  background: var(--text-light) !important;
}

/* 모바일 메뉴 어두운 테마 */
@media (max-width: 768px) {
  .navbar-menu {
    background: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.7) !important;
  }

  .navbar-menu li {
    width: 100% !important;
  }

  .navbar-menu li a {
    width: 100% !important;
    text-align: center !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
  }
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 30px;
  z-index: 1;
  margin-top: 0;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
  transition: all 0.5s ease;
}

h1 {
  font-family: "Libre Baskerville", serif;
  color: var(--primary);
  margin-bottom: 25px;
  font-size: 3rem;
}

h2 {
  font-family: "Libre Baskerville", serif;
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 2.2rem;
}

p.description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.7;
}

.btn {
  background: linear-gradient(135deg, var(--primary), #8b4513);
  color: white;
  border: none;
  padding: 18px 50px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Question Section */
.quiz-section {
  display: none;
}

.quiz-section.active {
  display: block;
  animation: fadeIn 0.8s ease;
}

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

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.4s ease;
}

.question-text {
  font-size: 1.6rem;
  margin-bottom: 35px;
  line-height: 1.5;
  min-height: 90px;
}

.options {
  display: grid;
  gap: 15px;
}

.option-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  padding: 22px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
  text-align: left;
}

.option-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--primary);
}

/* Result Section */
.result-section {
  display: none;
}

.result-section.active {
  display: block;
  animation: slideUp 0.8s ease;
}

.profile-title {
  font-size: 2.3rem;
  margin-bottom: 18px;
}

.profile-desc {
  font-style: italic;
  margin-bottom: 25px;
  color: var(--primary-light);
  font-size: 1.15rem;
}

.bottle-display {
  margin: 25px 0;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottle-img {
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 음식 페어링 섹션 */
.food-pairing-section {
  margin-top: 35px;
  padding: 30px;
  background: rgba(212, 175, 55, 0.08);
  border-radius: 15px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  text-align: left;
  animation: fadeIn 0.8s ease 0.3s both;
}

.food-pairing-section h3 {
  font-family: "Libre Baskerville", serif;
  text-align: center;
  margin-bottom: 15px;
}

/* 책임있는 음주 안내 */
.responsible-drinking {
  animation: fadeIn 0.8s ease 0.5s both;
}

.responsible-drinking strong {
  color: var(--text-light);
  font-weight: 600;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Responsive */
@media (max-width: 768px) {
  body {
    display: block; /* flex 해제하여 세로 배치 */
    padding-top: 70px;
    padding-bottom: 20px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .container {
    max-width: 100%;
    padding: 15px;
    margin: 0 auto; /* 중앙 정렬 */
  }

  .card {
    padding: 35px 25px;
    border-radius: 15px;
  }

  /* Footer 세로 배치 */
  .whiskey-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px auto 0 auto !important;
  }
}

@media (max-width: 480px) {
  body {
    display: block; /* flex 해제하여 세로 배치 */
    padding-top: 70px;
    padding-bottom: 0;
  }

  .container {
    padding: 10px;
    margin: 0 auto; /* 중앙 정렬 */
  }

  .card {
    padding: 30px 20px;
    border-radius: 12px;
  }

  /* Footer 세로 배치 - 위스키 프로파일 아래로 */
  .whiskey-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px auto 0 auto !important;
    padding: 30px 20px !important;
  }

  /* Footer 브랜드 */
  .footer-brand {
    font-size: 1.2rem !important;
  }

  /* Footer 설명 */
  .footer-desc {
    font-size: 0.85rem !important;
  }

  /* Footer 경고 문구 */
  .footer-warning {
    font-size: 0.75rem !important;
    padding: 12px !important;
    margin: 15px auto !important;
  }

  /* Footer 링크 */
  .whiskey-footer a {
    font-size: 0.8rem !important;
  }

  /* Footer 하단 텍스트 */
  .whiskey-footer p:last-child {
    font-size: 0.75rem !important;
  }
}

/* 가로 모드 대응 */
@media (max-width: 768px) and (orientation: landscape) {
  body {
    display: block; /* flex 해제하여 세로 배치 */
    padding-top: 60px;
  }

  .container {
    max-width: 90%;
    margin: 0 auto;
  }

  .card {
    padding: 25px 20px;
  }

  .whiskey-footer {
    width: 100% !important;
    margin: 25px auto 0 auto !important;
    padding: 25px 20px !important;
  }
}
