:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --panel: #161616;
  --panel-2: #1f1f1f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #9ca3af;
  --gold: #ffc83d;
  --orange: #f59e0b;
  --pink: #f06292;
  --gradient: linear-gradient(90deg, #ffc83d 0%, #ff9f43 45%, #f06292 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
  padding: 18px 18px 28px;
}

.landing-page {
  width: min(480px, 100%);
  margin: 0 auto;
  padding-bottom: 110px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar.compact {
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand.small .brand-name {
  font-size: 18px;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #ff5f6d, #ffc371);
  font-size: 18px;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
}

.brand-name span {
  color: var(--orange);
}

.lang-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.lang {
  min-width: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.lang.active {
  color: #111;
  background: var(--gold);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.mini-stats article {
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
}

.mini-stats strong {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 15px;
}

.mini-stats span {
  color: var(--muted);
  font-size: 11px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.featured-photo {
  height: 220px;
  background-size: cover;
  background-position: center;
}

.featured-body {
  padding: 16px 18px 18px;
}

.featured-body h2 {
  margin: 8px 0 4px;
  font-size: 26px;
}

.featured-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.heart-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #111;
  background: var(--gold);
  box-shadow: 0 8px 24px rgba(255, 200, 61, 0.35);
  font-size: 20px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tag-gold {
  color: #111;
  background: var(--gold);
}

.tag-green {
  color: #111;
  background: #6ee7a8;
}

.feed-section {
  margin-bottom: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head.spread {
  justify-content: space-between;
}

.section-head h3 {
  margin: 0;
  font-size: 20px;
}

.profile-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.profile-row::-webkit-scrollbar {
  display: none;
}

.profile-card {
  flex: 0 0 132px;
  cursor: pointer;
}

.profile-photo,
.people-photo {
  height: 168px;
  margin-bottom: 8px;
  border-radius: 18px;
  background-size: cover;
  background-position: center top;
}

.profile-card strong,
.people-card strong {
  display: block;
  font-size: 14px;
}

.profile-card span,
.people-card span {
  color: var(--muted);
  font-size: 12px;
}

.features-block {
  margin-bottom: 24px;
}

.features-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.features-grid article {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.feature-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(255, 200, 61, 0.12);
  font-size: 18px;
}

.features-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.features-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.people-card {
  cursor: pointer;
}

.people-photo {
  height: 190px;
}

.outline-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255, 200, 61, 0.45);
  border-radius: 999px;
  color: var(--gold);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.landing-cta {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.94);
  backdrop-filter: blur(12px);
}

.landing-cta .cta {
  width: 100%;
  min-width: 0;
}

.cta-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.ph-malika { background-image: url("/avatars/malika.jpg"); }
.ph-nigora { background-image: url("/avatars/nigora.jpg"); }
.ph-farzona { background-image: url("/avatars/farzona.jpg"); }
.ph-mohira { background-image: url("/avatars/mohira.jpg"); }
.ph-anzhela { background-image: url("/avatars/anzhela.jpg"); }
.ph-nilufar { background-image: url("/avatars/nilufar.jpg"); }
.ph-alina { background-image: url("/avatars/alina.jpg"); }
.ph-madina { background-image: url("/avatars/madina.jpg"); }
.ph-parvina { background-image: url("/avatars/parvina.jpg"); }
.ph-aziz { background-image: url("/avatars/aziz.jpg"); }
.ph-jamshed { background-image: url("/avatars/jamshed.jpg"); }
.ph-ruslan { background-image: url("/avatars/ruslan.jpg"); }
.ph-orif { background-image: url("/avatars/orif.jpg"); }
.ph-bakhtiyor { background-image: url("/avatars/bakhtiyor.jpg"); }
.ph-daler { background-image: url("/avatars/daler.jpg"); }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cards {
  position: relative;
  width: min(320px, 100%);
  height: 210px;
  margin-bottom: 18px;
}

.card-photo {
  position: absolute;
  top: 18px;
  width: 118px;
  height: 168px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, #3b2a45, #1b1b1f);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card-photo.p1 {
  left: 50%;
  z-index: 3;
  transform: translateX(-50%) rotate(-2deg);
}

.card-photo.p2 {
  left: 18px;
  z-index: 1;
  transform: rotate(-14deg);
  opacity: 0.75;
}

.card-photo.p3 {
  right: 18px;
  z-index: 2;
  transform: rotate(12deg);
  opacity: 0.85;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #111;
  background: var(--gold);
  box-shadow: 0 0 28px rgba(255, 200, 61, 0.35);
  font-size: 13px;
  font-weight: 800;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.05;
}

.gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  max-width: 360px;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.cta {
  min-width: min(100%, 320px);
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  color: #111;
  background: var(--gold);
  box-shadow: 0 10px 30px rgba(255, 200, 61, 0.28);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cta.full {
  width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(420px, 100%);
  margin-top: 28px;
}

.stats article {
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 24px;
}

.stats span {
  color: var(--muted);
  font-size: 12px;
}

.back {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 200, 61, 0.12);
  font-size: 22px;
}

.auth-panel {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hint {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel-2);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(255, 200, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.12);
}

.code-input {
  text-align: center;
  font-size: 28px;
  letter-spacing: 0.28em;
}

.status {
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.status.ok {
  color: #6ee7a8;
}

.status.bad {
  color: #fca5a5;
}

.messenger {
  display: grid;
  grid-template-rows: 64px 1fr;
  height: 100vh;
  background: var(--bg);
}

.messenger-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: var(--gold);
  font-weight: 800;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-meta strong,
.user-meta span {
  display: block;
}

.user-meta span {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--gold);
  background: var(--panel-2);
}

.messenger-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 0;
}

.sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.sidebar input {
  margin: 12px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-2);
}

.dialog-list {
  overflow-y: auto;
}

.dialog {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.dialog:hover,
.dialog.active {
  background: rgba(255, 200, 61, 0.08);
}

.dialog-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: var(--gradient);
  font-weight: 800;
}

.dialog-main {
  min-width: 0;
  flex: 1;
}

.dialog-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dialog-title,
.dialog-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-title {
  font-weight: 700;
}

.dialog-preview,
.dialog-time {
  color: var(--muted);
  font-size: 12px;
}

.dialog-preview {
  margin-top: 5px;
}

.chat-pane {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.04) 1px, transparent 1.5px) 0 0 / 24px 24px,
    #111;
}

.chat-top {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.chat-top strong,
.chat-top span {
  display: block;
}

.chat-top span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.messages {
  display: flex;
  overflow-y: auto;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.message {
  align-self: flex-start;
  max-width: min(78%, 560px);
  padding: 10px 12px;
  border-radius: 16px 16px 16px 6px;
  background: var(--panel);
  white-space: pre-wrap;
  word-break: break-word;
}

.message.out {
  align-self: flex-end;
  border-radius: 16px 16px 6px;
  background: rgba(255, 200, 61, 0.18);
}

.message-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.composer {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.composer textarea {
  min-height: 44px;
  max-height: 120px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel-2);
  resize: vertical;
}

.composer button {
  border: 0;
  border-radius: 50%;
  color: #111;
  background: var(--gold);
}

.empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .messenger-body {
    grid-template-columns: 1fr;
  }

  .chat-pane {
    display: none;
  }

  .messenger.chat-open .sidebar {
    display: none;
  }

  .messenger.chat-open .chat-pane {
    display: grid;
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 14px 14px 24px;
  }
}
