/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #ffb3d9 0%, #e6e6fa 50%, #f0ffff 100%);
  min-height: 100vh;
  line-height: 1.6;
  color: #333;
}

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

/* Screen Management */
.screen {
  display: none;
  padding: 20px 0;
}

.screen.active {
  display: block;
}

/* Welcome Screen */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ff1493;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.2);
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  font-weight: 400;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(255, 20, 147, 0.2);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  color: #ff1493;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  font-size: 0.95rem;
}

/* Gender Selection */
.gender-selection {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gender-selection h3 {
  color: #ff1493;
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.gender-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.gender-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
}

.gender-btn:hover {
  background: rgba(255, 20, 147, 0.1);
  border-color: #ff1493;
  transform: translateY(-2px);
}

.gender-btn.selected {
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  border-color: #ff1493;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3);
}

.gender-icon {
  font-size: 2rem;
}

/* Buttons */
.start-btn {
  width: 100%;
  padding: 18px 40px;
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3);
  font-family: inherit;
  margin-bottom: 30px;
}

.start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 20, 147, 0.4);
}

.start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.2);
}

/* Test Screen */
.progress-container {
  margin-bottom: 40px;
  text-align: center;
}

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

#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff1493, #ff69b4);
  width: 0%;
  transition: width 0.3s ease;
}

#progress-text {
  color: #ff1493;
  font-weight: 600;
  font-size: 1.1rem;
}

.question-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#question-text {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 30px;
  font-weight: 500;
  line-height: 1.5;
}

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

.answer-btn {
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  color: #666;
}

.answer-btn:hover {
  background: rgba(255, 20, 147, 0.1);
  border-color: #ff1493;
  transform: translateY(-1px);
  color: #ff1493;
}

.answer-btn:active {
  transform: translateY(0);
}

/* Results Screen */
.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header h1 {
  font-size: 2.2rem;
  color: #ff1493;
  margin-bottom: 30px;
  font-weight: 700;
}

.personality-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 30px;
}

#personality-type {
  font-size: 1.8rem;
  color: #ff1493;
  margin-bottom: 15px;
  font-weight: 600;
}

#personality-description {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.personality-code {
  display: inline-block;
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.scores-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.scores-container h3 {
  color: #ff1493;
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.score-label {
  font-weight: 500;
  color: #333;
}

.score-bar {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  margin: 0 15px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff1493, #ff69b4);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.score-value {
  font-weight: 600;
  color: #ff1493;
  min-width: 40px;
  text-align: right;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.action-btn {
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.share-btn {
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  color: white;
  box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 20, 147, 0.4);
}

.retry-btn {
  background: rgba(255, 255, 255, 0.8);
  color: #ff1493;
  border: 2px solid #ff1493;
}

.retry-btn:hover {
  background: rgba(255, 20, 147, 0.1);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
  color: #666;
  font-size: 0.9rem;
}

.footer a {
  color: #ff1493;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .gender-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .gender-btn {
    width: 200px;
  }
  
  .question-container {
    padding: 25px;
  }
  
  #question-text {
    font-size: 1.2rem;
  }
  
  .personality-card {
    padding: 25px;
  }
  
  .action-buttons {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .feature-card {
    padding: 20px 15px;
  }
  
  .question-container {
    padding: 20px;
  }
  
  #question-text {
    font-size: 1.1rem;
  }
  
  .answer-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

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

.screen.active {
  animation: fadeIn 0.5s ease;
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #ff1493;
  font-size: 1.1rem;
  font-weight: 500;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #ff1493;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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