@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans KR", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #1a1f3c 0%,
    #2a275c 25%,
    #382c74 50%,
    #4b2f8a 75%,
    #5c31a0 100%
  );
  color: white;
  display: flex;
  flex-direction: column; /* 추가 */
  align-items: center;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.5;
  }
}

.container {
  width: 90%;
  max-width: 800px;
  margin: 20px auto; /* margin 수정 */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.container:hover {
  transform: translateY(-5px);
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5em;
  background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

h1::after {
  content: "✨";
  position: absolute;
  right: -30px;
  top: 0;
  -webkit-text-fill-color: #ffd700; /* 골드 색상으로 변경 */
  animation: twinkleStar 1.5s infinite; /* 애니메이션 추가 */
}

h1::before {
  content: "✨";
  position: absolute;
  left: -30px;
  top: 0;
  -webkit-text-fill-color: #ffd700; /* 골드 색상으로 변경 */
  animation: twinkleStar 1.5s infinite 0.75s; /* 0.75초 딜레이로 엇갈리게 반짝임 */
}

/* 반짝이는 애니메이션 정의 */
@keyframes twinkleStar {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

select {
  width: 100%;
  padding: 15px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  outline: none;
}

select:hover,
select:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

select option {
  background: #2a275c;
  color: white;
  padding: 10px;
}

.result {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.result.show {
  opacity: 1;
  transform: translateY(0);
}

.fortune-text {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 25px;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}

.fortune-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  20%,
  100% {
    transform: translateX(100%);
  }
}

.fortune-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.fortune-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.fortune-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.fortune-item h3 {
  margin-bottom: 10px;
  color: #f6d365;
}

.percentage-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.percentage-fill {
  height: 100%;
  background: linear-gradient(90deg, #f6d365, #fda085);
  transition: width 1s ease;
  border-radius: 3px;
  width: 0;
}

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 20px;
    margin: 10px;
  }

  h1 {
    font-size: 2em;
  }

  .fortune-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
  }

  .fortune-item {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8em;
  }
  /* 대신 모바일용 위치 조정 추가 */
  h1::before {
    left: -20px; /* 더 가깝게 조정 */
    font-size: 0.8em; /* 별 크기 조정 */
  }

  h1::after {
    right: -20px; /* 더 가깝게 조정 */
    font-size: 0.8em; /* 별 크기 조정 */
  }

  .fortune-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* style.css에 추가 */
.additional-info {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.info-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
}

.timing-details {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
}

.timing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.timing-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 12px;
}

.timing-item h4 {
  color: #f6d365;
  margin-bottom: 10px;
}

.dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dialog.show {
  opacity: 1;
}

.dialog-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dialog.show .dialog-content {
  transform: translateY(0);
}

.dialog-buttons {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.back-to-start {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 25px;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(5px);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-icon {
  font-size: 20px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.back-btn:hover .btn-icon {
  transform: rotate(180deg);
}

.select-section {
  text-align: center;
  margin: 30px auto;
  max-width: 400px;
}

.select-guide {
  color: #f6d365;
  font-size: 1.2em;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.centered-select {
  width: 100%;
  text-align: center;
  text-align-last: center; /* 드롭다운의 텍스트도 중앙 정렬 */
  padding-right: 15px; /* 화살표 아이콘과 텍스트 간격 조정 */
  appearance: none; /* 기본 select 화살표 제거 */
  background: rgba(255, 255, 255, 0.1)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")
    no-repeat right 10px center;
  background-size: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.1em;
}

.centered-select option {
  text-align: center;
  padding: 10px;
}

/* select에 포커스됐을 때의 스타일 */
.centered-select:focus {
  border-color: #f6d365;
  box-shadow: 0 0 15px rgba(246, 211, 101, 0.2);
  outline: none;
}

/* 모바일 환경을 위한 반응형 스타일 */
@media (max-width: 480px) {
  .select-guide {
    font-size: 1.1em;
  }

  .centered-select {
    font-size: 1em;
  }
}

.soultest-promotion {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.promotion-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sparkle-badge {
  background: linear-gradient(45deg, #4b2f8a, #5c31a0); /* 보라색 계열로 변경 */
  color: #ffd700; /* 골드 색상의 텍스트 */
  font-size: 0.95em;
  padding: 7px 20px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 15px;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(92, 49, 160, 0.3);
  letter-spacing: 0.5px;
}

.test-info {
  flex: 1;
  text-align: center; /* 중앙 정렬로 변경 */
}

.promotion-card h3 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.2em;
}

.test-cards {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.test-card {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center; /* 전체 중앙 정렬 */
  justify-content: center; /* 요소들 중앙 배치 */
}

.test-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.test-icon {
  font-size: 1.8em;
  margin-right: 15px;
  background: rgba(255, 255, 255, 0.1);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.test-info h4 {
  font-size: 1.1em;
  margin: 0 0 5px 0;
  font-weight: 600; /* 제목 굵기 증가 */
}

.test-info p {
  font-size: 0.9em;
  opacity: 0.9; /* 투명도 감소로 가독성 향상 */
  margin: 0;
  color: #ffd700; /* 설명 텍스트 색상 변경 */
}

.arrow-icon {
  margin-left: 10px;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.test-card:hover .arrow-icon {
  background: rgba(92, 49, 160, 0.2); /* 호버 시 배경색 변경 */
  transform: translateX(5px);
  border-color: rgba(255, 215, 0, 0.3); /* 호버 시 테두리 색상 변경 */
}

/* 모바일 반응형 */
@media (max-width: 480px) {
  .promotion-card {
    padding: 20px;
  }

  .test-card {
    padding: 12px;
  }

  .test-icon {
    font-size: 1.5em;
    width: 40px;
    height: 40px;
  }

  .test-info h4 {
    font-size: 1em;
  }

  .test-info p {
    font-size: 0.85em;
  }
}

/* share buttons 스타일 수정 */
.share-section {
  margin: 30px 0;
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* SVG 아이콘 크기 조정 */
.share-btn svg {
  width: 24px;
  height: 24px;
  display: block; /* 추가 */
}

/* 카카오톡 버튼 */
.share-btn.kakao {
  background: #4b4aff; /* 파란색 배경 */
}
.share-btn.kakao svg {
  width: 28px;
  height: 28px;
}
.share-btn.kakao path {
  fill: #391b1b; /* 카카오톡 아이콘 색상 수정 */
}

/* 트위터 버튼 */
.share-btn.twitter {
  background: #e26410; /* 주황색 배경 */
}
.share-btn.twitter path {
  fill: white;
}

/* 페이스북 버튼 */
.share-btn.facebook {
  background: #e7880d; /* 주황색 배경 */
}
.share-btn.facebook path {
  fill: white;
}

/* 링크 복사 버튼 */
.share-btn.link {
  background: #68b800; /* 연두색 배경 */
}
.share-btn.link path {
  fill: white;
}

/* 호버 효과 */
.share-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.share-btn img {
  width: 24px;
  height: 24px;
}

/* 푸터 스타일 */
.site-footer {
  width: 100%; /* 추가 */
  margin-top: auto; /* 추가 */
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding-bottom: 30px;
}

.footer-section {
  color: rgba(255, 255, 255, 0.8);
}

.footer-logo {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  background: linear-gradient(45deg, #ffd700, #ffa500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Arial", sans-serif;
}

.logo-icon {
  font-size: 0.8em;
}

.footer-section h4 {
  color: #ffd700;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ffd700;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-section {
    margin-bottom: 20px;
  }
}
