#screen-discover {
  background: var(--bg);
  padding-bottom: 80px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  flex-shrink: 0;
}

.top-bar-logo {
  font-family: var(--font-logo);
  font-size: 30px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.deck-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px 20px 0;
}

.deck {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 480px;
}

.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  cursor: grab;
  user-select: none;
  transform-origin: bottom center;
  transition: transform 0.35s var(--ease2), box-shadow 0.3s;
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-card.is-dragging {
  transition: none;
}

.swipe-card.fly-right {
  transition: transform 0.5s var(--ease2), opacity 0.4s !important;
  transform: translateX(200%) rotate(30deg) !important;
  opacity: 0;
}

.swipe-card.fly-left {
  transition: transform 0.5s var(--ease2), opacity 0.4s !important;
  transform: translateX(-200%) rotate(-30deg) !important;
  opacity: 0;
}

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

.card-body {
  padding: 14px 16px 12px;
  background: #fff;
}

.card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-name {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.card-year {
  color: #888;
  font-size: 15px;
  font-weight: 400;
}

.streak-badge {
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.city-row {
  color: #888;
  font-size: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1.5px solid;
}

.tag-subject {
  color: #FF4458;
  border-color: rgba(255, 68, 88, .3);
  background: rgba(255, 68, 88, .07);
}

.tag-time {
  color: #7c5cfc;
  border-color: rgba(124, 92, 252, .3);
  background: rgba(124, 92, 252, .07);
}

.tag-tech {
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, .3);
  background: rgba(14, 165, 233, .07);
}

.compat-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compat-label {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  white-space: nowrap;
}

.compat-bar {
  flex: 1;
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}

.compat-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  transition: width 0.7s var(--ease);
}

.compat-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
}

.drag-label {
  position: absolute;
  top: 28px;
  font-family: var(--font-logo);
  font-size: 46px;
  letter-spacing: 3px;
  padding: 6px 20px;
  border-radius: 10px;
  border: 4px solid;
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
  z-index: 10;
}

.drag-like {
  left: 20px;
  color: #4ade80;
  border-color: #4ade80;
  transform: rotate(-12deg);
}

.drag-nope {
  right: 20px;
  color: var(--pink);
  border-color: var(--pink);
  transform: rotate(12deg);
}

.action-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px;
  flex-shrink: 0;
}

.action-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.2s var(--ease);
}

.action-btn:hover {
  transform: scale(1.15);
}

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

.btn-nope {
  background: #1a1a1a;
  box-shadow: 0 4px 20px rgba(255, 68, 88, 0.2);
}

.btn-nope:hover {
  box-shadow: 0 8px 30px rgba(255, 68, 88, 0.45);
}

.btn-super {
  background: #1a1a1a;
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.btn-like {
  background: var(--grad);
  box-shadow: 0 4px 20px rgba(255, 68, 88, 0.35);
}

.btn-like:hover {
  box-shadow: 0 8px 30px rgba(255, 68, 88, 0.55);
}

.btn-undo {
  background: #1a1a1a;
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  text-align: center;
  padding: 40px;
}

.empty-state.show {
  display: flex;
}

.empty-emoji {
  font-size: 56px;
}

.empty-title {
  font-size: 22px;
  font-weight: 700;
}

.empty-sub {
  color: var(--text2);
  font-size: 14px;
}

#screen-matches {
  background: var(--bg);
  padding-bottom: 80px;
}

.matches-header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.matches-title {
  font-size: 22px;
  font-weight: 700;
}

.matches-count {
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 0 16px 20px;
  overflow-y: auto;
  align-content: start;
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.match-card {
  background: var(--bg2);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.match-card:hover {
  transform: scale(1.03);
}

.match-card-photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.match-card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.match-card-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.match-card-pct {
  color: var(--pink);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.match-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.match-card-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  color: var(--pink);
  background: rgba(255, 68, 88, 0.1);
  border: 1px solid rgba(255, 68, 88, 0.25);
}

.matches-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text2);
  text-align: center;
  padding: 40px;
}

.matches-empty-icon {
  font-size: 48px;
}

.matches-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.matches-empty-sub {
  font-size: 14px;
}

.search-wrap {
  padding: 0 16px 12px;
  flex-shrink: 0;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 18px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--text2);
}

.search-input:focus {
  border-color: var(--pink);
}

.btn-load-more {
  padding: 12px 28px;
  background: var(--grad);
  border: none;
  border-radius: 100px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 68, 88, 0.35);
  transition: all 0.2s var(--ease);
  margin-top: 4px;
}

.btn-load-more:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(255, 68, 88, 0.5);
}

.btn-load-more:active {
  transform: scale(0.97);
}

.btn-load-more:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

[data-theme="light"] .card-body {
  background: #fff;
}

[data-theme="light"] .card-name {
  color: #111;
}

[data-theme="light"] .card-year {
  color: #666;
}

[data-theme="light"] .city-row {
  color: #888;
}

[data-theme="light"] .compat-bar {
  background: #e0e0e0;
}

.skeleton-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--bg2);
  border-radius: 22px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
}

.skeleton-photo {
  width: 100%;
  height: 60%;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shine 1.5s infinite;
}

.skeleton-body {
  padding: 14px 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shine 1.5s infinite;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.tag {
  height: 26px;
  border-radius: 100px;
}

@keyframes shine {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}