:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #152238;
  --muted: #62708a;
  --line: #dfe6f4;
  --primary: #0a5bff;
  --primary-deep: #0b2f7f;
  --accent: #13c1a3;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-soft: 0 14px 40px rgba(13, 35, 75, 0.1);
  --shadow-strong: 0 18px 45px rgba(10, 42, 100, 0.18);
}

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

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, #ffffff 0, #f2f4f8 42%),
    radial-gradient(circle at 92% 20%, #e7efff 0, transparent 45%),
    linear-gradient(160deg, #f2f4f8 0, #eef3ff 100%);
  line-height: 1.45;
  transition: background 0.25s ease, color 0.25s ease;
  position: relative;
}

body.theme-fade {
  animation: theme-fade 0.45s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 9998;
  background:
    radial-gradient(circle at 20% 30%, rgba(119, 153, 255, 0.24), transparent 45%),
    radial-gradient(circle at 82% 70%, rgba(165, 106, 255, 0.2), transparent 48%),
    linear-gradient(165deg, #0a1430 0%, #102450 52%, #0b1838 100%);
  filter: blur(0px) saturate(100%);
}

body.page-exit-search::after {
  animation: page-exit-overlay 0.48s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}

body.page-exit-search .navbar,
body.page-exit-search main {
  animation: page-exit-content 0.46s cubic-bezier(0.2, 0.78, 0.3, 1) forwards;
}

@keyframes theme-fade {
  0% {
    opacity: 1;
  }
  45% {
    opacity: 0.72;
  }
  100% {
    opacity: 1;
  }
}

@keyframes page-exit-overlay {
  0% {
    opacity: 0;
    transform: scale(1);
    filter: blur(0px) saturate(100%);
  }
  100% {
    opacity: 0.92;
    transform: scale(1.08);
    filter: blur(8px) saturate(120%);
  }
}

@keyframes page-exit-content {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(1.05);
    filter: blur(8px);
  }
}

.container {
  width: min(1380px, 97vw);
  margin: 0 auto;
}

.navbar {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #071b42;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-animated {
  display: inline-flex;
}

.brand-char {
  display: inline-block;
  will-change: transform, filter, opacity;
}

.brand-bubble {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: url("assets/flatbuddy-logo.png") center/cover no-repeat;
  box-shadow: 0 10px 20px rgba(10, 91, 255, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
}

.btn {
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary);
  border: 1px solid rgba(10, 91, 255, 0.35);
  backdrop-filter: blur(8px);
}

.btn-primary {
  background: linear-gradient(130deg, #0a5bff, #0d78ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 91, 255, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
}

.theme-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(10, 91, 255, 0.25);
  background: rgba(255, 255, 255, 0.78);
  color: #0a2f75;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(8px);
}

.theme-icon {
  position: absolute;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.theme-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.theme-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body[data-theme="light"] .theme-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body[data-theme="light"] .theme-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.theme-toggle.is-rotating {
  animation: theme-spin 0.45s ease;
}

@keyframes theme-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(180deg);
  }
}

.nav-offer-btn {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding-inline: 26px;
  font-size: 1.05rem;
}

.profile-wrap {
  position: relative;
}

.profile-btn {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(112, 147, 245, 0.55);
  background: linear-gradient(135deg, #4d38ff, #2e5dff);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 10px 22px rgba(52, 70, 216, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.avatar-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  background-size: cover;
  background-position: center;
}

.avatar-icon.has-photo {
  background-color: #1a2944;
}

.profile-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.profile-caret {
  color: rgba(237, 243, 255, 0.92);
  font-size: 0.85rem;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 240px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: grid;
  gap: 10px;
  z-index: 12;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.3s cubic-bezier(0.22, 0.8, 0.3, 1),
    transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1),
    visibility 0s linear 0.3s;
}

.profile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0.08s, 0.08s, 0s;
}

.profile-menu a {
  text-decoration: none;
  color: #15213c;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(167, 183, 218, 0.5);
  box-shadow: 0 8px 18px rgba(10, 28, 66, 0.15);
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
}

.profile-menu a:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.profile-menu.open a {
  animation: dropdown-reveal 0.34s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.profile-menu.open a:nth-child(1) { animation-delay: 0.02s; }
.profile-menu.open a:nth-child(2) { animation-delay: 0.08s; }
.profile-menu.open a:nth-child(3) { animation-delay: 0.14s; }
.profile-menu.open a:nth-child(4) { animation-delay: 0.2s; }
.profile-menu.open a:nth-child(5) { animation-delay: 0.26s; }

@keyframes dropdown-reveal {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero {
  margin-top: 8px;
  padding: 104px 30px 138px;
  min-height: 640px;
  border: 1px solid rgba(120, 152, 225, 0.22);
  border-radius: 34px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 16% 22%, rgba(109, 157, 255, 0.22), transparent 42%),
    radial-gradient(circle at 85% 18%, rgba(255, 208, 133, 0.24), transparent 40%),
    radial-gradient(circle at 55% 84%, rgba(132, 162, 255, 0.2), transparent 45%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.7), rgba(243, 247, 255, 0.68));
  box-shadow: 0 20px 46px rgba(12, 34, 75, 0.12);
}

