:root {
  --bg: #0b0b0f; --panel: #15151c; --panel2: #1d1d27; --line: #2a2a36;
  --text: #ececf0; --muted: #9aa0ae;
  --accent: #ff4d7d; --accent2: #7c5cff; --ok: #36d399; --warn: #f5b54a; --bad: #f87272;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(1200px 600px at 70% -10%, #1a1426, var(--bg));
  color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
header {
  display: flex; align-items: center; gap: 1rem; padding: .8rem 1.2rem;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(11,11,15,.85);
  backdrop-filter: blur(8px); z-index: 5;
}
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: .5px; }
.brand span { color: var(--accent); }
nav { display: flex; gap: .3rem; margin-left: .5rem; }
nav button {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: .45rem .8rem; border-radius: 999px; cursor: pointer; font-weight: 600;
}
nav button.active { color: var(--text); background: var(--panel2); border-color: var(--line); }
nav button:disabled { opacity: .4; cursor: not-allowed; }
.badge { margin-left: auto; padding: .35rem .7rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.badge.ok { background: rgba(54,211,153,.15); color: var(--ok); border: 1px solid rgba(54,211,153,.4); }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 1.2rem; }
h1 { margin: .2rem 0; font-size: 1.5rem; }
.sub { color: var(--muted); margin: .2rem 0 1rem; font-size: .95rem; line-height: 1.4; }
.view { display: none; } .view.active { display: block; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; }
.form label { display: block; margin: .6rem 0; font-size: .82rem; color: var(--muted); font-weight: 600; }
.form input[type=text], .form select {
  width: 100%; margin-top: .3rem; padding: .6rem .7rem; border-radius: 10px;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); font-size: .95rem;
}
.uploads { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; margin: .8rem 0; }
.drop {
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px;
  padding: 1rem .4rem; text-align: center; font-size: 1.5rem; cursor: pointer; color: var(--muted);
}
.drop.filled { border-style: solid; border-color: var(--accent2); color: var(--text); }
.drop span { display: block; font-size: .72rem; margin-top: .3rem; }
.thumb { display: block; width: 100%; height: 50px; object-fit: cover; border-radius: 8px; margin-top: .4rem; }
.count { display: block; font-size: .72rem; margin-top: .35rem; color: var(--ok); font-weight: 700; }
.hint { color: var(--muted); font-size: .78rem; margin: .1rem 0 .2rem; }
.city-row { display: flex; gap: .4rem; margin-top: .3rem; }
.city-row input { margin-top: 0 !important; }
.ghost { background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 0 .7rem; cursor: pointer; font-size: .85rem; white-space: nowrap; }
.ghost:hover { border-color: var(--accent2); }
.cam-modal video { width: 100%; max-height: 52vh; background: #000; display: block; }
.cam-actions { padding: .8rem 1rem; }
button.primary:disabled { filter: grayscale(.55) brightness(.7); cursor: not-allowed; }
.seek-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .35rem; }
.seek { display: inline-flex; align-items: center; gap: .35rem; color: var(--text); font-size: .9rem; font-weight: 500; }
.seek input { width: auto; margin: 0; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.inline { flex: 1; }
.check { display: flex; align-items: center; gap: .4rem; color: var(--text); }
.check input { width: auto; }

button.primary {
  width: 100%; margin-top: 1rem; padding: .8rem; border: none; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 1rem; color: white;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
button.primary:hover { filter: brightness(1.08); }

.result { margin-top: 1rem; }
.result.hidden, .hidden { display: none; }
.decision { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; }
.pill { padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pill.ok { background: rgba(54,211,153,.18); color: var(--ok); }
.pill.warn { background: rgba(245,181,74,.18); color: var(--warn); }
.pill.bad { background: rgba(248,114,114,.18); color: var(--bad); }
.meter { height: 10px; background: var(--panel2); border-radius: 999px; overflow: hidden; margin: .6rem 0; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--ok)); }
.kv { color: var(--muted); font-size: .9rem; margin: .3rem 0; }
.kv b { color: var(--text); }
.reasons { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.tag { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem; font-size: .78rem; color: var(--muted); }

/* deck / swipe cards */
.deck { position: relative; height: 440px; margin: .5rem 0 1rem; }
.swipe {
  position: absolute; inset: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.2rem; display: flex; flex-direction: column; gap: .5rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.4); overflow-y: auto;
}
.photo-lg { width: 100%; height: 200px; border-radius: 14px; overflow: hidden; background: var(--panel2); flex: none; }
.photo-lg img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-drag: none; }
.bio { color: var(--text); font-size: .9rem; line-height: 1.4; opacity: .92; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2rem; font-weight: 800; color: white;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
}
.name-row { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.name-row h2 { margin: 0; font-size: 1.4rem; }
.verified { color: var(--ok); font-size: 1rem; }
.area { color: var(--muted); }
.why { background: var(--panel2); border-radius: 12px; padding: .7rem; color: var(--text); font-size: .9rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { background: rgba(124,92,255,.16); color: #c9bcff; border-radius: 999px; padding: .25rem .6rem; font-size: .8rem; }
.scorebar { margin-top: auto; }
.scorebar small { color: var(--muted); }
.empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; }

.actions { display: flex; justify-content: center; gap: 2rem; }
.circle {
  width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  font-size: 1.6rem; background: var(--panel); color: var(--text);
}
.circle.like { color: var(--accent); border-color: rgba(255,77,125,.5); }
.circle.pass { color: var(--muted); }
.circle:hover { transform: scale(1.06); }

.toast {
  position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--accent), var(--accent2)); color: white;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

/* blind date */
.blind { display: flex; flex-direction: column; gap: .6rem; min-height: 260px; }
.blind .avatar { background: repeating-linear-gradient(45deg,#2a2a36,#2a2a36 8px,#222 8px,#222 16px); }
.timer { color: var(--warn); font-weight: 700; }
.chatbox { background: var(--panel2); border-radius: 12px; padding: .6rem; height: 130px; overflow: auto; display: flex; flex-direction: column; gap: .35rem; }
.msg { padding: .35rem .6rem; border-radius: 10px; max-width: 80%; font-size: .9rem; }
.msg.them { background: #24242f; align-self: flex-start; }
.msg.me { background: linear-gradient(90deg, var(--accent), var(--accent2)); align-self: flex-end; }
.chatform { display: flex; gap: .5rem; }
.chatform input { flex: 1; padding: .55rem; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); }
.chatform button, .reveal { padding: .55rem .8rem; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; color: white; background: var(--accent2); }

/* chat overlay */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 20; }
.overlay.hidden { display: none; }
.chat-modal { width: min(440px,92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.chat-head button { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.chat-modal .chatbox { height: 320px; }

footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 1rem; border-top: 1px solid var(--line); }

/* end-to-end encryption + secure photo */
.e2ee-pill { margin-left: auto; margin-right: .6rem; font-size: .72rem; font-weight: 700;
  color: var(--ok); background: rgba(54,211,153,.15); border: 1px solid rgba(54,211,153,.4);
  border-radius: 999px; padding: .15rem .5rem; }
.e2ee-pill.off { color: var(--muted); background: var(--panel2); border-color: var(--line); }
.iconbtn { background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: .45rem .55rem; cursor: pointer; font-size: 1rem; }
.iconbtn.on { border-color: var(--ok); color: var(--ok); }
.capture-banner { background: rgba(248,114,114,.16); color: var(--bad); border-bottom: 1px solid rgba(248,114,114,.4);
  padding: .5rem .8rem; font-size: .82rem; font-weight: 700; }
.msg.secure { background: #20203a; border: 1px dashed var(--accent2); cursor: pointer; }
.msg.secure small { display: block; color: var(--muted); font-weight: 600; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: .78rem; }

.secure-modal { width: min(440px,94vw); background: #000; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.secure-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem;
  background: var(--panel); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
.secure-timer { margin-left: auto; color: var(--warn); font-variant-numeric: tabular-nums; }
.secure-head button { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.secure-img-wrap { display: grid; place-items: center; background: #000; min-height: 220px; max-height: 64vh; overflow: hidden; }
.secure-img-wrap img { max-width: 100%; max-height: 64vh; display: block;
  -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.secure-note { padding: .6rem .9rem; color: var(--muted); font-size: .72rem; background: var(--panel); }
