:root {
  --pink: #fe3c72;
  --orange: #ff655b;
  --bg: #fff5f5;
  --text: #2b2b2b;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --text: #f1f1f1;
    --card-bg: #242424;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

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

.logo {
  font-size: 1.3rem;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.likes-count {
  font-size: 1rem;
  color: var(--text);
}

.deck-area {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
}

.deck {
  position: relative;
  width: min(360px, 92vw);
  height: min(540px, 65vh);
}

.card {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.card img {
  width: 100%;
  height: 78%;
  object-fit: cover;
  pointer-events: none;
}

.card-info {
  padding: 12px 16px;
}

.card-info h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.card-info p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.95rem;
}

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

.stamp.like {
  left: 20px;
  color: #4ecb71;
  border-color: #4ecb71;
  transform: rotate(-20deg);
}

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

.empty-state {
  text-align: center;
}

.restart-btn {
  margin-top: 14px;
  border: none;
  padding: 10px 22px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 16px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}

.action-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.action-btn.pass { color: #ff4747; }
.action-btn.like { color: #4ecb71; }

.match-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.match-overlay:not([hidden]) {
  display: flex;
}

.match-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  width: min(320px, 85vw);
}

.match-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--pink);
  margin: 10px 0;
}

.match-card h1 {
  font-size: 1.3rem;
  margin: 0 0 6px;
}
