*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-bg: #f8f7ff;
  --bg: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --border: #dfe6e9;
  --success: #00b894;
  --card-hover: #f0eeff;
  --card-selected: #6c5ce7;
  --card-selected-text: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(108, 92, 231, 0.08);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--primary-bg);
  color: var(--text);
  overflow: hidden;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.4s ease;
}

/* Survey Container */
.survey-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Slides */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


.slide-content {
  max-width: 640px;
  width: 100%;
  padding: 2rem 1.5rem;
}

/* Intro / Outro */
.intro-content {
  text-align: center;
}

.intro-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.intro-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

/* Question Number */
.question-number {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* Question separator (extra spacing) */
.question-separator {
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

/* Options (Multiple Choice) */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  font-family: inherit;
}

.option:hover {
  border-color: var(--primary-light);
  background: var(--card-hover);
}

.option.selected {
  border-color: var(--card-selected);
  background: var(--card-selected);
  color: var(--card-selected-text);
}

.option.selected .option-key {
  background: rgba(255, 255, 255, 0.25);
  color: var(--card-selected-text);
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Other Input */
.other-input {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.other-input:focus {
  outline: none;
  border-color: var(--primary);
}

.hidden {
  display: none !important;
}

/* Scale */
.scale-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scale-label {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.scale-endpoint {
  font-size: 0.85rem;
  color: var(--text-light);
  max-width: 100px;
  text-align: center;
}

.scale-buttons {
  display: flex;
  gap: 0.5rem;
}

.scale-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.scale-btn:hover {
  border-color: var(--primary-light);
  background: var(--card-hover);
}

.scale-btn.selected {
  background: var(--card-selected);
  border-color: var(--card-selected);
  color: var(--card-selected-text);
}

/* Ranking / Drag & Drop */
.ranking-hint {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  font-size: 0.95rem;
  color: var(--text);
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.ranking-item:active {
  cursor: grabbing;
}

.ranking-item.dragging {
  opacity: 0.5;
  border-color: var(--primary);
  background: var(--card-hover);
}

.ranking-item.drag-over {
  border-color: var(--primary);
  transform: scale(1.02);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Feature List (Q10) */
.feature-list {
  list-style: none;
  margin-bottom: 1.5rem;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
}

.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* Freetext / Email */
.freetext-input {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s;
  margin-bottom: 1.25rem;
}

.freetext-input:focus {
  outline: none;
  border-color: var(--primary);
}

.email-input {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.email-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Checkbox */
.checkbox-group {
  margin-bottom: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}

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

.checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  flex-shrink: 0;
  transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "\2713";
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary:hover {
  background: #5b4bd5;
  transform: translateY(-1px);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.btn-back {
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--text-light);
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
}

.btn-back:hover {
  color: var(--text);
}

.btn-next,
.btn-submit {
  padding: 0.75rem 1.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-next:hover,
.btn-submit:hover {
  background: #5b4bd5;
  transform: translateY(-1px);
}

.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-submit {
  background: var(--success);
}

.btn-submit:hover {
  background: #00a381;
}

/* Validation shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.4s ease;
}

/* Loading spinner */
.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-submit.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

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

/* Mobile */
@media (max-width: 600px) {
  .slide-content {
    padding: 1.5rem 1rem;
  }

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

  h2 {
    font-size: 1.25rem;
  }

  .scale-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .scale-endpoint {
    max-width: none;
  }

  .scale-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .option {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
}
