@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --bg-deep: #1B0E2E;
  --surface: #26163C;
  --surface-raised: #331E4E;
  --surface-line: #43285F;
  --accent-gold: #F4A94A;
  --accent-gold-dim: #C4802E;
  --accent-rose: #E8447A;
  --scrub-green: #B0559C;
  --text-warm: #F5EEDD;
  --text-muted: #B7A6C9;

  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text-warm);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(circle at 50% -10%, rgba(227,169,79,0.08), transparent 45%),
    var(--bg-deep);
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--surface-line);
}

.header .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
}

.header .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.header .brand span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ---------- Screens ---------- */
.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 20px;
  padding-bottom: 90px;
  overflow-y: auto;
}
.screen.active { display: flex; }

/* ---------- Badge Card (signature element) ---------- */
.card-stack {
  position: relative;
  flex: 1;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-card {
  position: absolute;
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 22px;
  padding: 22px 20px 20px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.6);
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.badge-card::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 16px;
  background: var(--accent-gold-dim);
  border-radius: 5px;
}

.badge-card .photo {
  width: 100%;
  aspect-ratio: 3/3.4;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface-raised), var(--scrub-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 64px;
  color: rgba(244,238,227,0.85);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.verified-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-card h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: 0.01em;
}

.badge-card .role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.badge-card .bio {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--scrub-green);
  border: 1px solid var(--surface-line);
  letter-spacing: 0.04em;
}

/* Swipe action buttons */
.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 18px 0 6px;
}

.action-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--surface-line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-warm);
  transition: transform 0.12s ease;
}
.action-btn:active { transform: scale(0.9); }
.action-btn.pass { color: var(--text-muted); }
.action-btn.like { color: var(--accent-rose); border-color: var(--accent-rose); }

/* ---------- Section headings ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
}
.section-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ---------- Match list ---------- */
.match-row, .msg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-line);
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-raised), var(--scrub-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
}
.mini-verified {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  background: var(--accent-gold);
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--bg-deep);
}
.row-main { flex: 1; min-width: 0; }
.row-main .name { font-weight: 600; font-size: 15px; }
.row-main .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Profile ---------- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0 20px;
}
.profile-header .avatar {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  font-size: 32px;
  margin-bottom: 12px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  padding: 12px 12px;
  color: var(--text-warm);
  font-family: var(--font-body);
  font-size: 14px;
}
.field textarea { resize: none; min-height: 70px; }

.btn-primary {
  width: 100%;
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 6px;
}

.btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--text-warm);
  border: 1px solid var(--surface-line);
  border-radius: 12px;
  padding: 13px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.shiftreport-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.shiftreport-actions .btn-secondary:hover { border-color: var(--accent-rose); }

.risk-block {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-line);
}
.risk-block:last-child { border-bottom: none; }
.risk-block h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
}
.risk-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}
.blocked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.unblock-btn {
  background: none;
  border: 1px solid var(--surface-line);
  color: var(--accent-gold);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-mono);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 40px;
  line-height: 1.6;
}

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--surface-line);
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px;
}
.nav-btn .icon { font-size: 18px; }
.nav-btn.active { color: var(--accent-gold); }

/* ---------- Chat ---------- */
.chat-screen { padding-bottom: 80px; }
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.bubble {
  max-width: 75%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.bubble.them {
  background: var(--surface-raised);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bubble.me {
  background: var(--accent-gold-dim);
  color: var(--text-warm);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  position: absolute;
  bottom: 80px;
  left: 20px;
  right: 20px;
}
.chat-input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--text-warm);
  font-family: var(--font-body);
  font-size: 14px;
}
.chat-input-row button {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 16px;
  cursor: pointer;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 14px;
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
