/* LaughMatch public v1 — vibrant stage styling, red accent #dc2626, white letters on red */
:root {
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --purple: #7c3aed;
  --cyan: #06b6d4;
  --yellow: #facc15;
  --ink: #111827;
  --paper: #ffffff;
  --muted: #6b7280;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #2e1065 0%, var(--purple) 45%, var(--cyan) 100%);
  min-height: 100dvh;
}
.app-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
}
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 16px 8px;
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; }
.brand-mark { font-size: 1.6rem; }
.brand-accent { color: var(--yellow); }
.topbar-sub { font-size: 0.85rem; opacity: 0.9; font-weight: 600; }

.main-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 14px 14px; }
.view { display: none; }
.view-active { display: flex; flex-direction: column; min-height: 100%; }
.view-title { color: #fff; font-size: 1.35rem; margin: 6px 2px 2px; }
.view-sub { color: rgba(255,255,255,0.9); font-size: 0.9rem; margin: 0 2px 12px; }
.section-h { color: #fff; margin: 16px 2px 8px; font-size: 1.05rem; }
.hidden { display: none !important; }
.empty-note { color: rgba(255,255,255,0.9); text-align: center; padding: 14px; }

/* Swipe */
.swipe-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.city-label { color: #fff; font-weight: 700; font-size: 0.9rem; }
.city-select {
  padding: 8px 10px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.5);
  background: #fff; font-weight: 600; max-width: 45%;
}
.progress-counter { margin-left: auto; color: #fff; font-weight: 700; font-size: 0.9rem; }

.hint-card {
  background: var(--yellow); color: var(--ink); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.hint-card h2 { font-size: 1.15rem; margin-bottom: 8px; }
.hint-card p { line-height: 1.5; margin-bottom: 12px; }

.deck { flex: 1 1 auto; min-height: 0; position: relative; display: flex; }
.comic-card {
  background: var(--paper); border-radius: 22px; overflow: hidden; width: 100%;
  display: flex; flex-direction: column; box-shadow: 0 14px 34px rgba(0,0,0,0.35);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.comic-card.dragging { transition: none; }
.card-media {
  position: relative; flex: 1 1 auto; min-height: 180px;
  background: linear-gradient(140deg, #4c1d95, #0e7490);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-media img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.card-initials {
  font-size: 4.2rem; font-weight: 900; color: rgba(255,255,255,0.92);
  text-shadow: 0 4px 18px rgba(0,0,0,0.4); letter-spacing: 1px;
}
.demo-badge, .founding-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 0.72rem;
  padding: 4px 9px; border-radius: 999px; letter-spacing: 0.4px;
}
.founding-badge { left: auto; right: 10px; background: var(--accent); color: #fff; }
.play-btn {
  position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  font-weight: 800; font-size: 1rem; padding: 11px 22px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35); white-space: nowrap;
}
.no-clip-note {
  position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(17,24,39,0.78); color: #fff; font-size: 0.82rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.card-info { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 12px 16px 14px; }
.card-name { font-size: 1.3rem; font-weight: 800; }
.card-city { color: var(--muted); font-weight: 600; margin-top: 2px; }
.card-bio { margin-top: 7px; line-height: 1.45; font-size: 0.95rem; }
.card-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.card-links a {
  background: #f3f4f6; color: var(--ink); text-decoration: none; font-weight: 700;
  font-size: 0.82rem; padding: 6px 11px; border-radius: 999px;
}
.test-note { margin-top: 9px; font-size: 0.8rem; color: var(--muted); }

.deck-empty { text-align: center; color: #fff; padding: 30px 12px; }
.deck-empty-emoji { font-size: 2.6rem; }
.deck-empty h2 { margin: 8px 0 6px; }
.deck-empty p { margin-bottom: 14px; }

.verdict-row { flex: 0 0 auto; display: flex; gap: 10px; padding-top: 12px; }
.btn {
  border: 0; border-radius: 999px; font-weight: 800; cursor: pointer;
  padding: 12px 18px; font-size: 1rem; text-decoration: none; display: inline-block; text-align: center;
}
.btn-red { background: var(--accent); color: #fff; }
.btn-red:active { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid #e5e7eb; }
.btn-wide { width: 100%; margin-top: 9px; }
.btn-verdict { flex: 1; padding: 15px 6px; font-size: 1.02rem; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.btn-nope { background: #fff; color: var(--ink); }
.btn-super { background: var(--yellow); color: var(--ink); }
.btn-funny { background: var(--accent); color: #fff; }
.swipe-tip { flex: 0 0 auto; text-align: center; color: rgba(255,255,255,0.85); font-size: 0.8rem; padding-top: 8px; }

/* Matches */
.matches-list { display: flex; flex-direction: column; gap: 10px; }
.match-row {
  background: var(--paper); border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.match-avatar {
  width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%;
  background: linear-gradient(140deg, var(--purple), var(--cyan)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 900;
}
.match-meta { flex: 1; min-width: 0; }
.match-name { font-weight: 800; }
.match-city { color: var(--muted); font-size: 0.85rem; }
.match-actions { display: flex; gap: 6px; }
.match-actions a, .match-actions button {
  border: 0; border-radius: 999px; font-weight: 700; font-size: 0.8rem;
  padding: 7px 11px; cursor: pointer; text-decoration: none;
}
.act-shows { background: var(--accent); color: #fff; }
.act-share { background: #f3f4f6; color: var(--ink); }
.act-remove { background: #f3f4f6; color: var(--ink); }

/* Featured + forms */
.featured-spotlight {
  background: linear-gradient(135deg, var(--accent), #7c2d12); color: #fff;
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.featured-badge { background: var(--yellow); color: var(--ink); display: inline-block; font-weight: 900; font-size: 0.72rem; padding: 4px 9px; border-radius: 999px; margin-bottom: 8px; }
.card-form {
  background: var(--paper); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.card-form h3 { font-size: 1.1rem; }
.card-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 0.9rem; }
.card-form input, .card-form select {
  padding: 11px 12px; border: 2px solid #e5e7eb; border-radius: 12px; font-size: 1rem; font-weight: 500;
}
.card-form input:focus, .card-form select:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.check-row { flex-direction: row !important; align-items: flex-start; gap: 9px; font-weight: 600 !important; }
.check-row input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.form-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 0.9rem; }
.form-note { color: var(--muted); font-size: 0.83rem; text-align: center; }
.requests-list { display: flex; flex-direction: column; gap: 9px; }
.request-row { background: var(--paper); border-radius: 14px; padding: 11px 14px; font-size: 0.92rem; }
.request-row strong { display: block; }
.request-row span { color: var(--muted); }

/* Join */
.join-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.join-tab {
  flex: 1; border: 2px solid rgba(255,255,255,0.6); background: transparent; color: #fff;
  border-radius: 999px; padding: 12px 8px; font-weight: 800; font-size: 0.98rem; cursor: pointer;
}
.join-tab-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.founding-banner {
  background: var(--yellow); color: var(--ink); border-radius: 14px; padding: 12px 14px;
  font-weight: 800; text-align: center; margin-bottom: 12px; line-height: 1.4;
}
.success-box {
  background: #ecfdf5; color: #065f46; border: 2px solid #6ee7b7; border-radius: 14px;
  padding: 14px; margin-top: 14px; font-weight: 700; text-align: center; line-height: 1.5;
}

/* Popup */
.popup-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(17,24,39,0.62);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.popup-card {
  background: #fff; border-radius: 22px; padding: 24px 20px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.popup-emoji { font-size: 2.6rem; }
.popup-card h2 { margin: 6px 0 8px; }
.popup-card p { line-height: 1.5; margin-bottom: 8px; }

/* Bottom nav — in-flow so it never covers the verdict buttons */
.bottom-nav {
  flex: 0 0 auto; display: flex; background: rgba(17,24,39,0.92);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.nav-btn {
  flex: 1; position: relative; background: transparent; border: 0; color: rgba(255,255,255,0.75);
  font-size: 1.25rem; padding: 7px 2px 5px; cursor: pointer; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.nav-btn span { font-size: 0.72rem; font-weight: 700; }
.nav-active { color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.nav-badge {
  position: absolute; top: 2px; right: calc(50% - 22px); background: var(--accent); color: #fff;
  font-size: 0.68rem !important; font-weight: 900; min-width: 19px; height: 19px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
