* {
  box-sizing: border-box;
}

:root {
  --bg: #eaf5ff;
  --card: #cfe8fb;
  --card-border: #abd2f0;
  --text: #12213d;
  --muted: #6e7f97;
  --primary: #1554df;
  --primary-dark: #0b3fbf;
  --green: #0ac67a;
  --orange: #f05f49;
  --pink: #e95a73;
  --shadow: 0 8px 22px rgba(39, 104, 157, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 22rem),
    linear-gradient(180deg, #f0f8ff 0%, #dcefff 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef8ff 0%, #d8edff 100%);
  box-shadow: 0 0 40px rgba(27, 81, 132, .12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px 15px;
  background: rgba(238, 248, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 113, 160, .14);
}

.brand {
  line-height: 1;
}

.brand-title {
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -1.2px;
}

.brand-title span:first-child {
  color: #366bd6;
}

.brand-title span:last-child {
  color: #dc6683;
}

.brand-chat {
  margin-top: 5px;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 900;
  color: #6a54bc;
}

.brand-chat i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  background: #f05f49;
  border-radius: 50%;
}

.brand small {
  display: block;
  margin-top: 7px;
  color: #7185a3;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.online-pill {
  white-space: nowrap;
  background: #160d2f;
  color: white;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: .71rem;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(22, 13, 47, .15);
}

.online-pill strong {
  color: #ffca22;
}

.online-dot,
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(10, 198, 122, .12);
}

.earn-btn {
  border: 0;
  min-width: 72px;
  min-height: 54px;
  padding: 8px 13px;
  border-radius: 22px;
  color: white;
  font-size: .76rem;
  font-weight: 900;
  background: linear-gradient(145deg, #ed634e, #e74c3c);
  box-shadow: 0 7px 12px rgba(219, 76, 54, .25);
}

main {
  padding: 0 16px 32px;
}

.intro {
  display: flex;
  gap: 12px;
  padding: 21px 4px 14px;
}

.section-icon {
  font-size: 1.5rem;
  padding-top: 2px;
}

.intro h1 {
  margin: 0;
  font-size: clamp(1.1rem, 4.4vw, 1.55rem);
  line-height: 1.16;
  letter-spacing: -.5px;
}

.intro p {
  margin: 10px 0 0;
  color: #5d708c;
  font-size: .84rem;
  line-height: 1.55;
}

.underline {
  width: 43px;
  height: 4px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--primary);
}

.profiles {
  display: grid;
  gap: 14px;
}

.profile-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  min-height: 120px;
  border-radius: 24px;
  background: rgba(199, 229, 251, .78);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(39, 104, 157, 0.17);
}

.avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(34, 80, 122, .15);
}

.avatar-wrap span {
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--green);
}

.profile-info {
  min-width: 0;
}

.profile-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.profile-head .meta {
  color: #647894;
  font-size: .76rem;
  white-space: nowrap;
}

.activity {
  margin: 8px 0 10px;
  font-size: .79rem;
  font-style: italic;
  color: #647894;
}

.activity.typing {
  color: #00a878;
  font-style: normal;
}

.price {
  margin: 0;
  font-size: .74rem;
  font-weight: 700;
  color: #31506f;
}

.price strong {
  color: #1260ce;
}

.price .tzs {
  color: #ec655d;
}

.chat-btn {
  border: 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2869eb 0%, #124fd6 100%);
  color: white;
  font-size: .77rem;
  font-weight: 900;
  box-shadow: 0 6px 12px rgba(18, 79, 214, .22);
  white-space: nowrap;
}

.chat-btn:active {
  transform: scale(.98);
}

.payout-section {
  margin-top: 30px;
}

.payout-section h2 {
  margin: 0 4px 12px;
  font-size: .76rem;
  color: #3e4d67;
  letter-spacing: .25px;
}

.payout-ticker {
  overflow: hidden;
  border-radius: 18px;
  background: #17172b;
  box-shadow: 0 10px 18px rgba(16, 18, 41, .18);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 23s linear infinite;
}

.payout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
  padding: 15px 18px;
  color: white;
}

.payout-item span {
  color: #19e48e;
  font-weight: 900;
}

.payout-item small {
  color: #9fa5bb;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 18, 35, .54);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.chat-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: min(100%, 360px);
  padding: 34px 24px 24px;
  text-align: center;
  border-radius: 28px;
  background: white;
  box-shadow: 0 24px 60px rgba(0,0,0,.24);
  transform: translateY(15px) scale(.98);
  transition: transform .2s ease;
}

.chat-modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #edf4fb;
  font-size: 1.5rem;
  color: #34465f;
}

.modal-avatar-wrap {
  position: relative;
  width: 94px;
  height: 94px;
  margin: 0 auto 14px;
}

.modal-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #e5f2ff;
}

.modal-avatar-wrap span {
  position: absolute;
  right: 3px;
  bottom: 5px;
  width: 20px;
  height: 20px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--green);
}

.modal-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-card p {
  margin: 7px 0 20px;
  color: var(--muted);
}

.primary-modal-btn,
.secondary-modal-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px;
  font-weight: 800;
}

.primary-modal-btn {
  color: white;
  background: var(--primary);
}

.secondary-modal-btn {
  margin-top: 9px;
  color: #42546d;
  background: #edf3f9;
}

@media (max-width: 560px) {
  .topbar {
    padding: 14px 15px 12px;
  }

  .online-pill {
    padding: 8px 10px;
    font-size: .64rem;
  }

  .earn-btn {
    min-width: 64px;
    min-height: 50px;
  }

  main {
    padding-inline: 12px;
  }

  .profile-card {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 12px;
    min-height: 108px;
    border-radius: 22px;
  }

  .avatar-wrap {
    width: 62px;
    height: 62px;
  }

  .chat-btn {
    padding: 11px 13px;
    font-size: .71rem;
  }

  .profile-head h3 {
    font-size: .92rem;
  }

  .profile-head .meta,
  .activity,
  .price {
    font-size: .69rem;
  }
}

@media (max-width: 390px) {
  .brand small {
    display: none;
  }

  .online-pill {
    display: none;
  }

  .profile-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .avatar-wrap {
    width: 56px;
    height: 56px;
  }

  .chat-btn {
    grid-column: 2;
    justify-self: start;
    margin-top: -4px;
  }
}