.hero-liquid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  left: -240px;
  bottom: -280px;
  background: radial-gradient(circle, rgba(150, 167, 255, 0.28), transparent 65%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  right: -220px;
  top: -250px;
  background: radial-gradient(circle, rgba(255, 234, 180, 0.24), transparent 62%);
  pointer-events: none;
  z-index: 1;
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 20px auto 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.3rem, 7.2vw, 5.8rem);
  line-height: 0.97;
  letter-spacing: -0.045em;
  max-width: 12.5ch;
}

#heroTyping {
  display: inline-block;
  position: relative;
}

#heroTyping::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 6px;
  background: currentColor;
  opacity: 0.8;
  animation: caret-blink 0.85s steps(1) infinite;
  vertical-align: -0.08em;
}

#heroTyping.typing-done::after {
  opacity: 0.45;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.hero p {
  margin: 18px auto 0;
  color: #44587a;
  max-width: 50ch;
  font-size: 1.28rem;
  line-height: 1.38;
}

.search-bar {
  margin: 0;
  padding: 10px;
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(236, 245, 255, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr auto;
  gap: 8px;
  box-shadow:
    0 20px 38px rgba(30, 65, 138, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(130, 168, 244, 0.22);
  backdrop-filter: blur(24px) saturate(150%);
  width: min(980px, calc(100% - 56px));
  max-width: none;
  text-align: left;
  overflow: hidden;
  z-index: 3;
}

.search-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.5), transparent 35%),
    radial-gradient(circle at 78% 88%, rgba(104, 169, 255, 0.22), transparent 42%);
  pointer-events: none;
}

.field {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.64), rgba(236, 244, 255, 0.32));
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 62px;
  justify-content: center;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(14px) saturate(135%);
}

.field label {
  font-size: 0.68rem;
  color: #6a7da0;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

.field input,
.field select {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  width: 100%;
}

.field input[type="date"] {
  color-scheme: light;
  padding-right: 8px;
}

.field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 10px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(10, 91, 255, 0.14), rgba(74, 128, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(10, 91, 255, 0.18);
}

.search-btn {
  border: none;
  border-radius: 14px;
  padding: 0 24px;
  min-height: 62px;
  background:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.34), transparent 42%),
    linear-gradient(135deg, #1f6fff, #1d5cff 45%, #3e8cff);
  color: white;
  font-family: inherit;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 14px 24px rgba(19, 88, 237, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(17, 87, 236, 0.36);
}

.search-btn:active {
  transform: translateY(0);
}

.features {
  margin: 54px 0 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 1200px;
}

.feature {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.36), transparent 32%),
    linear-gradient(145deg, #264fcf 0%, #5e44d4 48%, #7b4ebf 100%);
  border: 1px solid rgba(124, 146, 219, 0.28);
  border-radius: 22px;
  padding: 24px;
  box-shadow:
    0 16px 36px rgba(17, 37, 89, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.35s ease;
}

.feature::before,
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.35s ease;
}

.feature::before {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 34%, transparent 66%, rgba(255, 255, 255, 0.12));
  opacity: 0.6;
}

.feature::after {
  background: radial-gradient(circle at 80% 18%, rgba(255, 199, 121, 0.34), transparent 30%);
  opacity: 0.9;
}

