/* =========================================================
   Shadow Hive Swiper — Stylesheet
   Dark premium design, smooth card transitions
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0a0f;
  --surface:      #13131a;
  --surface-2:    #1c1c27;
  --border:       rgba(255,255,255,0.08);
  --text:         #f0f0f5;
  --text-muted:   #6b6b85;
  --landlord:     #22c55e;
  --landlord-dim: rgba(34,197,94,0.15);
  --realtor:      #f97316;
  --realtor-dim:  rgba(249,115,22,0.15);
  --skip:         rgba(255,255,255,0.08);
  --skip-hover:   rgba(255,255,255,0.13);
  --gold:         #fbbf24;
  --radius:       20px;
  --radius-sm:    10px;
  --shadow:       0 32px 80px rgba(0,0,0,0.6);
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  user-select: none;
}

/* ── Header ────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 10px; }

.logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--gold);
}

.divider { color: var(--border); font-size: 18px; }

.subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.stat-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Stage ──────────────────────────────────────────────── */
.stage {
  position: fixed;
  top: 60px; bottom: 84px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Hint labels (slide in during animation) */
.hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 12px;
  border: 3px solid;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}

.hint-landlord {
  left: 32px;
  color: var(--landlord);
  border-color: var(--landlord);
  background: var(--landlord-dim);
}

.hint-realtor {
  right: 32px;
  color: var(--realtor);
  border-color: var(--realtor);
  background: var(--realtor-dim);
}

.hint.visible { opacity: 1; }

/* ── Card Stack ─────────────────────────────────────────── */
.card-stack {
  position: relative;
  width: min(420px, 92vw);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  position: absolute;
  width: 100%;
  max-height: calc(100% - 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              opacity 0.35s ease;
  will-change: transform, opacity;
}

/* Card image — vertically scrollable stitched profile */
.card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
  overflow-y: auto;
  border-radius: var(--radius);
}

/* Override: image is tall, allow scrolling inside the card */
.card {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.card-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Swipe Animations ───────────────────────────────────── */
.card.swipe-left {
  transform: translateX(-140%) rotate(-18deg) !important;
  opacity: 0 !important;
}

.card.swipe-right {
  transform: translateX(140%) rotate(18deg) !important;
  opacity: 0 !important;
}

.card.swipe-up {
  transform: translateY(-120%) !important;
  opacity: 0 !important;
}

.card.slide-in {
  animation: slideIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes slideIn {
  from { transform: scale(0.88) translateY(30px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Done Screen ────────────────────────────────────────── */
.done-screen {
  text-align: center;
  animation: slideIn 0.5s ease forwards;
}

.done-icon { font-size: 72px; margin-bottom: 16px; }
.done-screen h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.done-screen p { color: var(--text-muted); font-size: 15px; margin-bottom: 32px; }

.done-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.done-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.done-stat span { font-size: 28px; font-weight: 800; }
.done-stat label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ── Action Bar ─────────────────────────────────────────── */
.action-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 24px 12px;
  background: linear-gradient(transparent, rgba(10,10,15,0.95));
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 52px;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
  outline: none;
}

.btn:active { transform: scale(0.95); }

.btn kbd {
  font-size: 10px;
  font-family: inherit;
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Landlord — green */
.btn-landlord {
  background: var(--landlord);
  color: #031a0d;
  box-shadow: 0 4px 24px rgba(34,197,94,0.35);
  flex: 1;
  max-width: 180px;
  justify-content: center;
}
.btn-landlord:hover {
  background: #4ade80;
  box-shadow: 0 6px 32px rgba(34,197,94,0.5);
  transform: translateY(-2px);
}

/* Realtor — orange */
.btn-realtor {
  background: var(--realtor);
  color: #1a0800;
  box-shadow: 0 4px 24px rgba(249,115,22,0.35);
  flex: 1;
  max-width: 180px;
  justify-content: center;
}
.btn-realtor:hover {
  background: #fb923c;
  box-shadow: 0 6px 32px rgba(249,115,22,0.5);
  transform: translateY(-2px);
}

/* Skip — neutral */
.btn-skip {
  background: var(--skip);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0 16px;
  height: 52px;
  font-size: 13px;
  flex-shrink: 0;
}
.btn-skip:hover { background: var(--skip-hover); color: var(--text); }

.btn-icon { font-size: 16px; }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Scrollbar inside card ──────────────────────────────── */
.card::-webkit-scrollbar { width: 4px; }
.card::-webkit-scrollbar-track { background: transparent; }
.card::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .stats-bar { display: none; }
  .action-bar { gap: 10px; padding: 0 16px 12px; }
  .btn { padding: 0 16px; }
  .btn-label { display: none; }
}
