/* Tech Fit Analyzer - CSS Styles */

:root {
  --transition-duration: 0.2s;
  --transition-easing: ease-in-out;
}

/* Main container */
.tfa-wrapper {
  width: 100%;
  max-width: 90ch;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header and Progress */
.tfa-header {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--bg-secondary, #f0f0f0);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #3b82f6), var(--accent-light, #60a5fa));
  border-radius: 3px;
  width: 0%;
  transition: width var(--transition-duration) var(--transition-easing);
}

.progress-text {
  font-size: 0.875rem;
  color: var(--text-secondary, #666);
  text-align: center;
  font-weight: 500;
}

/* Content area */
.tfa-content {
  min-height: 400px;
  margin-bottom: 2rem;
}

/* Intro Section */
.intro-content {
  text-align: center;
  padding: 3rem 1.5rem;
  background-color: var(--bg-secondary, #f9fafb);
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
}

.intro-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
}

.intro-content p {
  font-size: 1rem;
  color: var(--text-secondary, #4b5563);
  line-height: 1.6;
  margin: 0 0 1rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.intro-content .btn-start {
  margin-top: 2rem;
}

/* Question Container */
.question-container {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.question-header {
  margin-bottom: 2rem;
}

.question-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.question-section {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent, #3b82f6);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Option Button */
.option-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background-color: var(--button-bg, #ffffff);
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text, #1f2937);
  cursor: pointer;
  min-height: 56px;
  transition: all var(--transition-duration) var(--transition-easing);
  text-align: left;
}

.option-button:hover:not(.selected) {
  border-color: var(--accent, #3b82f6);
  background-color: var(--bg-secondary, #f9fafb);
}

.option-button:focus {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
}

.option-button.selected {
  background-color: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
  color: #ffffff;
}

.option-label {
  flex: 1;
}

.option-checkmark {
  font-weight: bold;
  font-size: 1.25rem;
  margin-left: 1rem;
  opacity: 1;
}

/* Results Container */
.results-wrapper {
  animation: fadeIn 0.3s ease-in;
}

.results-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background-color: var(--bg-secondary, #f9fafb);
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
}

.results-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 0 0 1rem 0;
}

.results-header p {
  font-size: 1rem;
  color: var(--text-secondary, #4b5563);
  margin: 0;
  line-height: 1.6;
}

/* Results Sections */
.results-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: var(--bg-secondary, #f9fafb);
  border-radius: 12px;
  border-left: 4px solid var(--accent, #3b82f6);
}

.results-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 0 0 0.5rem 0;
}

.section-description {
  font-size: 0.95rem;
  color: var(--text-secondary, #4b5563);
  margin: 0.5rem 0 1.5rem 0;
  line-height: 1.5;
}

/* Tech Stack Cards */
.tech-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .tech-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tech-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tech-card {
  padding: 1.5rem;
  background-color: var(--bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  transition: all var(--transition-duration) var(--transition-easing);
  display: flex;
  flex-direction: column;
}

.tech-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent, #3b82f6);
  transform: translateY(-2px);
}

.tech-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 0 0 0.75rem 0;
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-secondary, #4b5563);
  margin: 0 0 1rem 0;
  line-height: 1.5;
  flex: 1;
}

.card-details {
  border-top: 1px solid var(--border, #e5e7eb);
  padding-top: 1rem;
  margin: 1rem 0;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-label {
  color: var(--text-secondary, #4b5563);
  font-weight: 500;
}

.detail-value {
  color: var(--accent, #3b82f6);
  font-weight: 600;
}

.card-link {
  color: var(--accent, #3b82f6);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-duration) var(--transition-easing);
}

.card-link:hover {
  color: var(--accent-light, #60a5fa);
  text-decoration: underline;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
}

.checklist-item {
  padding: 0.75rem 0 0.75rem 1.5rem;
  border-left: 3px solid var(--accent, #3b82f6);
  color: var(--text, #1f2937);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  position: relative;
  background-color: transparent;
  transition: padding-left var(--transition-duration) var(--transition-easing);
}

.checklist-item::before {
  content: '✓';
  position: absolute;
  left: -1.85rem;
  color: var(--accent, #3b82f6);
  font-weight: bold;
}

.checklist-item:hover {
  padding-left: 1.75rem;
}

/* Roadmap Timeline */
.roadmap-timeline {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .roadmap-timeline {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }
}

.roadmap-phase {
  position: relative;
  padding: 1.5rem;
  background-color: var(--bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  flex: 1;
  min-width: 200px;
}

@media (min-width: 768px) {
  .roadmap-phase {
    text-align: center;
  }
}

.phase-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--accent, #3b82f6);
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .phase-number {
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.phase-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 0 0 0.5rem 0;
}

.phase-duration {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent, #3b82f6);
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.phase-description {
  font-size: 0.9rem;
  color: var(--text-secondary, #4b5563);
  line-height: 1.5;
  margin: 0;
}

.phase-connector {
  position: absolute;
  width: 2px;
  height: 40px;
  background-color: var(--accent, #3b82f6);
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.3;
}

@media (min-width: 768px) {
  .phase-connector {
    width: 40px;
    height: 2px;
    bottom: 50%;
    left: 100%;
    transform: translateY(50%);
  }
}

/* Results Actions */
.results-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

@media (min-width: 768px) {
  .results-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-duration) var(--transition-easing);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:focus {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--accent, #3b82f6);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-dark, #2563eb);
}

.btn-secondary {
  background-color: var(--bg-secondary, #f3f4f6);
  color: var(--text, #1f2937);
  border: 1px solid var(--border, #e5e7eb);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-tertiary, #e5e7eb);
  border-color: var(--text, #1f2937);
}

/* Button Group */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .button-group {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
  }
}

.button-group .btn {
  flex: 1;
  min-width: 140px;
}

.button-group .btn-prev {
  order: 1;
}

.button-group .btn-next {
  order: 2;
}

.button-group .btn-reset {
  order: 2;
}

@media (min-width: 768px) {
  .button-group {
    flex-direction: row;
  }

  .button-group .btn {
    flex: 0 1 auto;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .progress-bar {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .intro-content {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .option-button {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .option-button:hover:not(.selected) {
    background-color: rgba(255, 255, 255, 0.08);
  }

  .results-section {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent, #3b82f6);
  }

  .results-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .tech-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .tech-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .roadmap-phase {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.08);
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .option-button,
  .card-link,
  .btn,
  .tech-card,
  .checklist-item {
    transition: none;
  }

  .results-wrapper,
  .question-container {
    animation: none;
  }
}

/* Mobile Responsive Adjustments */
@media (max-width: 375px) {
  .tfa-wrapper {
    padding: 1rem 0.75rem;
  }

  .intro-content {
    padding: 2rem 1rem;
  }

  .intro-content h1 {
    font-size: 1.75rem;
  }

  .question-header h2 {
    font-size: 1.35rem;
  }

  .option-button {
    padding: 1rem 1rem;
  }

  .results-section {
    padding: 1.5rem 1rem;
  }

  .button-group {
    gap: 0.75rem;
  }

  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }
}

/* Print Styles */
@media print {
  .button-group,
  .progress-bar,
  .progress-text {
    display: none;
  }

  .results-wrapper {
    page-break-after: auto;
  }

  .results-section {
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
