/* Base Styles for Career Quiz App */
/* This file contains all common styles shared across pages */

:root {
  /* Colors */
  --color-primary: #0D7AFF;
  --color-primary-hover: #0056b3;
  --color-success: #16A34A;
  --color-text-primary: #212529;
  --color-text-secondary: #495057;
  --color-text-light: #6C757D;
  --color-bg-gray: #F8F9FA;
  --color-border: #DEE2E6;
  --color-white: #FFFFFF;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  
  /* Layout */
  --max-width: 480px;
  
  /* Transitions */
  --transition-base: 200ms ease;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--color-white);
  color: var(--color-text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  width: 100%;
}

/* Header */
.header {
  padding: var(--spacing-lg) 0 var(--spacing-md);
  text-align: center;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text-primary);
  text-decoration: none;
}

/* Back Button */
.back-button {
  position: absolute;
  top: var(--spacing-lg);
  left: var(--spacing-lg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
  z-index: 20;
}

.back-button:hover {
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-button svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-primary);
}

/* Progress Bar */
.progress-container {
  padding: 0 var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.progress-wrapper {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.progress-line {
  position: absolute;
  height: 2px;
  background: var(--color-border);
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
}

.progress-line-active {
  position: absolute;
  height: 2px;
  background: var(--color-primary);
  top: 50%;
  transform: translateY(-50%);
  transition: width 500ms ease;
}

.progress-dots {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  transition: var(--transition-base);
  cursor: pointer;
}

.progress-dot.active {
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 3px rgba(13, 122, 255, 0.1);
}

.progress-dot.completed {
  background: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.progress-label {
  text-align: center;
  margin-top: var(--spacing-sm);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* Main Content Area */
.main-content {
  padding: 0 var(--spacing-lg);
  min-height: calc(100vh - 300px);
}

/* Page Title and Subtitle */
.page-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.page-title .highlight {
  color: #FF0000;
}

.page-subtitle {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

/* Content Area for Dynamic Content */
.content-area {
  margin-bottom: var(--spacing-xl);
}

/* Option Cards (for multiple choice) */
.option-card {
  background: var(--color-white);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.option-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.option-card.selected {
  border-color: var(--color-primary);
  background: rgba(13, 122, 255, 0.05);
}

.option-card-content {
  display: flex;
  align-items: center;
  flex: 1;
}

.option-icon {
  width: 24px;
  height: 24px;
  margin-right: var(--spacing-md);
  flex-shrink: 0;
}

.option-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.option-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
}

.option-card.selected .option-checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
  position: relative;
}

.option-card.selected .option-checkbox::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

/* Image Cards (for gender/age selection) */
.image-cards-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}

.image-card {
  position: relative;
  width: 180px;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-base);
}

.image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.image-card-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.image-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.image-card-label-text {
  font-size: 15px;
  font-weight: 500;
}

.image-card-label-arrow {
  width: 20px;
  height: 20px;
}

/* Continue Button */
.continue-button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  margin: 0 auto var(--spacing-lg);
  display: block;
  transition: var(--transition-base);
  box-shadow: 0 4px 12px rgba(13, 122, 255, 0.25);
  opacity: 0.5;
  pointer-events: none;
}

.continue-button.enabled {
  opacity: 1;
  pointer-events: auto;
}

.continue-button:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: scale(0.98);
}

/* Rating Badge */
.rating-badge {
  display: inline-flex;
  align-items: center;
  background: var(--color-success);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--spacing-lg);
}

.rating-badge svg {
  width: 16px;
  height: 16px;
  margin-right: var(--spacing-xs);
}

/* Footer */
.footer {
  padding: var(--spacing-lg);
  text-align: center;
  font-size: 11px;
  color: var(--color-text-light);
  line-height: 1.6;
}

.footer a {
  color: var(--color-primary);
  text-decoration: none;
}

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

.footer-separator {
  margin: 0 var(--spacing-sm);
}

/* Timer */
.timer {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Loading State */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .image-cards-grid {
    gap: 8px;
  }
  
  .image-card {
    width: calc(50% - 4px);
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .page-subtitle {
    font-size: 16px;
  }
}