.feature:hover {
  transform: rotateY(8deg) rotateX(5deg) translateY(-4px);
  box-shadow:
    0 26px 46px rgba(16, 38, 95, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.feature:hover::before {
  transform: translateX(-22%);
}

.feature:hover::after {
  transform: translateX(14%);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.feature-icon-core,
.feature-icon-ring {
  position: absolute;
  inset: 0;
}

.feature-icon-core {
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
  animation: icon-pulse 2.2s ease-in-out infinite;
}

.feature-icon-ring {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  transform: scale(0.45);
  animation: icon-ring 2.2s ease-out infinite;
}

.feature-icon-home .feature-icon-core {
  border-radius: 5px;
  transform: rotate(45deg);
}

.feature-icon-afford .feature-icon-core {
  width: 6px;
  height: 20px;
  border-radius: 999px;
}

.feature-icon-match .feature-icon-core {
  width: 20px;
  height: 12px;
  border-radius: 999px;
}

.feature-icon-match .feature-icon-ring {
  border-style: dashed;
  animation-duration: 2.8s;
}

@keyframes icon-pulse {
  0%, 100% {
    transform: scale(0.82);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes icon-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.feature h3 {
  font-family: "Sora", sans-serif;
  margin-bottom: 7px;
  font-size: 1.2rem;
  color: #f3f7ff;
  position: relative;
  z-index: 1;
}

.feature p {
  color: rgba(234, 242, 255, 0.9);
  position: relative;
  z-index: 1;
}

.listing-preview {
  margin: 12px 0 42px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-head a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.room-card {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(138, 163, 212, 0.24);
  box-shadow: var(--shadow-soft);
}

.room-thumb {
  height: 130px;
  background: linear-gradient(135deg, #0f3b87, #0c6dff);
  position: relative;
  overflow: hidden;
}

.room-thumb.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.room-thumb-track {
  position: absolute;
  inset: 0;
}

.room-thumb-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.room-thumb-slide.active {
  opacity: 1;
  transform: scale(1);
}

.room-thumb-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.room-thumb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(232, 240, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.room-thumb-dot.active {
  background: #ffffff;
  transform: scale(1.15);
}

.room-thumb.alt {
  background: linear-gradient(135deg, #0a4c9d, #12a4e4);
}

.room-thumb.warm {
  background: linear-gradient(135deg, #11417f, #15757f);
}

.room-content {
  padding: 14px;
}

.room-content h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.03rem;
}

.room-content p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.92rem;
}

.room-meta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.room-meta span:first-child {
  color: var(--primary-deep);
}

.room-meta span:last-child {
  color: #237e65;
}

.list-section {
  background:
    linear-gradient(145deg, rgba(6, 23, 58, 0.97), rgba(10, 59, 150, 0.97)),
    radial-gradient(circle at 18% 20%, rgba(37, 162, 140, 0.26), transparent 45%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 52px 36px;
  margin-bottom: 54px;
  text-align: center;
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(182, 207, 255, 0.18);
}

.list-section h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.list-section p {
  margin: 14px auto 24px;
  max-width: 68ch;
  color: #d8e8ff;
}

.list-section .btn-primary {
  background: #fff;
  color: #0a3d99;
  box-shadow: none;
  padding-inline: 28px;
}

body[data-theme="dark"] {
  --bg: #0b1326;
  --surface: #121d34;
  --surface-soft: #172542;
  --text: #e5ecff;
  --muted: #a8b4d0;
  --line: #2b3a5c;
  --primary: #69a0ff;
  --primary-deep: #c9dcff;
  --shadow-soft: 0 14px 40px rgba(2, 6, 17, 0.4);
  --shadow-strong: 0 18px 45px rgba(2, 8, 24, 0.5);
  background:
    radial-gradient(circle at 8% 12%, #17284a 0, #0b1326 42%),
    radial-gradient(circle at 92% 20%, #1a2f56 0, transparent 45%),
    linear-gradient(160deg, #0b1326 0, #111b33 100%);
}

body[data-theme="dark"] .brand {
  color: #dbe7ff;
}

body[data-theme="dark"] .btn-outline,
body[data-theme="dark"] .theme-toggle {
  background: rgba(18, 29, 52, 0.8);
  border-color: rgba(130, 164, 255, 0.28);
  color: #cddfff;
}

body[data-theme="dark"] .nav-offer-btn {
  border-color: #6f9eff;
  color: #d7e5ff;
}

body[data-theme="dark"] .profile-btn {
  background: linear-gradient(135deg, #4d38ff, #2f63ff);
  border-color: rgba(126, 157, 255, 0.56);
}

body[data-theme="dark"] .profile-label {
  color: #eff5ff;
}

body[data-theme="dark"] .profile-caret {
  color: rgba(230, 239, 255, 0.9);
}

body[data-theme="dark"] .profile-menu {
  background: transparent;
  border: none;
}

body[data-theme="dark"] .profile-menu a {
  color: #15213c;
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(188, 201, 231, 0.55);
}

body[data-theme="dark"] .profile-menu a:hover {
  background: #ffffff;
  color: #111a31;
}

body[data-theme="dark"] .search-bar,
body[data-theme="dark"] .room-card {
  background: linear-gradient(145deg, rgba(18, 31, 56, 0.7), rgba(19, 36, 67, 0.44));
  border-color: rgba(120, 152, 225, 0.22);
}

body[data-theme="dark"] .field label {
  color: #9fb1d6;
}

body[data-theme="dark"] .hero {
  border-color: rgba(120, 152, 225, 0.24);
  background:
    radial-gradient(circle at 16% 22%, rgba(71, 116, 214, 0.38), transparent 42%),
    radial-gradient(circle at 85% 18%, rgba(180, 142, 82, 0.28), transparent 40%),
    radial-gradient(circle at 55% 84%, rgba(74, 114, 219, 0.3), transparent 45%),
    linear-gradient(160deg, rgba(18, 31, 56, 0.9), rgba(16, 29, 52, 0.88));
}

body[data-theme="dark"] .hero p {
  color: #b8c9ea;
}

body[data-theme="dark"] .field input,
body[data-theme="dark"] .field select,
body[data-theme="dark"] .section-head a,
body[data-theme="dark"] .room-meta span:first-child {
  color: #d7e5ff;
}

body[data-theme="dark"] .field input[type="date"] {
  color-scheme: dark;
}

body[data-theme="dark"] .field input[type="date"]::-webkit-calendar-picker-indicator {
  background: linear-gradient(135deg, rgba(97, 142, 255, 0.3), rgba(63, 121, 255, 0.14));
  box-shadow: inset 0 0 0 1px rgba(120, 162, 255, 0.34);
  filter: brightness(1.15);
}

body[data-theme="dark"] .field {
  background: linear-gradient(145deg, rgba(18, 34, 62, 0.62), rgba(20, 39, 73, 0.32));
  border-color: rgba(133, 166, 236, 0.28);
}

body[data-theme="dark"] .feature-icon {
  background: rgba(104, 143, 226, 0.16);
  border-color: rgba(147, 179, 242, 0.22);
}

body[data-theme="dark"] .feature {
  background:
    radial-gradient(circle at 15% 10%, rgba(120, 156, 241, 0.26), transparent 34%),
    linear-gradient(145deg, #0f264e 0%, #123575 48%, #234f9a 100%);
  border-color: rgba(110, 143, 220, 0.34);
  box-shadow:
    0 18px 36px rgba(2, 10, 31, 0.56),
    inset 0 1px 0 rgba(154, 180, 245, 0.12);
}

body[data-theme="dark"] .feature h3 {
  color: #edf3ff;
}

body[data-theme="dark"] .feature p {
  color: rgba(205, 221, 251, 0.92);
}

body[data-theme="dark"] .room-thumb {
  background: linear-gradient(135deg, #234584, #2f6dd7);
}

body[data-theme="dark"] .room-thumb-dot {
  background: rgba(219, 229, 255, 0.38);
}

body[data-theme="dark"] .room-thumb-dot.active {
  background: #ffffff;
}

body[data-theme="dark"] .room-thumb.alt {
  background: linear-gradient(135deg, #28508c, #2786c0);
}

body[data-theme="dark"] .room-thumb.warm {
  background: linear-gradient(135deg, #23557d, #217782);
}

@media (max-width: 1024px) {
  .hero {
    padding: 84px 20px 126px;
    min-height: 560px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 4rem);
    max-width: 13.5ch;
  }

  .hero p {
    font-size: 1.08rem;
  }

  .search-bar {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    width: calc(100% - 36px);
    bottom: 18px;
  }

  .search-btn {
    grid-column: span 2;
    min-height: 54px;
  }

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


@media (max-width: 900px) {
  .navbar {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 12px;
  }

  .brand {
    font-size: clamp(1.78rem, 4.7vw, 2rem);
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .theme-toggle {
    width: 46px;
    height: 46px;
  }

  .nav-offer-btn {
    min-height: 46px;
    padding-inline: 20px;
    font-size: 0.98rem;
  }

  .profile-btn {
    min-height: 46px;
    padding: 6px 14px 6px 9px;
  }

  .avatar-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 62px 14px 22px;
    min-height: 520px;
  }

  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    font-size: clamp(1.8rem, 8.5vw, 2.25rem);
    gap: 12px;
  }

  .brand-bubble {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 50px 1fr;
    grid-template-areas:
      "theme offer"
      "account account";
    align-items: center;
    justify-content: stretch;
    gap: 10px;
  }

  .theme-toggle {
    grid-area: theme;
    width: 50px;
    height: 50px;
    justify-self: start;
  }

  .nav-offer-btn {
    grid-area: offer;
    width: 100%;
    min-height: 50px;
    padding-inline: 16px;
    font-size: 1rem;
  }

  .profile-wrap {
    grid-area: account;
    width: 100%;
  }

  .profile-btn {
    width: 100%;
    justify-content: space-between;
    min-height: 52px;
    padding: 8px 14px 8px 10px;
  }

  .profile-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .profile-menu a {
    text-align: center;
  }

  .search-bar {
    grid-template-columns: 1fr;
    border-radius: 18px;
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    margin-top: 22px;
  }

  .field {
    min-height: 58px;
  }

  .search-btn {
    grid-column: auto;
    min-height: 52px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-section {
    padding: 40px 20px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(1380px, 95vw);
  }

  .brand {
    font-size: 1.62rem;
  }

  .profile-label {
    font-size: 0.88rem;
  }

  .nav-offer-btn {
    font-size: 0.94rem;
  }
}
