:root {
  --trav-bg: #f4fbf3;
  --trav-surface: rgba(255, 255, 255, 0.56);
  --trav-surface-strong: rgba(255, 255, 255, 0.82);
  --trav-surface-soft: rgba(246, 253, 246, 0.72);
  --trav-border: rgba(132, 193, 151, 0.34);
  --trav-border-strong: rgba(65, 143, 94, 0.24);
  --trav-ink: #214d3b;
  --trav-ink-soft: #557867;
  --trav-accent: #2fbf68;
  --trav-accent-strong: #1e9b52;
  --trav-accent-soft: rgba(47, 191, 104, 0.14);
  --trav-gold: rgba(244, 212, 127, 0.22);
  --trav-shadow: 0 24px 70px rgba(30, 88, 58, 0.14);
  --trav-shadow-soft: 0 14px 36px rgba(30, 88, 58, 0.09);
  --trav-radius-xl: 34px;
  --trav-radius-lg: 26px;
  --trav-radius-md: 18px;
  --trav-radius-sm: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inika", "Georgia", serif;
  color: var(--trav-ink);
  background:
    radial-gradient(circle at top left, rgba(140, 241, 180, 0.48), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 231, 164, 0.34), transparent 24%),
    radial-gradient(circle at bottom left, rgba(214, 248, 224, 0.62), transparent 26%),
    linear-gradient(180deg, #f6fcf4 0%, #eef8f0 100%);
}

body::before {
  content: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.42), transparent 35%, rgba(255, 255, 255, 0.18) 60%, transparent 80%),
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.34), transparent 20%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.3), transparent 17%);
  opacity: 0.72;
}

.hero,
.main-container {
  position: relative;
  z-index: 1;
}

.hero {
  width: min(1240px, calc(100% - 48px));
  margin: 34px auto 18px;
  padding: 42px clamp(28px, 4vw, 56px);
  border: 1px solid var(--trav-border);
  border-radius: var(--trav-radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(245, 255, 247, 0.55)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08));
  box-shadow: var(--trav-shadow);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  overflow: hidden;
  text-align: center;
}

.hero::before,
.hero::after,
.form-section::before,
.result-content::before {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.hero::before {
  top: -96px;
  left: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(112, 236, 149, 0.26) 0%, transparent 72%);
}

.hero::after {
  right: -74px;
  bottom: -88px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251, 221, 127, 0.22) 0%, transparent 72%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4.15rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #1e563d;
  text-shadow: 0 12px 28px rgba(255, 255, 255, 0.32);
}

.hero p {
  width: min(760px, 100%);
  margin: 18px auto 0;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.72;
  color: var(--trav-ink-soft);
}

.main-container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto 56px;
  padding: 8px 0 42px;
}

.form-section,
.result-content {
  position: relative;
  border: 1px solid var(--trav-border);
  border-radius: var(--trav-radius-xl);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.74), rgba(244, 255, 247, 0.58)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
  box-shadow: var(--trav-shadow);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  overflow: hidden;
}

