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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Screens */
.screen {
  display: none;
  width: 100%;
  max-width: 600px;
  animation: fadeIn 0.5s ease;
}

.screen.active {
  display: block;
}

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

/* Language Selection Screen */
#language-select {
  max-width: 100%;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#language-select.active {
  display: flex;
}

.logo-marquee-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.logo-marquee {
  position: absolute;
  width: 100%;
  overflow: hidden;
  opacity: 0.15;
}

.logo-marquee.top {
  top: 30px;
}

.logo-marquee.bottom {
  bottom: 30px;
}

.logo-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: scrollRight 30s linear infinite;
}

.logo-track.reverse {
  animation: scrollLeft 30s linear infinite;
}

@keyframes scrollRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollLeft {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.logo-marquee img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.language-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  max-width: 600px;
}

.lang-prompt {
  font-size: 1.2rem;
  color: #b0b0b0;
  margin-bottom: 30px;
}

.language-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: rgba(196, 77, 255, 0.2);
  border-color: #c44dff;
  transform: translateY(-3px);
}

.lang-btn .flag {
  font-size: 1.5rem;
}

/* Landing Page */
#landing {
  text-align: center;
}

.sparkles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ff6b9d, transparent),
    radial-gradient(2px 2px at 40px 70px, #c44dff, transparent),
    radial-gradient(2px 2px at 50px 160px, #6bfff0, transparent),
    radial-gradient(2px 2px at 90px 40px, #ff6b9d, transparent),
    radial-gradient(2px 2px at 130px 80px, #c44dff, transparent),
    radial-gradient(2px 2px at 160px 120px, #6bfff0, transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: sparkle 4s linear infinite;
  opacity: 0.5;
}

@keyframes sparkle {
  from { transform: translateY(0); }
  to { transform: translateY(-200px); }
}

.title {
  margin-bottom: 20px;
}

.gradient-text {
  display: block;
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b9d, #c44dff, #6bfff0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 20px rgba(196, 77, 255, 0.3)); }
  to { filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.5)); }
}

.subtitle {
  display: block;
  font-size: 1.8rem;
  font-weight: 300;
  color: #e0e0e0;
  margin-top: -10px;
}

.description {
  font-size: 1.1rem;
  color: #b0b0b0;
  margin-bottom: 40px;
  line-height: 1.6;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(196, 77, 255, 0.4);
}

.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(196, 77, 255, 0.6);
}

.btn-start svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.btn-start:hover svg {
  transform: translateX(5px);
}

.idol-count {
  margin-top: 30px;
  font-size: 0.9rem;
  color: #888;
}

/* Quiz Section */
#quiz {
  padding: 20px;
}

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

.progress {
  height: 100%;
  background: linear-gradient(90deg, #ff6b9d, #c44dff);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.question-container {
  text-align: center;
}

.question-number {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 15px;
}

.question-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 35px;
  line-height: 1.4;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.option-btn {
  padding: 18px 25px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.option-btn:hover {
  background: rgba(196, 77, 255, 0.2);
  border-color: #c44dff;
  transform: translateX(10px);
}

.option-btn.selected {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(196, 77, 255, 0.3));
  border-color: #ff6b9d;
}

/* Loading Section */
#loading {
  text-align: center;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff6b9d;
  border-right-color: #c44dff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 30px;
  font-size: 1.3rem;
  font-weight: 500;
}

.loading-subtext {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #888;
}

/* Results Section */
#results {
  padding: 20px;
}

.results-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.match-section {
  margin-bottom: 25px;
}

.match-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 5px;
}

.match-label .icon {
  font-size: 1.3rem;
}

.match-label.friend {
  color: #6bfff0;
}

.match-label.love {
  color: #ff6b9d;
}

.match-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.match-card:hover {
  transform: scale(1.02);
}

