:root {
  --hot: #fe3c72;
  --hot-dark: #d6215a;
  --gold: #ffb400;
  --ink: #22212b;
  --paper: #fff9f6;
  --card-radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top, #fff2ee 0%, #ffe1e8 45%, #ffd0dc 100%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--hot-dark);
}
.logo .paw { margin-left: 4px; }

.counters {
  display: flex;
  gap: 8px;
}
.counter {
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pass-counter { color: #8a8a99; }
.like-counter { color: var(--hot); }

.stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px 10px;
  min-height: 0;
}

.card-stack {
  position: relative;
  width: min(92vw, 380px);
  height: min(66vh, 560px);
}

.card {
  position: absolute;
  inset: 0;
  background: var(--paper);
  border-radius: var(--card-radius);
  box-shadow: 0 18px 40px rgba(120, 40, 70, 0.25);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(.2,.8,.3,1), opacity 0.35s;
}

.card.dragging { transition: none; }

.card-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.card .photo-wrap {
  position: relative;
  height: 58%;
  background: #222;
}

.card .photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.card .gradient {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
  pointer-events: none;
}

.stamp {
  position: absolute;
  top: 26px;
  padding: 8px 16px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  border: 4px solid currentColor;
  border-radius: 10px;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-18deg);
}
.stamp.like { left: 20px; color: #4fd06b; }
.stamp.nope { right: 20px; color: var(--hot); transform: rotate(18deg); }

.card .info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px 14px;
  color: white;
}

.card .name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 26px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.card .name-row .age { font-weight: 500; font-size: 20px; opacity: 0.9; }

.card .tagline {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  margin-top: 2px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.card .meta {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.92;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.card .prompts {
  padding: 16px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scroll-hint {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #b8b2c4;
  padding-top: 2px;
}

.prompt-box {
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.prompt-box .q {
  font-size: 12px;
  font-weight: 700;
  color: #9a94a8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.prompt-box .a {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.bio-box {
  font-size: 14px;
  line-height: 1.5;
  color: #4c4a58;
  padding: 0 2px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state.hidden { display: none; }
.empty-emoji { font-size: 54px; }
.empty-state h2 { margin: 6px 0 4px; }
.empty-state p { color: #6b6879; margin: 0 0 18px; }
.restart-btn, .keep-swiping-btn {
  background: var(--hot);
  color: white;
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(254, 60, 114, 0.35);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 10px 0 26px;
}

.control-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s;
}
.control-btn:active { transform: scale(0.9); }

.pass-btn { color: #8a8a99; font-weight: 800; }
.like-btn { color: var(--hot); font-size: 26px; width: 66px; height: 66px; }
.info-btn {
  width: 42px; height: 42px;
  font-style: italic;
  font-weight: 800;
  color: #9a94a8;
  font-family: Georgia, serif;
}

.match-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--hot), var(--hot-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.match-overlay.hidden { display: none; }

.match-card {
  text-align: center;
  color: white;
  max-width: 360px;
}
.match-card h1 {
  font-size: 40px;
  margin: 0 0 10px;
  font-style: italic;
  text-transform: uppercase;
}
.match-card p { font-size: 15px; opacity: 0.92; margin-bottom: 18px; }
.match-img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid white;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  margin-bottom: 22px;
}
.keep-swiping-btn { background: white; color: var(--hot-dark); }

@media (prefers-color-scheme: dark) {
  body { background: radial-gradient(circle at top, #2a2230 0%, #201a26 60%, #170f1c 100%); color: #f2eef5; }
  .logo { color: #ff6f92; }
  .counter { background: #2e2735; }
  .pass-counter { color: #a9a3b8; }
  .card { background: #211b26; }
  .prompt-box { background: #2b2432; }
  .prompt-box .a { color: #f2eef5; }
  .prompt-box .q { color: #a79fb8; }
  .bio-box { color: #cfc8db; }
  .control-btn { background: #2b2432; }
  .empty-state p { color: #b7b0c4; }
  .scroll-hint { color: #7d7690; }
}
