:root {
  --blush-1: #fff6f8;
  --blush-2: #fdeaf0;
  --rose: #c2185b;
  --rose-deep: #9c144a;
  --rose-light: #f06292;
  --gold: #c9a24b;
  --gold-light: #e6c78a;
  --plum: #3a2530;
  --muted: #a98a97;
  --card: #ffffff;
  --line: #f3dbe4;
  --ok: #1f9d5b;
  --err: #d64545;
  --shadow: 0 10px 34px rgba(156, 20, 74, 0.13);
  --shadow-sm: 0 4px 14px rgba(156, 20, 74, 0.10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  color: var(--plum);
  background: linear-gradient(170deg, var(--blush-1), var(--blush-2));
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: 'Playfair Display', Georgia, serif; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.gold-text { color: var(--gold); }

/* Loader */
.loader { flex: 1; display: flex; align-items: center; justify-content: center; }
.heart { font-size: 44px; animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.18);} }

/* Buttons */
.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--rose-light), var(--rose));
  color: #fff; font-family: 'Manrope'; font-weight: 700; font-size: 16px;
  padding: 16px; border-radius: 16px; box-shadow: var(--shadow-sm);
  transition: transform .08s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost {
  background: #fff; color: var(--rose); border: 1.5px solid var(--line);
  box-shadow: none; font-weight: 600;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #4a3a12; }

/* Inputs */
.field { margin: 14px 0; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding-left: 4px; }
.input, textarea, select {
  width: 100%; padding: 15px; border: 1.5px solid var(--line); border-radius: 14px;
  font-family: 'Manrope'; font-size: 16px; color: var(--plum); background: #fff;
  outline: none; transition: border-color .2s;
}
.input:focus, textarea:focus { border-color: var(--rose-light); }
textarea { resize: none; min-height: 92px; }

/* Screen padding */
.screen { flex: 1; padding: 24px 20px 32px; display: flex; flex-direction: column; }

/* --- Welcome --- */
.welcome { justify-content: center; text-align: center; gap: 8px; }
.welcome .logo { font-size: 60px; margin-bottom: 8px; }
.welcome h1 { font-size: 40px; color: var(--rose-deep); letter-spacing: .5px; }
.welcome .tag { color: var(--muted); font-size: 16px; margin: 10px 0 22px; line-height: 1.5; }
.welcome .earn-badge {
  background: linear-gradient(135deg, #fff8ec, #fdeecb); border: 1px solid var(--gold-light);
  border-radius: 18px; padding: 16px 18px; margin-bottom: 26px; box-shadow: var(--shadow-sm);
}
.welcome .earn-badge b { color: var(--gold); }
.welcome .earn-badge .big { font-family: 'Playfair Display'; font-size: 22px; color: var(--rose-deep); display: block; margin-bottom: 4px; }

/* --- Steps / progress --- */
.progress { display: flex; gap: 6px; margin-bottom: 22px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.done { background: linear-gradient(90deg, var(--rose-light), var(--rose)); }
.step-title { font-size: 26px; color: var(--rose-deep); margin-bottom: 4px; }
.step-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }

/* Choice cards (gender / status) */
.choices { display: flex; flex-direction: column; gap: 14px; }
.choices.row { flex-direction: row; }
.choice {
  flex: 1; background: #fff; border: 2px solid var(--line); border-radius: 20px;
  padding: 26px 16px; text-align: center; cursor: pointer; transition: all .18s;
}
.choice .emoji { font-size: 40px; display: block; margin-bottom: 10px; }
.choice .lbl { font-weight: 700; font-size: 17px; }
.choice.sel { border-color: var(--rose); background: linear-gradient(135deg, #fff, #fdeef3); box-shadow: var(--shadow-sm); }

/* Yonma-yon maydonlar (yosh/bo'y/vazn) */
.row-fields { display: flex; gap: 10px; }
.row-fields .field { flex: 1; margin: 14px 0 0; }

/* Rasm eslatmasi */
.face-note {
  background: #fff4f7; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 13px; color: var(--rose-deep); line-height: 1.45; text-align: center;
}

/* Feed kartasi: talablar bloki */
.req-block {
  margin-top: 12px; background: #fff8ec; border: 1px solid var(--gold-light);
  border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #6b5220; line-height: 1.5;
}
.req-lbl { font-weight: 700; color: var(--gold); font-size: 13px; margin-bottom: 3px; }

/* Photo upload */
.photo-upload {
  position: relative; width: 190px; height: 240px; margin: 6px auto 20px;
  border-radius: 22px; overflow: hidden; border: 2px dashed var(--gold-light);
  background: #fff8ec; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.photo-upload img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload .ph { text-align: center; color: var(--gold); padding: 10px; }
.photo-upload .ph .ic { font-size: 38px; }

/* spacer to push buttons down */
.spacer { flex: 1; }

/* --- Pending --- */
.pending { justify-content: center; text-align: center; gap: 6px; }
.pending .ic { font-size: 60px; }
.pending h2 { font-size: 28px; color: var(--rose-deep); }

/* --- Feed --- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 6px;
}
.topbar .brand { font-family: 'Playfair Display'; font-size: 22px; color: var(--rose-deep); }
.reminder {
  margin: 8px 16px 4px; background: linear-gradient(135deg, #fff8ec, #fdecc9);
  border: 1px solid var(--gold-light); border-radius: 16px; padding: 12px 14px;
  font-size: 13px; color: #7a5c1e; line-height: 1.45; box-shadow: var(--shadow-sm);
}
.reminder b { color: var(--gold); }

.feed-wrap { flex: 1; padding: 8px 16px 90px; }
.pcard { background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.pcard .photo { position: relative; width: 100%; aspect-ratio: 3 / 4; background: #f6e6ec; }
.pcard .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.locked-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px;
  background: linear-gradient(160deg, rgba(240,98,146,.92), rgba(156,20,74,.94));
  color: #fff; backdrop-filter: blur(3px);
}
.locked-overlay .lock { font-size: 46px; }
.locked-overlay .lt { font-size: 15px; opacity: .95; max-width: 240px; line-height: 1.5; }
.btn-unlock {
  margin-top: 6px; background: #fff; color: var(--rose-deep); border: none;
  padding: 13px 22px; border-radius: 30px; font-family: 'Manrope'; font-weight: 700;
  font-size: 15px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.pcard .info { padding: 18px 20px 20px; }
.pcard .nm { font-family: 'Playfair Display'; font-size: 24px; color: var(--plum); }
.pcard .nm .age { color: var(--muted); font-weight: 500; }
.pcard .meta { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.pcard .badge {
  display: inline-block; background: #fdeef3; color: var(--rose); font-size: 12px;
  font-weight: 600; padding: 4px 10px; border-radius: 20px; margin-right: 6px;
}
.pcard .bio { font-size: 15px; line-height: 1.55; color: #5a4650; }
.feed-actions { display: flex; gap: 12px; margin-top: 16px; }

/* Bottom nav */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.bottomnav button {
  flex: 1; background: none; border: none; cursor: pointer; color: var(--muted);
  font-family: 'Manrope'; font-size: 11px; font-weight: 600; display: flex;
  flex-direction: column; align-items: center; gap: 3px; padding: 4px;
}
.bottomnav button .ic { font-size: 20px; }
.bottomnav button.active { color: var(--rose); }

/* --- Balance / cashback --- */
.balance-hero {
  background: linear-gradient(150deg, var(--rose-light), var(--rose-deep));
  color: #fff; border-radius: 24px; padding: 26px 22px; text-align: center;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.balance-hero .lab { opacity: .85; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; }
.balance-hero .amt { font-family: 'Playfair Display'; font-size: 44px; font-weight: 700; margin: 4px 0; }
.balance-hero .sub { opacity: .9; font-size: 14px; }
.earn-card {
  background: linear-gradient(135deg, #fff8ec, #fdeecb); border: 1px solid var(--gold-light);
  border-radius: 20px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.earn-card h3 { color: var(--gold); font-size: 18px; margin-bottom: 8px; }
.earn-card p { font-size: 14px; line-height: 1.6; color: #6b5220; }
.earn-card .steps { margin-top: 10px; }
.earn-card .steps div { font-size: 13.5px; color: #7a5c1e; padding: 4px 0; }
.withdraw-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); }
.withdraw-card h3 { font-family: 'Playfair Display'; font-size: 20px; margin-bottom: 4px; }
.msg { font-size: 14px; margin-top: 10px; min-height: 18px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }

/* Modal / toast */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: var(--plum); color: #fff; padding: 12px 20px; border-radius: 30px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 50;
  animation: pop .25s ease; max-width: 90%; text-align: center;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px); } }

.section-pad { padding: 16px; }

/* Eslatma modal (ayollar uchun) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(58, 37, 48, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100;
  animation: fadein .2s ease;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 24px; padding: 28px 22px; max-width: 360px; width: 100%;
  text-align: center; box-shadow: var(--shadow); animation: pop .25s ease;
}
.modal-ic { font-size: 48px; margin-bottom: 6px; }
.modal h3 { font-family: 'Playfair Display'; font-size: 24px; color: var(--rose-deep); margin-bottom: 12px; }
.modal p { font-size: 15px; line-height: 1.6; color: #5a4650; margin-bottom: 12px; }
.modal .modal-sub { background: #fff8ec; border: 1px solid var(--gold-light); border-radius: 12px; padding: 10px 12px; color: #6b5220; }
.modal .btn { margin-top: 8px; }

/* --- Chat inbox --- */
.chat-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 8px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.avatar, .avatar-ph {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rose-light), var(--rose));
  color: #fff; font-family: 'Playfair Display'; font-size: 22px; font-weight: 700;
}
.chat-meta { flex: 1; min-width: 0; }
.chat-name { font-weight: 700; font-size: 16px; }
.chat-last { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread {
  background: var(--rose); color: #fff; font-size: 12px; font-weight: 700;
  min-width: 22px; height: 22px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; padding: 0 6px;
}

/* --- Chat screen --- */
.chat-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.chat-back { background: none; border: none; font-size: 30px; color: var(--rose); cursor: pointer; line-height: 1; padding: 0 4px; }
.chat-title { font-family: 'Playfair Display'; font-size: 20px; color: var(--plum); }
.messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.bubble {
  max-width: 76%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4;
  word-wrap: break-word; box-shadow: var(--shadow-sm);
}
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: #fff; color: var(--plum); border-bottom-left-radius: 6px; }
.bubble.photo { padding: 4px; }
.msg-photo { display: block; max-width: 220px; width: 100%; border-radius: 14px; }
.locked-photo {
  width: 200px; height: 150px; border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: linear-gradient(160deg, var(--rose-light), var(--rose-deep)); color: #fff; cursor: pointer;
}
.locked-photo .lp-ic { font-size: 34px; }
.locked-photo span { font-size: 13px; opacity: .95; padding: 0 10px; }
.unlock-hint {
  align-self: center; margin-top: 6px; background: linear-gradient(135deg, #fff8ec, #fdeecb);
  border: 1px solid var(--gold-light); color: #7a5c1e; padding: 10px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
}
.composer {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff;
}
.photo-btn { font-size: 24px; cursor: pointer; padding: 4px; }
.msg-input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 24px; padding: 12px 16px;
  font-family: 'Manrope'; font-size: 15px; outline: none; color: var(--plum);
}
.msg-input:focus { border-color: var(--rose-light); }
.send-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; flex-shrink: 0;
  background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff;
  font-size: 18px; cursor: pointer;
}