.form-section {
  display: none;
  opacity: 0;
  transform: translateY(32px);
  padding: clamp(28px, 4vw, 42px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.form-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.form-section::before,
.result-content::before {
  inset: auto auto -120px -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(143, 240, 173, 0.2) 0%, transparent 72%);
}

.form-section > * ,
.result-content > * {
  position: relative;
  z-index: 1;
}

.form-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 30px;
  font-size: clamp(1.7rem, 2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #1f5a40;
}

.form-section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 191, 104, 0.28), rgba(47, 191, 104, 0.04));
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.form-group,
.slider-group {
  border: 1px solid rgba(114, 184, 136, 0.2);
  border-radius: var(--trav-radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(246, 255, 249, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.form-group {
  padding: 18px;
}

.form-group label,
.slider-group label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5b806d;
}

.form-group input,
.form-group select {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 1px solid rgba(104, 177, 127, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--trav-ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.form-group select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #356c51 50%),
    linear-gradient(135deg, #356c51 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 24px,
    calc(100% - 16px) 24px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.form-group input::placeholder {
  color: rgba(52, 89, 70, 0.52);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(47, 191, 104, 0.5);
  box-shadow: 0 0 0 4px rgba(47, 191, 104, 0.12), 0 14px 30px rgba(47, 191, 104, 0.12);
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
}

.form-group input[type="range"],
.slider-group input[type="range"] {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 191, 104, 0.24), rgba(47, 191, 104, 0.7));
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
}

.form-group input[type="range"]::-webkit-slider-thumb,
.slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: linear-gradient(180deg, #3fd17a, #269d58);
  box-shadow: 0 10px 20px rgba(47, 191, 104, 0.26);
  cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb,
.slider-group input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: linear-gradient(180deg, #3fd17a, #269d58);
  box-shadow: 0 10px 20px rgba(47, 191, 104, 0.26);
  cursor: pointer;
}

.scale,
.slider-group .scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--trav-ink-soft);
}

.sliders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.slider-group {
  padding: 20px;
}

.slider-group label {
  margin-bottom: 16px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #28533f;
}

.step-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.tr-aivel-auth-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 18px;
  padding: 14px 18px;
  border: 1px solid rgba(114, 184, 136, 0.24);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(242, 255, 245, 0.62));
  box-shadow: 0 14px 28px rgba(24, 80, 52, 0.08);
}

.tr-aivel-auth-alert[hidden] {
  display: none;
}

.tr-aivel-auth-alert-copy {
  color: #2d5b46;
  font-size: 0.94rem;
  line-height: 1.55;
  font-weight: 700;
}

.tr-aivel-auth-alert-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(47, 191, 104, 0.2);
  color: #23714a;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(20, 71, 46, 0.08);
}

.tr-aivel-auth-alert-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(20, 71, 46, 0.11);
}

.step-buttons button,
.generate-btn,
.btn-regenerate,
.btn-explore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 28px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.step-buttons button,
.generate-btn,
.btn-explore {
  border: 1px solid rgba(42, 145, 78, 0.22);
  color: #f9fff9;
  background: linear-gradient(135deg, #31c46d 0%, #239752 100%);
  box-shadow: 0 18px 34px rgba(49, 196, 109, 0.22);
}

.step-buttons button:hover,
.generate-btn:hover,
.btn-explore:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(49, 196, 109, 0.26);
}

.prev-step,
.btn-regenerate {
  color: var(--trav-ink);
  border: 1px solid rgba(114, 184, 136, 0.22);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(17, 61, 40, 0.08);
}

.prev-step:hover,
.btn-regenerate:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 28px rgba(17, 61, 40, 0.1);
}

.generate-btn {
  min-width: min(100%, 320px);
  margin: 10px auto 0;
}

.generate-btn:disabled,
.step-buttons button:disabled,
.btn-regenerate:disabled,
.btn-explore:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.result-section {
  margin-top: 34px;
}

.loader {
  width: min(520px, 100%);
  margin: 0 auto 22px;
  padding: 18px 22px;
  border: 1px solid rgba(114, 184, 136, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--trav-shadow-soft);
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #2d6549;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.result-content {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 42px);
}

.result-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(104, 177, 127, 0.18);
}

.result-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  letter-spacing: -0.03em;
  color: #1f5a40;
}

.result-subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--trav-ink-soft);
}

.result-body {
  font-size: 1.02rem;
  line-height: 1.92;
  color: #2d5d47;
}

.result-body strong {
  color: #1b4e39;
}

.result-body ul {
  padding-left: 20px;
  margin: 14px 0;
}

