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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* Survey Container */
.survey-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.survey-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  text-align: center;
  margin-bottom: 2rem;
}

.header-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.header-content h1 i {
  color: #667eea;
  font-size: 2.2rem;
}

.header-content p {
  font-size: 1.2rem;
  color: #718096;
  font-weight: 400;
}

/* Progress Bar */
.progress-container {
  max-width: 600px;
  margin: 0 auto;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 20%; /* 1/5 steps */
}

.progress-text {
  text-align: center;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.9rem;
}

/* Main Content */
.survey-main {
  flex: 1;
  padding: 2rem;
  display: flex;
  justify-content: center;
}

.survey-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.survey-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Survey Steps */
.survey-step {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.survey-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: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #f7fafc;
}

.step-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.step-header h2 i {
  color: #667eea;
  font-size: 1.8rem;
}

.step-header p {
  font-size: 1.1rem;
  color: #718096;
}

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

.form-grid .full-width {
  grid-column: 1 / -1;
}

/* Form Sections */
.form-section {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 16px;
  border-left: 4px solid #667eea;
}

.form-section h3 {
  color: #2d3748;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Input Groups */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.75rem;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.95rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.input-group textarea,
textarea {
  resize: vertical;
  min-height: 200px !important;
  height: auto !important;
  font-size: 1rem;
  line-height: 1.5;
  padding: 1.25rem;
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

.input-group textarea:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

/* Radio Groups */
.radio-group {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
}

.radio-label:hover {
  border-color: #cbd5e0;
  background: #f7fafc;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #667eea;
  background: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.radio-label input[type="radio"]:checked ~ span {
  color: #667eea;
  font-weight: 600;
}

/* Checkbox Groups */
.checkbox-group {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
}

.checkbox-label:hover {
  border-color: #cbd5e0;
  background: #f7fafc;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #667eea;
  border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label input[type="checkbox"]:checked ~ span {
  color: #667eea;
  font-weight: 600;
}

/* Star Rating */
.rating-section {
  text-align: center;
  margin-bottom: 3rem;
}

.rating-section h3 {
  font-size: 1.3rem;
  color: #2d3748;
  margin-bottom: 1rem;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.star-rating input[type="radio"] {
  display: none;
}

.star-rating .star {
  font-size: 2.5rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
  color: #fbbf24;
}

.star-rating input[type="radio"]:checked ~ .star,
.star-rating input[type="radio"]:checked ~ .star ~ .star {
  color: #fbbf24;
}

.rating-text {
  color: #718096;
  font-size: 0.9rem;
}

/* Number Rating */
.rating-grid {
  display: grid;
  gap: 2rem;
}

.rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 2px solid #f1f5f9;
}

.rating-item label {
  font-weight: 600;
  color: #4a5568;
  font-size: 1rem;
}

.number-rating {
  display: flex;
  gap: 0.5rem;
}

.number-rating input[type="radio"] {
  display: none;
}

.number-rating label {
  width: 40px;
  height: 40px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #718096;
}

.number-rating label:hover {
  border-color: #667eea;
  background: #f7fafc;
  color: #667eea;
}

.number-rating input[type="radio"]:checked + label {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* Step Navigation */
.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #f1f5f9;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

.prev-btn {
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
}

.prev-btn:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
  transform: translateY(-2px);
}

.next-btn,
.submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.next-btn:hover,
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.submit-btn:hover {
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

/* Footer */
.survey-footer {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: auto;
}

.survey-footer p {
  color: #a0aec0;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .survey-header {
    padding: 1.5rem;
  }
  
  .header-content h1 {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .survey-main {
    padding: 1rem;
  }
  
  .survey-form {
    padding: 2rem;
    border-radius: 16px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .radio-group,
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .rating-item {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .step-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 1.5rem;
  }
  
  .step-header h2 {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .survey-form {
    padding: 1.5rem;
  }
  
  .form-section {
    padding: 1.5rem;
  }
  
  .star-rating .star {
    font-size: 2rem;
  }
  
  .number-rating label {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.survey-step.active {
  animation: slideIn 0.5s ease-out;
}

/* Focus States */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Loading States */
.nav-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success States */
input:valid,
select:valid,
textarea:valid {
  border-color: #48bb78;
}

/* Error States */
input:invalid:not(:placeholder-shown),
select:invalid,
textarea:invalid {
  border-color: #f56565;
}

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

/* Success and Error Messages */
.success-message,
.error-message {
  text-align: center;
  padding: 3rem 2rem;
  animation: fadeIn 0.5s ease-in-out;
}

.success-icon,
.error-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.success-icon {
  color: #48bb78;
}

.error-icon {
  color: #f56565;
}

.success-message h2,
.error-message h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2d3748;
}

.success-message p,
.error-message p {
  font-size: 1.1rem;
  color: #718096;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.success-actions .nav-btn {
  min-width: 200px;
}

/* Loading Animation */
.fa-spinner {
  animation: spin 1s linear infinite;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .survey-form {
    border: 2px solid #000;
  }
  
  .radio-label,
  .checkbox-label {
    border-color: #000;
  }
  
  .nav-btn {
    border: 2px solid #000;
  }
}
  