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

:root {
  --primary: #0891b2;
  --primary-light: #22d3ee;
  --primary-dark: #0e7490;
  --bg-primary: #f0fdfa;
  --bg-secondary: #ffffff;
  --text-primary: #134e4a;
  --text-secondary: #5eead4;
  --border: #99f6e4;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #ccfbf1 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.header {
  background: var(--bg-secondary);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.logo svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e0f2fe;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 4px;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--primary-dark);
  font-weight: 500;
  min-width: 80px;
  text-align: right;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-container {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.question-card {
  display: none;
  animation: fadeIn 0.4s ease;
}

.question-card.active {
  display: block;
}

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

.question-number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.5;
}

.question-hint {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
}

/* Text Input for Security Token */
.text-input-group {
  margin-bottom: 16px;
}

.text-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.text-input::placeholder {
  color: #94a3b8;
}

/* Radio Options */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
}

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

.option-label.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f7fa 100%);
}

.option-radio {
  display: none;
}

.option-custom-radio {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.option-label.selected .option-custom-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.option-custom-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  transform: scale(0);
  transition: var(--transition);
}

.option-label.selected .option-custom-radio::after {
  transform: scale(1);
}

.option-value {
  font-weight: 600;
  color: var(--primary);
  margin-right: 12px;
  font-size: 1.125rem;
  min-width: 24px;
}

.option-text {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Likert Scale Visual */
.likert-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.likert-option {
  flex: 1;
  text-align: center;
}

.likert-btn {
  width: 100%;
  padding: 20px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.likert-btn:hover {
  border-color: var(--primary-light);
  background: var(--bg-primary);
  transform: translateY(-2px);
}

.likert-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.likert-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.likert-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

/* Footer Navigation */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-back {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-back:hover:not(:disabled) {
  background: var(--bg-primary);
  border-color: var(--primary-light);
}

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

.btn-next {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: var(--shadow);
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-next:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Success Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.modal-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.modal-content h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.modal-content p {
  color: #64748b;
  margin-bottom: 8px;
}

.submission-id {
  font-size: 0.875rem;
  background: var(--bg-primary);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-family: monospace;
}

.submission-id span {
  color: var(--primary);
  font-weight: 600;
}

/* Loading State */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  .header {
    padding: 16px;
  }

  .form-container {
    padding: 24px 20px;
  }

  .question-text {
    font-size: 1.1rem;
  }

  .likert-scale {
    gap: 8px;
  }

  .likert-btn {
    padding: 16px 4px;
  }

  .likert-value {
    font-size: 1.25rem;
  }

  .likert-label {
    font-size: 0.6rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 32px 24px;
  }
}