.result-body li {
  margin-bottom: 8px;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.error-msg {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(214, 84, 84, 0.18);
  border-radius: 20px;
  background: rgba(255, 244, 244, 0.86);
  color: #ab3b3b;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(171, 59, 59, 0.08);
}

@media (max-width: 1180px) {
  .hero,
  .main-container {
    width: min(1100px, calc(100% - 32px));
  }

  .grid,
  .sliders {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    margin-top: 22px;
    padding: 34px 20px;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .form-section {
    padding: 22px 18px;
  }

  .form-section h2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .form-section h2::after {
    width: 100%;
    flex: none;
  }

  .step-buttons {
    flex-direction: column;
  }

  .tr-aivel-auth-alert {
    flex-direction: column;
    align-items: stretch;
  }

  .tr-aivel-auth-alert-link {
    width: 100%;
  }

  .step-buttons button,
  .generate-btn,
  .btn-regenerate,
  .btn-explore {
    width: 100%;
  }

  .scale,
  .slider-group .scale {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .hero,
  .main-container {
    width: calc(100% - 20px);
  }

  .hero {
    padding: 28px 16px;
    border-radius: 26px;
  }

  .form-section,
  .result-content {
    border-radius: 24px;
  }

  .form-group,
  .slider-group {
    padding: 16px;
    border-radius: 20px;
  }
}

#ai-demo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: aiDemoOverlayIn 0.3s ease;
}

.ai-demo-modal {
  position: relative;
  overflow: hidden;
  width: 88vw;
  max-width: 470px;
  padding: 42px 38px 34px;
  text-align: center;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.16)
  );
  box-shadow: 0 24px 64px rgba(63, 99, 79, 0.20);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: aiDemoModalIn 0.35s ease;
}

.ai-demo-modal::before,
.ai-demo-modal::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(42px);
  opacity: 0.55;
}

.ai-demo-modal::before {
  width: 180px;
  height: 180px;
  left: -30px;
  top: -10px;
  background: radial-gradient(circle, rgba(92, 201, 132, 0.26) 0%, rgba(92, 201, 132, 0) 72%);
}

.ai-demo-modal::after {
  width: 220px;
  height: 220px;
  right: -60px;
  bottom: -70px;
  background: radial-gradient(circle, rgba(92, 201, 132, 0.18) 0%, rgba(92, 201, 132, 0) 72%);
}

.ai-demo-modal-badge,
.ai-demo-modal h2,
.ai-demo-modal p,
.ai-demo-modal-btn {
  position: relative;
  z-index: 1;
}

.ai-demo-modal-badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2f8b58, #38a169);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 8px 22px rgba(56, 161, 105, 0.18);
}

.ai-demo-modal h2 {
  margin: 0 0 14px;
  color: #234c37;
  font-family: Inika, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.ai-demo-modal p {
  max-width: 320px;
  margin: 0 auto 26px;
  color: #5c615d;
  font-size: 0.95rem;
  line-height: 1.75;
}

.ai-demo-modal-btn {
  min-width: 170px;
  padding: 12px 30px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #2f8b58, #57c786);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(56, 161, 105, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ai-demo-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(56, 161, 105, 0.34);
}

.ai-demo-modal-btn:active {
  transform: translateY(0);
}

body.ai-demo-modal-open {
  overflow: hidden;
}

@keyframes aiDemoOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes aiDemoModalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#ai-demo-modal-overlay.ai-demo-modal-out {
  animation: aiDemoOverlayOut 0.25s ease forwards;
}

#ai-demo-modal-overlay.ai-demo-modal-out .ai-demo-modal {
  animation: aiDemoModalOut 0.25s ease forwards;
}

@keyframes aiDemoOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes aiDemoModalOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(6px);
  }
}

@media (max-width: 640px) {
  .ai-demo-modal {
    width: 100%;
    max-width: 100%;
    padding: 34px 24px 28px;
    border-radius: 22px;
  }

  .ai-demo-modal h2 {
    font-size: 1.15rem;
  }

  .ai-demo-modal p {
    font-size: 0.92rem;
    max-width: 100%;
  }

  .ai-demo-modal-btn {
    width: 100%;
    min-width: 0;
  }
}
