:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211d;
  background: #f8fafc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f8fafc;
}

button,
a {
  font: inherit;
}

.topbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e7ece9;
  background: rgba(255, 255, 255, 0.94);
  padding: 0 5vw;
  backdrop-filter: blur(12px);
}

.brand,
.topbar-actions,
.my-chats-button {
  display: inline-flex;
  align-items: center;
}

.requests-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #526159;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.requests-button:hover {
  color: #0b7b5b;
}

.request-count {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 999px;
  background: #0b7b5b;
  padding: 0 0.25rem;
  color: #fff;
  font-size: 0.7rem;
}

.brand {
  gap: 0.65rem;
  color: #17211d;
  font-size: 1.1rem;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.7rem;
  background: #0b7b5b;
  color: white;
  font-size: 1rem;
}

.topbar-actions {
  gap: 1rem;
}

.welcome-name {
  max-width: 14rem;
  overflow: hidden;
  color: #64736c;
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-chats-button {
  min-height: 2.5rem;
  justify-content: center;
  border-radius: 0.65rem;
  background: #0b7b5b;
  padding: 0.55rem 1rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

.my-chats-button:hover {
  background: #08674c;
}

.logout-button {
  border: 0;
  background: transparent;
  padding: 0.5rem;
  color: #64736c;
  cursor: pointer;
  font-size: 0.875rem;
}

.logout-button:hover {
  color: #17211d;
}

.page {
  width: min(1160px, 100% - 2rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0 3rem;
}

.intro {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.discover-hero {
  position: relative;
  display: flex;
  min-height: clamp(300px, 36vw, 410px);
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #dcebe2;
  border-radius: 1.6rem;
  background:
    radial-gradient(ellipse at 82% 28%, rgba(196, 236, 214, 0.85), transparent 32%),
    linear-gradient(115deg, #f2faf5 0%, #e8f5ed 52%, #d9efe2 100%);
  padding: clamp(2rem, 6vw, 4.5rem);
  box-shadow: 0 18px 50px rgba(27, 77, 48, 0.08);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(620px, 68%);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: #0b7b5b;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.eyebrow-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #18a875;
  box-shadow: 0 0 0 4px rgba(24, 168, 117, 0.12);
}

.intro h1 {
  margin: 0;
  color: #17372a;
  font-size: clamp(2.5rem, 5.7vw, 4.4rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.intro h1 span {
  color: #12845e;
}

.intro-copy {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: #5d7467;
  font-size: clamp(0.92rem, 1.8vw, 1.06rem);
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  border: 1px solid #0b7b5b;
  border-radius: 0.75rem;
  background: #0b7b5b;
  padding: 0.65rem 1rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 680;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 123, 91, 0.2);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  background: #08674c;
  box-shadow: 0 11px 22px rgba(11, 123, 91, 0.24);
}

.hero-cta span {
  font-size: 1.05rem;
}

.hero-art {
  position: absolute;
  top: 50%;
  right: clamp(2rem, 8vw, 7rem);
  display: grid;
  width: clamp(180px, 26vw, 300px);
  aspect-ratio: 1;
  place-items: center;
  transform: translateY(-50%);
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(11, 123, 91, 0.15);
  border-radius: 50%;
}

.orbit-one {
  inset: 0;
}

.orbit-two {
  inset: 13%;
  border-style: dashed;
}

.orbit-three {
  inset: 27%;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 14px 50px rgba(28, 105, 68, 0.12);
}

.hero-people-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30%;
  background: linear-gradient(145deg, #fff, #e5f4eb);
  color: #0b7b5b;
  box-shadow: 0 12px 35px rgba(31, 91, 56, 0.15);
  transform: rotate(-8deg);
}

.hero-people-mark svg {
  width: 72%;
  transform: rotate(8deg);
}

.hero-float {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(225, 239, 230, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 0.8rem;
  color: #315341;
  font-size: 0.75rem;
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(29, 73, 47, 0.1);
}

.float-top {
  top: 14%;
  right: -4%;
}

.float-bottom {
  bottom: 13%;
  left: -6%;
}

.hero-glow {
  position: absolute;
  right: 20%;
  bottom: -52%;
  width: 30rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  filter: blur(28px);
  pointer-events: none;
}

.browse-section {
  scroll-margin-top: 1.5rem;
}

.tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 0.4rem;
  border: 1px solid #e6ece8;
  border-radius: 0.95rem;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 5px 18px rgba(20, 48, 32, 0.04);
}

.tab {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0.68rem;
  background: transparent;
  padding: 0.65rem 1rem;
  color: #718078;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.tab-icon {
  color: #8b9b91;
  font-size: 1rem;
  line-height: 1;
}

.tab.is-active {
  background: #eaf5ee;
  color: #0b7b5b;
  box-shadow: inset 0 0 0 1px #d7ebdf;
}

.tab.is-active .tab-icon {
  color: #0b7b5b;
}

.online-tab-icon {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #aab4ae;
}

.tab.is-active .online-tab-icon {
  background: #12a36f;
  box-shadow: 0 0 0 4px rgba(18, 163, 111, 0.12);
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1.1rem;
}

.results-heading h2 {
  margin: 0;
  color: #20392c;
  font-size: 1.3rem;
  font-weight: 730;
  letter-spacing: -0.03em;
}

.results-heading p {
  margin: 0.35rem 0 0;
  color: #718078;
  font-size: 0.84rem;
}

.result-count {
  border: 1px solid #e4ece7;
  border-radius: 999px;
  background: #fff;
  padding: 0.42rem 0.75rem;
  color: #607268;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.profile-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 160px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e3ebe6;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fff 0%, #fff 78%, #fbfdfb 100%);
  padding: 0.8rem;
  box-shadow: 0 6px 20px rgba(15, 40, 28, 0.045);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.profile-card:hover,
.profile-card:focus-visible {
  transform: translateY(-3px);
  border-color: #36c98a;
  box-shadow:
    0 0 0 1px rgba(54, 201, 138, 0.48),
    0 0 14px rgba(54, 201, 138, 0.3),
    0 10px 26px rgba(15, 60, 34, 0.1);
  outline: none;
}

.profile-card-top {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
}

.profile-avatar {
  position: relative;
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 0.78rem;
  background: linear-gradient(145deg, #e4f4e9, #cce9d8);
  color: #0b7b5b;
  font-size: 1.1rem;
  font-weight: 750;
  box-shadow: 0 0 0 1px #e3eee7, 0 5px 12px rgba(30, 76, 47, 0.09);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-identity {
  min-width: 0;
  flex: 1;
}

.profile-name {
  overflow: hidden;
  margin: 0;
  color: #20372b;
  font-size: 0.92rem;
  font-weight: 730;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-presence {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  color: #7b8982;
  font-size: 0.7rem;
}

.presence-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #aab4ae;
}

.presence-dot.is-online {
  background: #12a36f;
}

.profile-bio {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.4em;
  margin: 0.55rem 0 0.65rem;
  color: #697970;
  font-size: 0.77rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.profile-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  border-top: 1px solid #edf1ee;
  padding-top: 0.7rem;
}

.connection-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #718078;
  font-size: 0.7rem;
  font-weight: 580;
}

.open-chat-button {
  min-height: 2.1rem;
  border: 1px solid #0b7b5b;
  border-radius: 0.68rem;
  background: #0b7b5b;
  padding: 0.4rem 0.65rem;
  color: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
  transition: background 140ms ease, transform 140ms ease;
}

.open-chat-button:hover {
  transform: translateY(-1px);
  background: #08674c;
}

.status-message {
  margin: 1rem 0 0;
  border: 1px dashed #dce8e1;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 1rem;
  color: #718078;
  text-align: center;
}

.status-message.is-error {
  color: #b42318;
}

.load-more-button {
  display: block;
  min-width: 10rem;
  min-height: 2.8rem;
  margin: 1.75rem auto 0;
  border: 1px solid #d7e6dd;
  border-radius: 0.75rem;
  background: white;
  padding: 0.7rem 1.3rem;
  color: #315341;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 680;
  box-shadow: 0 5px 15px rgba(20, 48, 32, 0.045);
}

.load-more-button:hover {
  border-color: #0b7b5b;
}

.hidden {
  display: none !important;
}

.connection-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 2.25rem 0 0;
  color: #849188;
  font-size: 0.76rem;
  text-align: center;
}

.connection-note span {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border-radius: 50%;
  background: #e8f4ec;
  color: #0b7b5b;
  font-size: 0.68rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  .hero-art {
    right: 1.5rem;
    opacity: 0.6;
  }

  .hero-copy {
    width: 78%;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 1.25rem, 440px);
    padding-top: 1rem;
  }

  .discover-hero {
    min-height: 320px;
    align-items: flex-start;
    border-radius: 1.2rem;
    padding: 1.65rem 1.35rem;
  }

  .hero-copy {
    width: 100%;
  }

  .intro h1 {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
  }

  .intro-copy {
    max-width: 22rem;
    font-size: 0.9rem;
  }

  .hero-art {
    top: auto;
    right: 0.2rem;
    bottom: -2.4rem;
    width: 155px;
    opacity: 0.36;
    transform: none;
  }

  .hero-float {
    display: none;
  }

  .tabs {
    width: 100%;
    gap: 0.2rem;
    border-radius: 0.8rem;
    padding: 0.25rem;
  }

  .tab {
    min-height: 2.55rem;
    gap: 0.3rem;
    padding: 0.55rem 0.45rem;
    font-size: 0.72rem;
  }

  .results-heading {
    align-items: flex-start;
    margin-top: 1.5rem;
  }

  .results-heading h2 {
    font-size: 1.12rem;
  }

  .results-heading p {
    max-width: 17rem;
    line-height: 1.45;
  }

  .result-count {
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .profile-card {
    min-height: 145px;
    border-radius: 0.9rem;
    padding: 0.75rem;
  }

  .profile-avatar {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.72rem;
  }

  .profile-card-footer {
    padding-top: 0.55rem;
  }
}