.match-image {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.match-info {
  flex: 1;
}

.match-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.match-group {
  font-size: 0.9rem;
  color: #c44dff;
  margin-bottom: 8px;
}

.match-reason {
  font-size: 0.85rem;
  color: #b0b0b0;
  line-height: 1.4;
}

.compatibility {
  text-align: center;
  padding: 10px;
}

.compat-label {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 5px;
}

.compat-score {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Share Section */
.share-section {
  text-align: center;
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
}

.share-section p {
  margin-bottom: 15px;
  color: #b0b0b0;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

.share-btn.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-btn.instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(225, 48, 108, 0.4);
}

.share-btn.whatsapp {
  background: #25D366;
}

.share-btn.whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.share-btn.x-twitter {
  background: #000;
  border: 1px solid #333;
}

.share-btn.x-twitter:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.share-btn.messenger {
  background: linear-gradient(45deg, #00B2FF, #006AFF);
}

.share-btn.messenger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 132, 255, 0.4);
}

.share-btn.copy {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-btn.copy:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-retry {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-retry:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* How It Works Section */
.how-it-works {
  margin-top: 50px;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.how-it-works h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  color: #fff;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.how-step {
  text-align: center;
  padding: 20px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.how-step h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #c44dff;
}

.how-step p {
  font-size: 0.8rem;
  color: #999;
  line-height: 1.4;
}

.methodology {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.methodology h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #6bfff0;
}

.methodology > p {
  font-size: 0.85rem;
  color: #b0b0b0;
  margin-bottom: 15px;
}

.methodology ul {
  list-style: none;
  padding: 0;
}

.methodology li {
  font-size: 0.8rem;
  color: #999;
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}

.methodology li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #6bfff0;
}

.methodology li strong {
  color: #e0e0e0;
}

/* Learn More Button */
.btn-learn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: #6bfff0;
  background: rgba(107, 255, 240, 0.1);
  border: 2px solid rgba(107, 255, 240, 0.3);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-learn-more:hover {
  background: rgba(107, 255, 240, 0.2);
  border-color: #6bfff0;
}

.btn-learn-more svg {
  width: 20px;
  height: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 30px;
  max-width: 550px;
  width: 100%;
  margin: 20px auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #fff;
}

.modal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.modal-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #fff;
}

/* Trait Bars */
.trait-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trait-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trait-label {
  width: 90px;
  font-size: 0.8rem;
  color: #b0b0b0;
}

.trait-progress {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.trait-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b9d, #c44dff);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.trait-value {
  width: 35px;
  font-size: 0.75rem;
  color: #888;
  text-align: right;
}

/* Modal Match Detail */
.modal-match-detail {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  padding: 15px;
}

.modal-match-detail .match-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-match-detail .match-emoji {
  font-size: 2rem;
}

.modal-match-detail .match-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-match-detail .match-group {
  font-size: 0.85rem;
  color: #c44dff;
}

.modal-match-detail .match-explanation {
  font-size: 0.85rem;
  color: #b0b0b0;
  line-height: 1.5;
  margin-bottom: 12px;
}

.modal-match-detail .trait-comparison {
  font-size: 0.8rem;
  color: #999;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 10px;
}

.modal-match-detail .trait-comparison strong {
  color: #6bfff0;
}

/* Modal Sources */
.modal-section.sources h3 {
  color: #6bfff0;
}

.modal-section.sources > p {
  font-size: 0.85rem;
  color: #b0b0b0;
  margin-bottom: 12px;
}

.modal-section.sources ul {
  list-style: none;
  padding: 0;
  margin-bottom: 15px;
}

.modal-section.sources li {
  font-size: 0.8rem;
  color: #999;
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}

.modal-section.sources li::before {
  content: "•";
  position: absolute;
  left: 5px;
  color: #c44dff;
}

.modal-section.sources li strong {
  color: #e0e0e0;
}

.disclaimer {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .gradient-text {
    font-size: 2.8rem;
  }

  .subtitle {
    font-size: 1.3rem;
  }

  .description {
    font-size: 1rem;
  }

  .btn-start {
    padding: 15px 30px;
    font-size: 1rem;
  }

  .question-text {
    font-size: 1.2rem;
  }

  .match-card {
    flex-direction: column;
    text-align: center;
  }

  .match-info {
    text-align: center;
  }

  .compatibility {
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
  }

  .language-buttons {
    grid-template-columns: 1fr;
  }

  .logo-marquee img {
    height: 30px;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 20px;
    margin: 10px;
  }
}
