:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --bg: #0b1020;
  --ink: #e6ecff;
  --muted: #a8b7e6;
  --card: rgba(18, 26, 56, 0.76);
  --card-border: rgba(134, 160, 255, 0.38);
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --accent-3: #f43f5e;
  --good: #22c55e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 58, 237, 0.28), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(6, 182, 212, 0.24), transparent 35%),
    radial-gradient(circle at 60% 85%, rgba(244, 63, 94, 0.2), transparent 35%),
    linear-gradient(180deg, #0b1020 0%, #0f1630 55%, #111938 100%);
  min-height: 100vh;
}

header {
  padding: 2.2rem 1rem 1.1rem;
  max-width: 1100px;
  margin: 0 auto;
}

header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #d8b4fe 0%, #67e8f9 45%, #fda4af 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header p {
  margin: .55rem 0 0;
  color: var(--muted);
  max-width: 65ch;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  background: rgba(20, 29, 62, 0.65);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 1rem;
  padding: .9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

button, select {
  border: 1px solid rgba(152, 172, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: .6rem .95rem;
  border-radius: .7rem;
  font-size: .95rem;
}

button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  border: none;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
  transition: transform .15s ease, filter .2s ease;
}

button:hover { transform: translateY(-1px); filter: brightness(1.05); }
button:active { transform: translateY(1px); }

button.ghost {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  box-shadow: none;
}

.swipe-section {
  margin: .6rem 0 1.2rem;
}

.swipe-card {
  background: linear-gradient(160deg, rgba(20, 32, 70, 0.86), rgba(14, 22, 46, 0.9));
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
  min-height: 150px;
}

.swipe-actions {
  display: flex;
  gap: .8rem;
  margin-top: .75rem;
}

.pill {
  display: inline-block;
  margin-bottom: .5rem;
  font-size: .75rem;
  background: rgba(103, 232, 249, 0.18);
  color: #67e8f9;
  border: 1px solid rgba(103, 232, 249, 0.5);
  padding: .2rem .55rem;
  border-radius: 999px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

h2 {
  color: #dbe7ff;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
}

.card-list, .match-list {
  display: grid;
  gap: .75rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: .9rem;
  padding: .85rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .45rem;
}

.tag {
  background: linear-gradient(135deg, rgba(124, 58, 237, .3), rgba(6, 182, 212, .25));
  color: #dbeafe;
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: 999px;
  padding: .15rem .5rem;
  font-size: .78rem;
}

.small { color: var(--muted); font-size: .86rem; margin-top: .2rem; }
.score {
  color: #86efac;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
}


.mode-switch {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.mode-btn {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: none;
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  border: 1px solid rgba(216, 180, 254, 0.6);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}
