:root {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
  
  /* Enhanced color palette */
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
  --primary-gradient-hover: linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
  --secondary-bg: rgba(15, 23, 42, 0.85);
  --card-bg: rgba(15, 23, 42, 0.92);
  --border-color: rgba(148, 163, 184, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --success-color: #22c55e;
  --error-color: #ef4444;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(148, 163, 184, 0.1);
  --shadow-xl: 0 25px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.25), transparent 50%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.2), transparent 50%),
    radial-gradient(circle at center, rgba(129, 140, 248, 0.15), transparent 60%),
    linear-gradient(135deg, #0a0f1a 0%, #020617 100%);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  align-items: stretch;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: center;
  animation: fadeIn 0.6s ease-out;
}

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

/* Combined header with logo */
.combined-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  text-align: center;
  animation: slideDown 0.5s ease-out;
}

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

.combined-header .logo {
  height: 48px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: fadeIn 0.6s ease-out;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.combined-header .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.combined-header .role-question {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-primary);
  line-height: 1.3;
}

.combined-header .tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--card-bg);
  border-radius: 32px;
  padding: 40px 32px 16px 32px;
  box-shadow: var(--shadow-xl);
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 80px);
  margin: 40px 0;
  backdrop-filter: blur(24px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  animation: slideUp 0.6s ease-out 0.2s both;
}

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

.role-select {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  text-align: center;
  padding: 0;
}

.role-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 600px;
  margin-top: 20px;
}

button {
  border-radius: 20px;
  border: none;
  padding: 24px 32px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  position: relative;
  overflow: hidden;
  text-align: center;
  letter-spacing: 0.01em;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::before {
  width: 300px;
  height: 300px;
}

button.primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

button.primary:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
}

button.primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

button.secondary {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-primary);
  border: 2px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

button.secondary:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

button.secondary:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

.survey-container,
.contact-container,
.thanks-container {
  display: none;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
  animation: fadeIn 0.4s ease-out;
}

.survey-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-logo {
  height: 38px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  align-self: flex-start;
}

.role-chip-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.role-chip-wrapper .survey-logo {
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.survey-header > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.survey-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.survey-subtitle {
  display: none;
}

.progress {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(31, 41, 55, 0.8);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background: var(--primary-gradient);
  border-radius: inherit;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.questions-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 12px;
  padding-bottom: 8px;
  min-height: 0;
}

.questions-list::-webkit-scrollbar {
  width: 10px;
}

.questions-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
}

.questions-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}

.questions-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

.question-block {
  padding: 24px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(75, 85, 99, 0.3);
  transition: all 0.3s ease;
  animation: slideIn 0.4s ease-out both;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.question-block:nth-child(1) { animation-delay: 0.05s; }
.question-block:nth-child(2) { animation-delay: 0.1s; }
.question-block:nth-child(3) { animation-delay: 0.15s; }
.question-block:nth-child(4) { animation-delay: 0.2s; }
.question-block:nth-child(5) { animation-delay: 0.25s; }

.question-block:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(15, 23, 42, 0.7);
  transform: translateX(4px);
}

.question {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.5;
}

.options {
  display: flex;
  flex-direction: row;
  gap: 16px;
  flex-wrap: wrap;
}

.option-pill {
  border-radius: 16px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(15, 23, 42, 0.7);
  flex: 1;
  min-width: 140px;
  min-height: 64px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.option-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.option-pill:hover::before {
  left: 100%;
}

.option-pill:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.option-pill input[type="radio"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.option-pill span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.option-pill.selected {
  border-color: #60a5fa;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.9), rgba(37, 99, 235, 0.8));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3), 0 8px 24px rgba(59, 130, 246, 0.4);
  transform: scale(1.02);
}

.option-pill.selected span {
  color: #ffffff;
}

.nav-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  padding-bottom: 0;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
}

.nav-buttons button {
  min-width: 160px;
}

.error {
  color: var(--error-color);
  font-size: 0.95rem;
  margin-top: 6px;
  font-weight: 500;
  animation: shake 0.4s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  border-radius: 16px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  padding: 16px 20px;
  font-size: 1.1rem;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-primary);
  transition: all 0.3s ease;
  min-height: 56px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover {
  border-color: rgba(148, 163, 184, 0.6);
}

.hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.role-chip {
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.3);
  color: #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  white-space: nowrap;
}

.link-button {
  background: transparent;
  border-radius: 999px;
  border: none;
  padding: 0;
  color: #60a5fa;
  font-size: 0.95rem;
  text-decoration: underline;
  cursor: pointer;
  box-shadow: none;
  min-height: auto;
  font-weight: 600;
  transition: color 0.2s ease;
}

.link-button:hover {
  color: #93c5fd;
}

.thanks-container {
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.thanks-container h2 {
  margin-top: 0;
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.thanks-container p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 24px;
}

.thanks-container .hint {
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .app {
    padding: 0 16px;
  }
  
  .card {
    max-height: calc(100vh - 48px);
    margin: 24px 0;
    padding: 24px 20px 16px 20px;
    border-radius: 24px;
  }
  
  .combined-header .logo {
    height: 40px;
    max-width: 240px;
  }
  
  .section-logo {
    height: 34px;
    max-width: 200px;
  }

  
  .combined-header .role-question {
    font-size: 1.35rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .role-buttons {
    max-width: 100%;
  }
  
  .options {
    flex-direction: column;
  }
  
  .option-pill {
    width: 100%;
  }
  
  .nav-buttons {
    flex-direction: column;
  }
  
  .nav-buttons button {
    width: 100%;
  }
  
  .survey-header > div:first-child {
    flex-direction: column;
  }
  
  .role-chip-wrapper .survey-logo {
    height: 36px;
    max-width: 200px;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 0 12px;
  }
  
  .card {
    max-height: calc(100vh - 40px);
    margin: 20px 0;
    padding: 24px 20px 16px 20px;
  }
  
  .combined-header {
    gap: 16px;
    margin-bottom: 24px;
  }
  
  .combined-header .logo {
    height: 36px;
    max-width: 200px;
  }
  
  .section-logo {
    height: 30px;
    max-width: 180px;
    align-self: center;
  }

  
  .combined-header .subtitle {
    font-size: 0.9rem;
  }
  
  .combined-header .role-question {
    font-size: 1.25rem;
    margin: 12px 0 6px;
  }
  
  .combined-header .tagline {
    font-size: 0.9rem;
  }
  
  .role-chip-wrapper .survey-logo {
    height: 32px;
    max-width: 180px;
    align-self: center;
  }
  
  .survey-title {
    font-size: 1.5rem;
  }
  
  button {
    font-size: 1.1rem;
    padding: 20px 24px;
    min-height: 64px;
  }
}
