@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700;900&display=swap');

:root {
  --background: #0d0d21; /* Slightly darker background */
  --card-bg: rgba(255, 255, 255, 0.07); /* Slightly brighter card bg */
  --text-primary: #ffffff; /* Pure white for main text */
  --text-secondary: #c0c0d0; /* Lighter secondary text */
  --highlight-1: #ff66cc; /* Vibrant Pink */
  --highlight-2: #66ccff; /* Vibrant Cyan */
  --border-color: rgba(255, 255, 255, 0.15); /* Brighter border */
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  background-color: var(--background);
  color: var(--text-primary);
  text-align: center;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-header {
  padding: 20px 0;
  text-align: left;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  text-shadow: 0 0 3px var(--highlight-1), 0 0 6px var(--highlight-2); /* Subtler glow */
}

.hero {
  padding: 100px 0;
  text-align: center;
}

#hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 20px 0;
  background: linear-gradient(90deg, var(--highlight-1), var(--highlight-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 5px var(--highlight-1), 0 0 10px var(--highlight-2);
  }
  to {
    text-shadow: 0 0 10px var(--highlight-2), 0 0 15px var(--highlight-1);
  }
}

#hero-title.animation-done {
  animation: none;
  text-shadow: 0 0 5px var(--highlight-1), 0 0 10px var(--highlight-2); /* Stable glow */
}

/* Typing cursor */
#hero-title::after {
  content: '|';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

#hero-title.animation-done::after {
    content: '';
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 15px 35px;
  border-radius: 50px;
  color: var(--background);
  background: linear-gradient(90deg, var(--highlight-1), var(--highlight-2));
  border: none;
  box-shadow: 0 0 15px rgba(255, 102, 204, 0.5); /* Subtler shadow */
  transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(102, 204, 255, 0.7);
}

.core-types, .how-it-works { /* Removed .premium-offer */
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
}

h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 50px;
  color: var(--text-primary);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.type-card {
  background: var(--card-bg);
  padding: 30px 20px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: background 0.3s, transform 0.3s, color 0.3s;
  backdrop-filter: blur(5px);
  cursor: pointer; /* Add cursor pointer */
}

.type-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  color: var(--text-primary);
}

.how-it-works {
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.step {
    flex: 1;
    max-width: 300px;
}

.step-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--highlight-2); /* Use highlight color */
  margin-bottom: 15px;
}

.step h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.cta-button.secondary { /* No longer used, but keeping for now */
    background: transparent;
    border: 2px solid var(--highlight-1);
    color: var(--highlight-1);
}

.cta-button.secondary:hover {
    background: var(--highlight-1);
    color: var(--background);
}

.main-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* Quiz Section */
.quiz-section {
  padding: 80px 0;
}

.quiz-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-primary);
  min-height: 100px; /* To prevent layout shift */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4; /* Better readability */
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.option-btn {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 20px;
  font-size: 1.1rem;
  font-weight: 400;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.1s;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.12); /* Slightly more prominent hover */
  border-color: var(--highlight-2);
  color: var(--highlight-2);
}

.option-btn:active {
  transform: scale(0.98);
}

.progress-bar-container {
  width: 80%;
  max-width: 500px;
  height: 8px;
  background-color: var(--card-bg);
  border-radius: 5px;
  margin: 40px auto 0 auto;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--highlight-1), var(--highlight-2));
  border-radius: 5px;
  transition: width 0.3s ease-out;
}

/* Result Section */
.result-section {
  padding: 80px 0;
}

.result-section h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

#result-type {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--highlight-1), var(--highlight-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 5px rgba(255,102,204,0.3), 0 0 10px rgba(102,204,255,0.3); /* Subtler glow */
}

#result-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.result-details {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 30px; /* Reduced margin */
  flex-wrap: wrap; /* Allow wrapping */
}

.result-details p {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.result-details span {
  color: var(--highlight-2); /* Use highlight color */
  font-weight: 900;
}

.compat-section-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 30px; /* More padding */
    margin-top: 30px;
    margin-bottom: 20px;
}

.compat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Reduced gap */
    justify-content: center;
    margin-bottom: 50px;
}

.compat-item {
  background: var(--card-bg);
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem; /* Smaller font size */
  color: var(--text-secondary);
}

.compat-score {
    color: var(--highlight-2);
    font-weight: 700;
}

.share-options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.share-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--highlight-1);
  color: var(--highlight-1);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 13, 33, 0.9); /* Darker background for overlay */
  backdrop-filter: blur(8px); /* Slightly less blur */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
}

.modal-content {
  background: var(--background);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 25px rgba(255, 102, 204, 0.4); /* Subtler shadow */
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2.5rem;
  cursor: pointer;
}

.modal-content h3 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--highlight-1), var(--highlight-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-content p {
  color: var(--text-primary);
  line-height: 1.7;
}

.modal-content h4 {
  font-size: 1.2rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 30px;
}

#modal-compatibility-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Reduced gap */
  justify-content: center;
}

.compat-item {
  background: var(--card-bg);
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem; /* Smaller font size */
  color: var(--text-secondary);
}

.compat-score {
    color: var(--highlight-2);
    font-weight: 700;
}

/* Friend Compat Modal Specific */
#friend-compat-modal .modal-content {
    text-align: center;
}

#friend-compat-modal select {
    width: 80%;
    padding: 10px;
    margin-top: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
}

#friend-compat-modal #friend-compat-result-title {
    font-size: 1.5rem;
    color: var(--highlight-2);
    margin-bottom: 10px;
}

#friend-compat-modal #friend-compat-result-desc {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.mt-20 {
    margin-top: 20px;
}
