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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8f9fa;
  color: #212529;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
  background: white;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.language-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f8f9fa;
  color: #6c757d;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.language-toggle:hover {
  background: #e9ecef;
  color: #495057;
}

.logo {
  font-size: 48px;
  margin-bottom: 16px;
}

.title {
  font-size: 24px;
  font-weight: 700;
  color: #1976d2;
  margin-bottom: 8px;
  line-height: 1.3;
}

.subtitle {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 16px;
  font-weight: 500;
}

.description {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
}

/* Screen Management */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Quiz Card */
.quiz-card,
.results-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

/* Progress */
.progress-container {
  margin-bottom: 32px;
}

.progress-text {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 8px;
  font-weight: 500;
}

.progress-bar {
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #1976d2;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Question */
.question {
  font-size: 20px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 24px;
  line-height: 1.4;
}

/* Answers */
.answers {
  margin-bottom: 32px;
}

.answer-option {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  line-height: 1.5;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.answer-option:hover {
  border-color: #1976d2;
  background: #f8fafb;
}

.answer-option.selected {
  border-color: #1976d2;
  background: #e3f2fd;
  color: #1976d2;
}

.answer-option:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover:not(:disabled) {
  background: #1565c0;
  transform: translateY(-1px);
}

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

.btn:disabled {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  background: #e9ecef;
  transform: none;
}

/* Results */
.result-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 24px;
}

.result-title {
  font-size: 28px;
  font-weight: 700;
  color: #1976d2;
  text-align: center;
  margin-bottom: 8px;
}

.result-subtitle {
  font-size: 16px;
  color: #6c757d;
  text-align: center;
  margin-bottom: 24px;
}

.result-description {
  font-size: 16px;
  color: #495057;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.6;
}

.traits-section,
.recommendations-section,
.study-tip {
  margin-bottom: 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.traits-list,
.recommendations-list {
  list-style: none;
  padding: 0;
}

.traits-list li,
.recommendations-list li {
  padding: 12px 0;
  border-bottom: 1px solid #f8f9fa;
  color: #495057;
  line-height: 1.5;
  position: relative;
  padding-left: 24px;
}

.traits-list li:before,
.recommendations-list li:before {
  content: "•";
  color: #1976d2;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.traits-list li:last-child,
.recommendations-list li:last-child {
  border-bottom: none;
}

.study-tip {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e9ecef;
}

.study-tip-title {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.study-tip-text {
  color: #495057;
  line-height: 1.6;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.action-buttons .btn {
  flex: 1;
}

.welcome-content {
  text-align: center;
}

.welcome-description {
  font-size: 16px;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .header {
    padding: 24px 20px;
    margin-bottom: 32px;
  }

  .title {
    font-size: 22px;
  }

  .quiz-card,
  .results-card {
    padding: 24px;
  }

  .question {
    font-size: 18px;
  }

  .answer-option {
    padding: 16px;
    font-size: 15px;
  }

  .language-toggle {
    position: static;
    display: inline-block;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px;
  }

  .header {
    padding: 20px 16px;
  }

  .logo {
    font-size: 40px;
  }

  .title {
    font-size: 20px;
  }

  .quiz-card,
  .results-card {
    padding: 20px;
  }

  .question {
    font-size: 17px;
  }

  .answer-option {
    padding: 14px;
  }

  .btn {
    padding: 14px 24px;
    font-size: 15px;
  }

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

/* Focus styles for accessibility */
.answer-option:focus,
.btn:focus,
.language-toggle:focus {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
