:root {
  --pink: #fd5068;
  --green: #3ddc97;
  --bg: #fff5f6;
  --ink: #2b2b2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  font-size: 22px;
  margin: 0;
  color: var(--pink);
}

.tabs { display: flex; gap: 8px; }

.tab {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  color: #888;
}

.tab.active {
  background: var(--pink);
  color: white;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}

.view.hidden { display: none; }

.hint { color: #888; margin-top: -8px; }

.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.picker-card {
  background: white;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border: 2px solid transparent;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.picker-card:hover { transform: translateY(-2px); border-color: var(--pink); }

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
}

.picker-card .name { font-weight: 700; }
.picker-card .sub { font-size: 12px; color: #888; }

.deck {
  position: relative;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 440px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  background: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, opacity 0.25s ease;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.card.dragging {
  transition: none;
  cursor: grabbing;
}

.stamp {
  position: absolute;
  top: 24px;
  z-index: 5;
  padding: 6px 14px;
  border: 4px solid;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
}

.stamp-like {
  left: 20px;
  color: var(--green);
  border-color: var(--green);
  transform: rotate(-15deg);
}

.stamp-nope {
  right: 20px;
  color: #ff4d5e;
  border-color: #ff4d5e;
  transform: rotate(15deg);
}

.card .photo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
  color: rgba(255,255,255,0.9);
}

.card .info { padding: 16px; }
.card .info h3 { margin: 0 0 4px; font-size: 22px; }
.card .info .breed { color: #888; font-size: 14px; margin-bottom: 8px; }
.card .info .bio { font-size: 14px; line-height: 1.4; }

.card.fly-left { transform: translateX(-140%) rotate(-20deg); opacity: 0; }
.card.fly-right { transform: translateX(140%) rotate(20deg); opacity: 0; }

.empty-state {
  text-align: center;
  color: #888;
  padding: 40px 20px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.btn {
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  background: white;
}

.btn-switch { width: 48px; height: 48px; font-size: 18px; align-self: center; }
.btn-pass { color: #ff4d5e; }
.btn-like { color: var(--green); }

.btn-primary {
  background: var(--pink);
  color: white;
  border-radius: 24px;
  padding: 12px 24px;
  width: auto;
  height: auto;
  font-size: 16px;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.hidden { display: none; }

.modal-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  max-width: 320px;
}

.modal-card h2 { color: var(--pink); }
