:root {
  --bg: #0e0b1a;
  --card: #1a1530;
  --card2: #221b3d;
  --line: #322a52;
  --pink: #ff4d8d;
  --purple: #8b5cf6;
  --text: #f4f0ff;
  --muted: #9a92b8;
  --green: #34d399;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 20% 8%, #2a1840, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}
button { font-family: inherit; }
a { color: var(--pink); }

.btn {
  border: none; cursor: pointer; font-weight: 700; font-size: 15px;
  border-radius: 13px; padding: 13px 22px; color: white;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: transform .08s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--card2); border: 1px solid var(--line); }
.btn.full { width: 100%; }

.field { width: 100%; padding: 13px 15px; font-size: 15px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); outline: none; }
.field:focus { border-color: var(--purple); }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

/* Sign-up gender picker + "or" divider */
.su-gender { display: flex; gap: 10px; }
.su-gender .gf-btn { flex: 1; height: 46px; font-size: 15px; font-weight: 700; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; color: var(--muted); font-size: 12px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Sign in with Google */
.gsi-wrap { display: flex; justify-content: center; margin: 8px 0 10px; min-height: 44px; }
.gsi-hint { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.gsi-fineprint { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.4; margin: 10px 0 2px; opacity: .85; }
.gsi-unconfigured { text-align: center; font-size: 13px; color: var(--muted); background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 8px; }

.hidden { display: none !important; }
.error { color: #ff8fab; font-size: 14px; margin-top: 10px; min-height: 18px; }
.dev-code { background: #2a2348; border: 1px dashed var(--purple); border-radius: 10px;
  padding: 10px 12px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dev-code b { color: var(--text); font-size: 18px; letter-spacing: 3px; }

/* ---------- Auth screen ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 420px; max-width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 32px; }
.brand { font-weight: 800; font-size: 28px; letter-spacing: -0.5px; text-align: center; }
.brand span { color: var(--pink); }
.tagline { text-align: center; color: var(--muted); margin: 8px 0 22px; font-size: 15px; }
.trust { display: flex; gap: 8px; align-items: flex-start; background: var(--card2);
  border-radius: 12px; padding: 12px; font-size: 12.5px; color: var(--muted); margin-top: 18px; line-height: 1.45; }

/* ---------- App shell ---------- */
header.appbar { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: rgba(14,11,26,.85); backdrop-filter: blur(8px); z-index: 20; }
.logo { font-weight: 800; font-size: 21px; }
.logo span { color: var(--pink); }
.stats { font-size: 13px; color: var(--muted); }
.stats b { color: var(--text); }

nav.tabs { display: flex; gap: 4px; justify-content: center; padding: 10px;
  position: sticky; top: 57px; background: var(--bg); z-index: 15; border-bottom: 1px solid var(--line); }
nav.tabs button { background: none; border: none; color: var(--muted); font-weight: 600;
  font-size: 15px; padding: 9px 16px; border-radius: 10px; cursor: pointer; position: relative; }
nav.tabs button.active { color: var(--text); background: var(--card); }
.badge { background: var(--pink); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; }

main.content { max-width: 940px; margin: 0 auto; padding: 18px 16px 60px; }
.view { display: none; }
.view.active { display: block; }

/* ---------- Meet / video ---------- */
.videos { position: relative; border-radius: 20px; overflow: hidden; background: #000;
  aspect-ratio: 16/10; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#remoteVideo { width: 100%; height: 100%; object-fit: cover; background: #000; }
#localVideo { position: absolute; bottom: 14px; right: 14px; width: 150px; aspect-ratio: 4/3;
  object-fit: cover; border-radius: 12px; border: 2px solid rgba(255,255,255,.25);
  background: #111; transform: scaleX(-1); }
.partner-tag { position: absolute; top: 14px; left: 14px; background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; display: none; }
.call-timer { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); padding: 6px 13px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .5px; font-variant-numeric: tabular-nums; display: none; }
.liked-badge { position: absolute; top: 14px; right: 14px; background: rgba(255,77,141,.9);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; display: none; }
.status-overlay { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 20px;
  background: rgba(14,11,26,.9); }
.status-overlay.hidden { display: none; }
.status-overlay h2 { font-size: 23px; }
.status-overlay p { color: var(--muted); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid #3a2f5e;
  border-top-color: var(--pink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.controls { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.ctrl { border: 1px solid var(--line); cursor: pointer; font-size: 14px; font-weight: 700;
  border-radius: 13px; padding: 13px 20px; color: var(--text); background: var(--card);
  display: flex; align-items: center; gap: 7px; transition: filter .15s, transform .08s; }
.ctrl:hover { filter: brightness(1.25); }
.ctrl:active { transform: scale(0.96); }
.ctrl.like { background: linear-gradient(90deg, var(--pink), #ff7eb0); border: none; }
.ctrl.next { background: linear-gradient(90deg, var(--purple), #6d5ce0); border: none; }
.ctrl.danger { color: #ff8fab; }

.vchat { margin-top: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px; }
.vchat .log { max-height: 130px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.vchat form { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- OmeTV-style Meet layout ---------- */
.ome { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 820px) { .ome { grid-template-columns: 1fr; } }

.ome-stage { display: flex; flex-direction: column; gap: 12px; }
.ome-videos { position: relative; border-radius: 18px; overflow: hidden; background: #0a0814;
  aspect-ratio: 4/3; box-shadow: 0 20px 60px rgba(0,0,0,.5); touch-action: none; }
.ome-videos #remoteVideo { width: 100%; height: 100%; object-fit: cover; background: #0a0814; }
.ome-videos #localVideo { position: absolute; bottom: 12px; left: 12px; width: 150px; aspect-ratio: 4/3;
  object-fit: cover; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); background: #111;
  transform: scaleX(-1); box-shadow: 0 6px 20px rgba(0,0,0,.5); z-index: 3; }

/* Rules / start gate */
.rules-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2a1840, #0a0814); padding: 20px; z-index: 4; }
.rules-overlay.hidden { display: none; }
.rules-card { text-align: center; max-width: 340px; }
.rules-card h2 { font-size: 24px; margin-bottom: 16px; }
.rules-list { list-style: none; text-align: left; display: inline-flex; flex-direction: column; gap: 9px;
  margin-bottom: 22px; font-size: 14px; color: #d7cffb; }
.rules-fine { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* Control bar */
.ome-controls { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.gender-filter { display: flex; gap: 16px; flex-wrap: wrap; }
.gf-group { display: flex; align-items: center; gap: 6px; }
.gf-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.gf-btn { min-width: 38px; height: 36px; padding: 0 11px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: 15px; font-weight: 700;
  transition: filter .15s, transform .08s; }
.gf-btn:hover { filter: brightness(1.3); }
.gf-btn:active { transform: scale(.95); }
.gf-btn.active { background: linear-gradient(90deg, var(--pink), var(--purple)); border-color: transparent; }

.action-buttons { display: flex; gap: 8px; align-items: center; }
.ome-btn { border: none; cursor: pointer; font-weight: 800; font-size: 15px; border-radius: 12px;
  padding: 11px 22px; color: #fff; transition: filter .15s, transform .08s; }
.ome-btn:hover { filter: brightness(1.1); }
.ome-btn:active { transform: scale(.96); }
.ome-btn.start { background: linear-gradient(90deg, #2bd07a, #16a34a); font-size: 17px; padding: 14px 40px; }
.ome-btn.next { background: linear-gradient(90deg, var(--purple), #6d5ce0); }
.ome-btn.stop { background: var(--card2); border: 1px solid var(--line); }
.ome-round { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 17px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: filter .15s, transform .08s; }
.ome-round:hover { filter: brightness(1.3); }
.ome-round:active { transform: scale(.92); }
.ome-round.like.liked { background: linear-gradient(90deg, var(--pink), #ff7eb0); border-color: transparent; }
.ome-round.friend.friended { background: linear-gradient(90deg, #2bd07a, #16a34a); border-color: transparent; }
.ome-round.danger { border-color: #5a2740; }

/* Friend / swipe affordances on the video stage */
.friended-badge { position: absolute; top: 50px; right: 14px; background: rgba(34,197,94,.92);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; display: none; z-index: 3; }
.swipe-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px); padding: 7px 16px; border-radius: 999px;
  font-size: 13px; color: #e7e0ff; display: none; pointer-events: none; z-index: 3; white-space: nowrap; }
.swipe-feedback { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.6);
  background: rgba(22,163,74,.95); padding: 14px 26px; border-radius: 16px; font-size: 18px; font-weight: 800;
  opacity: 0; pointer-events: none; z-index: 5; transition: opacity .2s ease, transform .2s ease; }
.swipe-feedback.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.swipe-feedback.like { background: rgba(255,77,141,.95); }

/* Match / Friend chips in the connections list & chat header */
.kind-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.kind-chip.match { background: rgba(255,77,141,.18); color: #ffb3cd; border: 1px solid var(--pink); }
.kind-chip.friend { background: rgba(34,197,94,.16); color: #b8ffd8; border: 1px solid var(--green); }
.kind-chip.owl { background: rgba(204,0,51,.16); color: #ffb3c0; border: 1px solid #cc0033; }

/* Connections sub-filter */
.conn-filter { display: flex; gap: 6px; margin-bottom: 12px; }
.conn-filter button { background: var(--card); border: 1px solid var(--line); color: var(--muted);
  font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 10px; cursor: pointer; }
.conn-filter button.active { color: var(--text); background: var(--card2); border-color: var(--purple); }

/* Right-side chat column */
.ome-chat { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-direction: column; height: 520px; }
@media (max-width: 820px) { .ome-chat { height: 320px; } }
.ome-chat-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.ome-chat .log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  font-size: 14px; padding: 12px; }
.ome-chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ome-chat form input { flex: 1; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); outline: none; }
.ome-chat form input:focus { border-color: var(--purple); }
.ome-chat form input:disabled { opacity: .5; }
.ome-send { border: none; cursor: pointer; font-weight: 700; border-radius: 11px; padding: 0 16px; color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple)); }
.ome-send:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Chat bubbles ---------- */
.msg { padding: 7px 12px; border-radius: 12px; max-width: 78%; line-height: 1.35; word-break: break-word; }
.msg.me { align-self: flex-end; background: var(--purple); }
.msg.them { align-self: flex-start; background: var(--card2); }
.msg.sys { align-self: center; color: var(--muted); font-size: 12px; }

/* ---------- Connections list & chat ---------- */
.conn-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
@media (max-width: 760px) { .conn-grid { grid-template-columns: 1fr; } .chat-panel.empty { display: none; } }
.conn-list { display: flex; flex-direction: column; gap: 8px; }
.conn-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.conn-item.active { border-color: var(--purple); }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--purple)); display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.conn-item .meta { flex: 1; min-width: 0; }
.conn-item .meta .nm { font-weight: 700; }
.conn-item .meta .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-direction: column; min-height: 460px; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat-head .nm { font-weight: 700; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.social-chip { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--card2);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.social-chip.wa { background: rgba(37,211,102,.15); border-color: var(--green); color: #b8ffd8; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-foot { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.empty-state { display: flex; flex: 1; align-items: center; justify-content: center; color: var(--muted);
  text-align: center; padding: 30px; }

/* ---------- Profile ---------- */
.profile-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; max-width: 560px; margin: 0 auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.saved-note { color: var(--green); font-size: 14px; margin-top: 12px; min-height: 18px; }
.verified-pill { font-size: 12px; color: var(--green); background: rgba(52,211,153,.12);
  border: 1px solid var(--green); border-radius: 999px; padding: 3px 10px; }
.verified-pill.owl { color: #ff9bad; background: rgba(204,0,51,.14); border-color: #cc0033; }
.verified-pill.owl.hidden { display: none; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8,5,18,.82); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-bg.show { display: flex; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: linear-gradient(160deg, #2a1840, #1a1530); border: 1px solid var(--pink);
  border-radius: 24px; padding: 36px 32px; text-align: center; max-width: 380px;
  box-shadow: 0 0 60px rgba(255,77,141,.4); }
.modal .heart { font-size: 60px; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } }
.modal h2 { font-size: 28px; margin: 6px 0; }
.modal p { color: var(--muted); margin-bottom: 20px; }
.modal .actions { display: flex; gap: 10px; justify-content: center; }

.footer-note { color: var(--muted); font-size: 12px; text-align: center; padding: 16px; }
