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

:root {
  color-scheme: light;
  --bg-start: #0f172a;
  --bg-end: #1f2937;
  --surface: #f8fafc;
  --surface-strong: #ffffff;
  --surface-muted: #eef2ff;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-soft: rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 20px 50px rgba(15, 23, 42, 0.18);
  --accent: #14b8a6;
  --accent-strong: #0ea5e9;
  --accent-dark: #0f766e;
  --accent-glow: rgba(20, 184, 166, 0.35);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: radial-gradient(
    circle at top,
    #1f2937 0%,
    #0b1120 45%,
    #020617 100%
  );
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
}

.screen {
  position: relative;
  width: 410px;
  min-height: 900px;
  background: linear-gradient(
    180deg,
    var(--surface) 0%,
    var(--surface-muted) 100%
  );
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  padding: 32px 0;
  gap: 20px;
}

.results-screen {
  min-height: auto;
}

.button-container {
  position: absolute;
  left: 50%;
  top: 520px;
  transform: translateX(-50%);
  z-index: 10;
}

.begin-button {
  width: 324px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-strong) 100%
  );
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  padding: 0;
  position: relative;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.28);
}

.begin-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.35);
}

.begin-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.25);
}

.button-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 600;
  font-size: 20px;
  color: #ffffff;
  text-align: center;
  line-height: normal;
  white-space: pre-wrap;
  letter-spacing: 0.3px;
}

.image-container {
  position: absolute;
  left: 50%;
  top: 140px;
  width: 360px;
  height: 360px;
  transform: translateX(-50%);
  pointer-events: none;
}

.travel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border-radius: 28px;
  filter: saturate(1.05) contrast(1.05);
}

/* ===== FORM PAGE STYLES ===== */
.form-field {
  width: 328px;
  margin: 0 auto;
  flex-shrink: 0;
}

.field-label {
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 10px;
  line-height: normal;
  white-space: pre-wrap;
}

.field-input {
  position: relative;
  width: 324px;
  height: 60px;
  background-color: var(--surface-strong);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.field-value {
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  text-align: center;
  line-height: normal;
  white-space: pre-wrap;
}

.field-value.editable {
  border: none;
  background: transparent;
  outline: none;
  width: 280px;
  text-align: center;
  font-family: inherit;
  color: var(--text-primary);
}

.field-value.editable:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 14px;
}

/* Travellers Counter */
.travellers-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.counter-button {
  position: relative;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.18));
}

.counter-button:hover {
  transform: scale(1.1);
}

.counter-button:active {
  transform: scale(0.95);
}

.counter-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.counter-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  line-height: 1;
  pointer-events: none;
}

.counter-button.minus {
  margin-left: 3px;
}

.counter-button.plus {
  margin-right: 3px;
}

/* Submit Button */
.submit-container {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: 328px;
  margin: 20px auto 0;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.submit-button {
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-strong) 100%
  );
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  padding: 0;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.3);
  width: 65%;
  align-self: center;
  margin: 30px 0;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.35);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.25);
}

/* ===== RESULTS PAGE STYLES ===== */
.results-screen {
  overflow-y: auto;
  padding-bottom: 32px;
  scrollbar-gutter: stable both-edges;
  display: flex;
  flex-direction: column;
  height: 844px;
}

.results-screen::-webkit-scrollbar {
  width: 8px;
}

.results-screen::-webkit-scrollbar-track {
  background: transparent;
}

.results-screen::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.results-title {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: 40px;
  color: var(--text-primary);
  line-height: normal;
  margin: 0;
  padding-top: 46px;
  width: fit-content;
}

.date-pills-container {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  width: fit-content;
  margin-top: 36px;
}

.date-pill {
  position: relative;
}

.pill-bg {
  background: linear-gradient(135deg, #e0f2fe 0%, #f1f5f9 100%);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  height: 40px;
  border: 1px solid var(--border-soft);
}

.date-pill:first-child .pill-bg {
  width: 169px;
}

.date-pill:last-child .pill-bg {
  width: 163px;
}

.pill-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.pill-text p {
  margin: 0;
}

.route-display {
  position: relative;
  left: 50%;
  width: 351px;
  height: 61px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #e0f2fe 0%, #f1f5f9 100%);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  margin-top: 20px;
}

.route-text {
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  text-align: center;
}

.route-text p {
  margin: 0;
}

.info-card {
  position: relative;
  left: 50%;
  width: 351px;
  transform: translateX(-50%);
  margin-top: 25px;
}

/* First card (Weather) gets extra top spacing */
.info-card:first-of-type {
  margin-top: 39px;
}

.card-title {
  font-weight: 600;
  font-size: 24px;
  color: var(--text-primary);
  text-align: center;
  margin: 0 0 10px 0;
  line-height: normal;
}

.card-content {
  background-color: var(--surface-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border-soft);
}

.card-content.tall {
  min-height: 137px;
}

.card-content:not(.tall) {
  min-height: 87px;
}

.card-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: normal;
  margin: 0;
}

.card-text p {
  line-height: 1.4;
  margin: 0;
}

.card-button-container {
  margin-top: 14px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.book-button {
  width: 100%;
  max-width: 309px;
  height: 47px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-strong) 100%
  );
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(20, 184, 166, 0.25);
}

.book-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(20, 184, 166, 0.32);
}

.book-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(20, 184, 166, 0.2);
}

.book-button .button-text {
  font-size: 18px;
}

.book-button.booked {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  cursor: default;
  opacity: 0.9;
}

.book-button.booked:hover {
  transform: none;
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.25);
}

/* Start Again Button */
.start-again-container {
  position: relative;
  left: 50%;
  width: 324px;
  transform: translateX(-50%);
  padding: 32px 0;
  margin-top: 24px;
}

.start-again-button {
  width: 100%;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-strong) 100%
  );
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.25);
}

.start-again-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(14, 165, 233, 0.3);
}

.start-again-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(14, 165, 233, 0.22);
}

.start-again-button .button-text {
  font-size: 20px;
}

/* Responsive adjustments */
@media (max-width: 430px) {
  body {
    align-items: flex-start;
    min-height: 100vh;
    height: 100%;
  }

  .container {
    padding: 0;
    width: 100%;
    min-height: 100vh;
    align-items: flex-start;
  }

  .screen {
    width: 100vw;
    min-height: 100vh;
    height: auto;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow-y: auto;
  }

  .screen:not(.results-screen) {
    min-height: 100vh;
  }

  .begin-button {
    max-width: 324px;
  }

  .image-container {
    width: 90%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 1;
    top: 80px;
  }

  .form-field {
    width: 90%;
    max-width: 328px;
  }

  .field-input {
    width: 100%;
  }

  .submit-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 328px;
    top: 800px;
  }

  .submit-button-container {
    width: 90%;
    max-width: 328px;
    padding: 0;
  }

  .results-container {
    padding: 20px;
  }

  .recommendation-item {
    width: 100%;
  }

  .info-card {
    width: 90%;
    max-width: 351px;
  }

  .card-content {
    width: 100%;
    padding: 20px;
  }

  .card-button-container {
    margin-top: 14px;
  }

  .book-button {
    width: 100%;
    max-width: 100%;
  }

  .start-again-button {
    width: 100%;
    max-width: 328px;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 430px) {
    .screen {
      min-height: -webkit-fill-available;
    }
  }
}
