/* Mobile-first, soft pastel, rounded UI for '아이와 나, 얼마나 닮았을까?' */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #f7f8fa;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

.language-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 16px 0 0;
  background: #f7f8fa;
}

.lang-btn {
  background: #e0e7ff;
  color: #6366f1;
  border: none;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.lang-btn.active, 
.lang-btn:hover {
  background: #6366f1;
  color: #fff;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px 16px;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  min-height: 100vh;
}

.hero {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
}

.hero-image {
  margin: 0 auto 20px auto;
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #e0e7ff 60%, #fce7f3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(102, 119, 255, 0.1);
}

.mirror-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 2.2rem;
}

.title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #6366f1;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.subtitle {
  font-size: 1.2rem;
  color: #6b7280;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.description {
  font-size: 1.1rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

.start-section {
  text-align: center;
  margin: 40px 0 0 0;
  padding: 0 20px;
}

.start-btn {
  background: linear-gradient(90deg, #a5b4fc 0%, #fbcfe8 100%);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(102, 119, 255, 0.2);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 280px;
  touch-action: manipulation;
}

.start-btn:hover, .start-btn:active {
  background: linear-gradient(90deg, #6366f1 0%, #f472b6 100%);
  box-shadow: 0 6px 24px rgba(102, 119, 255, 0.3);
  transform: translateY(-2px);
}

.estimated-time {
  color: #6b7280;
  font-size: 1rem;
  margin-top: 16px;
}

/* Quiz Page */
#quiz {
  display: none;
}

#quiz.active {
  display: block;
}

.progress-bar {
  background: #e0e7ff;
  border-radius: 12px;
  height: 20px;
  margin: 16px 0 24px 0;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #6366f1 0%, #fbcfe8 100%);
  height: 100%;
  width: 0%;
  border-radius: 12px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  font-size: 1rem;
  color: #6366f1;
  font-weight: 600;
  line-height: 20px;
}

.question-container {
  margin: 24px 0 32px 0;
}

.question-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: #6366f1;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.4;
  padding: 0 10px;
}

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

.option-btn {
  background: #f1f5ff;
  border: none;
  border-radius: 18px;
  padding: 18px 16px;
  font-size: 1.1rem;
  color: #6366f1;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 119, 255, 0.08);
  text-align: left;
  line-height: 1.4;
  touch-action: manipulation;
  min-height: 56px;
}

.option-btn.selected, .option-btn:hover, .option-btn:active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 4px 16px rgba(102, 119, 255, 0.2);
  transform: translateY(-1px);
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin: 32px 0 0 0;
  gap: 16px;
}

.nav-btn {
  background: #e0e7ff;
  color: #6366f1;
  border: none;
  border-radius: 18px;
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-height: 48px;
  touch-action: manipulation;
}

.nav-btn:hover, .nav-btn:active {
  background: #6366f1;
  color: #fff;
  transform: translateY(-1px);
}

/* Results Page */
#results {
  display: none;
}

#results.active {
  display: block;
}

.results-header {
  text-align: center;
  margin-bottom: 24px;
}

.results-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 16px;
}

.similarity-score {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.score-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #e0e7ff 60%, #fbcfe8 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #6366f1;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(102, 119, 255, 0.15);
}

.score-number {
  font-size: 1.8rem;
  font-weight: 700;
}

.score-label {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.result-content {
  margin: 24px 0 0 0;
}

.personality-type {
  text-align: center;
  margin-bottom: 24px;
}

.type-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 8px;
}

.type-description {
  font-size: 1.1rem;
  color: #6b7280;
  line-height: 1.5;
}

.comparison-section {
  margin: 24px 0 0 0;
}

.comparison-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #6366f1;
  margin-bottom: 16px;
  text-align: center;
}

.comparison-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.personality-card {
  background: #f3f4f6;
  border-radius: 18px;
  padding: 16px 12px;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(102, 119, 255, 0.08);
  flex: 1;
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6366f1;
  margin-bottom: 4px;
}

.card-description {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.4;
}

.insights-section {
  margin: 24px 0 0 0;
}

.insights-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #6366f1;
  margin-bottom: 12px;
  text-align: center;
}

.insights-content {
  background: #f1f5ff;
  border-radius: 16px;
  padding: 16px 14px;
  color: #6366f1;
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.5;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 32px 0 0 0;
}

.action-btn {
  background: #e0e7ff;
  color: #6366f1;
  border: none;
  border-radius: 18px;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  max-width: 150px;
  touch-action: manipulation;
  min-height: 48px;
}

.action-btn:hover, .action-btn:active {
  background: #6366f1;
  color: #fff;
  transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(102, 119, 255, 0.15);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  border: 4px solid #e0e7ff;
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #6366f1;
  font-size: 1.2rem;
  font-weight: 600;
}

.page { 
  display: none; 
}

.page.active { 
  display: block; 
}

/* Enhanced Mobile Responsive */
@media (max-width: 600px) {
  .language-toggle {
    padding: 12px 16px 0 0;
  }
  
  .lang-btn {
    padding: 5px 12px;
    font-size: 0.85rem;
  }
  
  .container {
    padding: 16px 12px 32px 12px;
    border-radius: 0;
  }
  
  .hero {
    margin-bottom: 32px;
    padding: 16px 0;
  }
  
  .hero-image {
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
  }
  
  .mirror-illustration {
    font-size: 2rem;
    gap: 8px;
  }
  
  .title {
    font-size: 1.6rem;
    margin-bottom: 12px;
  }
  
  .subtitle {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .description {
    font-size: 1rem;
  }
  
  .start-section {
    margin-top: 32px;
    padding: 0 10px;
  }
  
  .start-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
  }
  
  .question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding: 0 5px;
  }
  
  .option-btn {
    padding: 16px 14px;
    font-size: 1rem;
    min-height: 52px;
  }
  
  .nav-btn {
    padding: 10px 20px;
    font-size: 1rem;
    min-height: 44px;
  }
  
  .comparison-grid, .action-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .personality-card {
    min-width: auto;
  }
  
  .action-btn {
    max-width: none;
  }
}

@media (max-width: 375px) {
  .language-toggle {
    padding: 10px 12px 0 0;
  }
  
  .lang-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  
  .container {
    padding: 12px 8px 24px 8px;
  }
  
  .hero-image {
    width: 100px;
    height: 100px;
  }
  
  .mirror-illustration {
    font-size: 1.8rem;
  }
  
  .title {
    font-size: 1.4rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .description {
    font-size: 0.95rem;
  }
  
  .start-btn {
    padding: 14px 28px;
    font-size: 1rem;
  }
  
  .question-text {
    font-size: 1.1rem;
  }
  
  .option-btn {
    padding: 14px 12px;
    font-size: 0.95rem;
  }
}

/* Accessibility and Touch improvements */
@media (hover: none) and (pointer: coarse) {
  .start-btn:hover,
  .option-btn:hover,
  .nav-btn:hover,
  .action-btn:hover,
  .lang-btn:hover {
    transform: none;
  }
  
  .start-btn:active,
  .option-btn:active,
  .nav-btn:active,
  .action-btn:active,
  .lang-btn:active {
    transform: scale(0.98);
  }
} 