:root {
  color-scheme: light;
}

.dark {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  padding-bottom: 7rem;
  background-image:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 45%);
}

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

.input-field {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.95rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dark .input-field {
  border-color: rgba(71, 85, 105, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
}

.input-field:focus {
  border-color: rgba(255, 122, 89, 0.95);
  box-shadow: 0 0 0 4px rgba(255, 122, 89, 0.12);
  transform: translateY(-1px);
}

.secondary-button {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 39, 51, 0.55);
  box-shadow: 0 10px 24px rgba(29, 39, 51, 0.08);
}

.dark .secondary-button {
  border-color: rgba(71, 85, 105, 0.7);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
}

.compact-button {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
}

.result-card {
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.9), rgba(255, 255, 255, 0.95));
  padding: 1.25rem;
}

.dark .result-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.95));
}

.result-card-header {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff7a59;
}

.question-tile {
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
}

.dark .question-tile {
  border-color: rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.85);
}

.loader {
  height: 3rem;
  width: 3rem;
  border-radius: 9999px;
  border: 4px solid rgba(148, 163, 184, 0.25);
  border-top-color: #ff7a59;
  animation: spin 0.9s linear infinite;
}

.saved-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
}

.dark .saved-card {
  border-color: rgba(71, 85, 105, 0.45);
  background: rgba(15, 23, 42, 0.75);
}

.ad-shell {
  min-height: 110px;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 122, 89, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.88);
}

.dark .ad-shell {
  border-color: rgba(71, 85, 105, 0.8);
  background:
    linear-gradient(135deg, rgba(255, 122, 89, 0.16), transparent 55%),
    rgba(15, 23, 42, 0.88);
}

.ad-placeholder {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.ad-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff7a59;
}

.ad-title {
  margin-top: 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.ad-copy {
  margin-top: 0.35rem;
  color: rgb(71 85 105);
}

.dark .ad-copy {
  color: rgb(203 213 225);
}

.ad-chip {
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgba(29, 39, 51, 0.92);
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: white;
}

.dark .ad-chip {
  background: rgba(255, 255, 255, 0.9);
  color: rgb(15 23 42);
}

.sticky-ad-shell {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 40;
  width: min(960px, calc(100% - 1.5rem));
  transform: translateX(-50%);
}

.fade-up {
  animation: fadeUp 0.45s ease both;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .result-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ad-placeholder {
    flex-direction: column;
    align-items: flex-start;
  }
}
