/* === Quiz Specific Styles === */

.quiz-main {
  min-height: 100vh;
  padding-top: 80px;
  background: linear-gradient(180deg, #0a0a0a 0%, #0f0f1a 100%);
}

/* === Quiz Screens === */
.quiz-screen {
  display: none;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  animation: fadeIn 0.4s ease;
}

.quiz-screen.active {
  display: block;
}

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

/* === Intro Screen === */
.quiz-intro-content {
  text-align: center;
  padding: 3rem 0;
}

.quiz-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.quiz-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.quiz-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.quiz-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.quiz-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.quiz-feature-icon {
  font-size: 1.2rem;
}

.quiz-categories-preview {
  margin-bottom: 2.5rem;
}

.quiz-categories-preview p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.category-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quiz-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-arrow {
  transition: transform 0.2s;
}

.quiz-start-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.quiz-time {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* === Question Screen === */
.quiz-header {
  margin-bottom: 2rem;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #00b8d4);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
  white-space: nowrap;
}

.quiz-category {
  display: inline-block;
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.question-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s;
}

.question-container:hover {
  border-color: #333;
}

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

.answers-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.answer-option:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.05);
}

.answer-option.selected {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
}

.answer-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.answer-option.selected .answer-radio {
  border-color: var(--cyan);
}

.answer-option.selected .answer-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 50%;
}

.answer-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.answer-option.selected .answer-text {
  color: var(--text);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.quiz-nav .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#next-btn:disabled,
#prev-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === Results Screen === */
.results-container {
  padding: 2rem 0;
}

.score-section {
  text-align: center;
  margin-bottom: 3rem;
}

.results-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.score-circle {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
}

.score-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.score-fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.5s ease;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
}

.score-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cyan);
}

/* Category Breakdown */
.results-breakdown {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.breakdown-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.category-score {
  margin-bottom: 1rem;
}

.category-score:last-child {
  margin-bottom: 0;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.category-name {
  font-size: 0.9rem;
  color: var(--text);
}

.category-percent {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--mono);
}

.category-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.category-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.category-fill.critical { background: #ff4444; }
.category-fill.poor { background: #ff8800; }
.category-fill.fair { background: #ffcc00; }
.category-fill.good { background: #88cc00; }
.category-fill.excellent { background: #22c55e; }

/* Results Summary */
.results-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.summary-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--black);
  border-radius: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Recommendations */
.results-recommendations {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.results-recommendations h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--black);
  border-radius: 8px;
  border-left: 3px solid;
}

.recommendation-item.high { border-color: #ff4444; }
.recommendation-item.medium { border-color: #ffcc00; }
.recommendation-item.low { border-color: var(--cyan); }

.recommendation-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.recommendation-content {
  flex: 1;
}

.recommendation-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.recommendation-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* CTA Section */
.results-cta {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.results-cta h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.results-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cta-note {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 0;
}

/* Results Actions */
.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.quiz-footer {
  margin-top: auto;
}

/* === Responsive === */
@media (max-width: 640px) {
  .quiz-screen {
    padding: 1.5rem 1rem 3rem;
  }

  .quiz-intro-content {
    padding: 2rem 0;
  }

  .quiz-features {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .question-container {
    padding: 1.5rem;
  }

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

  .quiz-nav {
    flex-direction: column-reverse;
  }

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

  .score-circle {
    width: 150px;
    height: 150px;
  }

  .score-value {
    font-size: 2.5rem;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }

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

  .cta-buttons .btn {
    width: 100%;
  }
}
