/* 100X Solutions Career Switch Risk Calculator - Brand System */

/* CSS Custom Properties (Design System) */
:root {
  /* Colors */
  --bg-primary: #0F172A;
  --surface-dark: #111827;
  --surface-card: #1F2937;
  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  --accent-cyan: #22D3EE;
  --accent-blue: #38BDF8;
  --success-green: #22C55E;
  --warning-orange: #F59E0B;
  --error-red: #EF4444;
  --border-color: #374151;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.3);
  
  /* Transitions */
  --transition-fast: 200ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container and Layout */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Header */
.header {
  background: var(--surface-dark);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-6) 0;
  margin-bottom: var(--space-8);
}

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

.logo {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  font-weight: 300;
}

/* Main Content */
.main {
  flex: 1;
  padding-bottom: var(--space-16);
}

/* Progress Bar */
.progress-container {
  margin-bottom: var(--space-8);
  text-align: center;
}

.progress-bar {
  background: var(--surface-dark);
  height: 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-3);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.progress-fill {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  height: 100%;
  border-radius: var(--radius-lg);
  transition: width var(--transition-normal);
  width: 16.67%; /* 1/6 for first step */
}

.progress-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Form Container */
.form-container {
  background: var(--surface-dark);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-8);
}

.form-step {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.form-step.active {
  display: block;
}

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

.step-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.step-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.step-header p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-6);
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  font-size: var(--font-size-base);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.form-group select option {
  background: var(--surface-card);
  color: var(--text-primary);
}

/* Range Input */
.range-container {
  margin: var(--space-4) 0;
}

.range-input {
  width: 100%;
  height: 6px;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  outline: none;
  -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-cyan);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.range-input::-webkit-slider-thumb:hover {
  background: var(--accent-blue);
  transform: scale(1.1);
}

.range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-cyan);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.range-value {
  text-align: center;
  margin-top: var(--space-3);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Tooltip */
.tooltip {
  position: absolute;
  right: var(--space-3);
  top: var(--space-8);
  width: 20px;
  height: 20px;
  background: var(--accent-cyan);
  border-radius: 50%;
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: help;
  transition: all var(--transition-fast);
  z-index: 10;
}

.tooltip:hover {
  background: var(--accent-blue);
  transform: scale(1.1);
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  right: 0;
  background: var(--surface-card);
  color: var(--text-primary);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  z-index: 20;
  max-width: 200px;
  white-space: normal;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-family);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: var(--bg-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--surface-dark);
  border-color: var(--accent-cyan);
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.btn-outline:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.form-navigation .btn {
  min-width: 120px;
}

/* Results Container */
.results-container {
  background: var(--surface-dark);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  animation: slideIn var(--transition-normal);
}

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

.results-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.results-header h2 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-header p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.result-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  position: relative;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.result-card.primary {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(56, 189, 248, 0.1));
  border: 2px solid var(--accent-cyan);
}

.result-icon {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

.result-content h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.score-number {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--accent-cyan);
}

.score-max {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-left: var(--space-1);
}

.risk-category {
  font-size: var(--font-size-lg);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  display: inline-block;
}

.risk-category.low {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success-green);
}

.risk-category.moderate {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-orange);
}

.risk-category.high {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error-red);
}

.risk-category.critical {
  background: rgba(239, 68, 68, 0.3);
  color: var(--error-red);
  border: 1px solid var(--error-red);
}

.percentage {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--success-green);
  margin-bottom: var(--space-2);
}

.time-estimate {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: var(--space-2);
}

.result-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Risk Breakdown */
.risk-breakdown {
  margin-bottom: var(--space-8);
}

.risk-breakdown h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
  text-align: center;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.breakdown-item {
  background: var(--surface-card);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.breakdown-item h4 {
  font-size: var(--font-size-base);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.breakdown-score {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: var(--space-1);
}

.breakdown-weight {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Action Items */
.action-items {
  margin-bottom: var(--space-8);
}

.action-items h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
  text-align: center;
}

.recommendation-item {
  background: var(--surface-card);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent-cyan);
  margin-bottom: var(--space-4);
}

.recommendation-item h4 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.recommendation-item p {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Sharing Section */
.sharing-section {
  text-align: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.sharing-section h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
}

.sharing-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--surface-dark);
  border-top: 1px solid var(--border-color);
  padding: var(--space-8) 0;
  margin-top: auto;
}

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

.footer-content > p {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.disclaimer {
  max-width: 600px;
  margin: 0 auto;
}

.disclaimer p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.disclaimer strong {
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
  }
  
  .header {
    padding: var(--space-4) 0;
  }
  
  .logo {
    font-size: var(--font-size-2xl);
  }
  
  .tagline {
    font-size: var(--font-size-base);
  }
  
  .form-container,
  .results-container {
    padding: var(--space-6);
    margin-bottom: var(--space-6);
  }
  
  .step-header h2 {
    font-size: var(--font-size-xl);
  }
  
  .step-header p {
    font-size: var(--font-size-base);
  }
  
  .results-header h2 {
    font-size: var(--font-size-2xl);
  }
  
  .results-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .breakdown-grid {
    grid-template-columns: 1fr;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .form-navigation .btn {
    width: 100%;
  }
  
  .sharing-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .sharing-buttons .btn {
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .form-container,
  .results-container {
    padding: var(--space-4);
  }
  
  .step-header {
    margin-bottom: var(--space-6);
  }
  
  .form-group {
    margin-bottom: var(--space-4);
  }
  
  .tooltip {
    display: none; /* Hide tooltips on very small screens */
  }
  
  .results-header h2 {
    font-size: var(--font-size-xl);
  }
  
  .score-number {
    font-size: var(--font-size-3xl);
  }
  
  .percentage,
  .time-estimate {
    font-size: var(--font-size-2xl);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn var(--transition-normal);
}

.slide-in {
  animation: slideIn var(--transition-normal);
}

.count-up {
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
.btn:focus,
input:focus,
select:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #FFFFFF;
    --text-secondary: #CCCCCC;
  }
}

/* Print styles */
@media print {
  .form-container,
  .form-navigation,
  .sharing-section {
    display: none;
  }
  
  .results-container {
    box-shadow: none;
    border: 1px solid #000;
  }
}

