/* ============================================================
   Discover / vibe-swipe — ConsciousKids-style (not doomscroll)
   Left = skip · Right = save · Mini player keeps practice going
   ============================================================ */

/* —— Full-screen Discover deck —— */
.vibe-swipe {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #0c0a10;
  color: #f5f0ea;
  font-family: "DM Sans", system-ui, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}
.vibe-swipe[hidden] {
  display: none !important;
}

.vibe-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.35rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  flex-shrink: 0;
}
.vibe-chrome-mid {
  text-align: center;
}
.vibe-mode-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4b5fd;
}
.vibe-close,
.vibe-mini-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.vibe-close { width: 2.5rem; padding: 0; font-size: 1.1rem; }
.vibe-close:hover,
.vibe-mini-btn:hover { background: rgba(255, 255, 255, 0.2); }
.vibe-counter {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}
.vibe-hint {
  margin: 0 1rem 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(196, 181, 253, 0.95);
}

.vibe-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0.35rem 0.85rem 0.5rem;
  position: relative;
  overflow: hidden;
}

/* Tinder stamps */
.vibe-stamp {
  position: absolute;
  top: 18%;
  z-index: 5;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.75rem;
  border: 4px solid;
  border-radius: 12px;
  opacity: 0;
  transform: rotate(-18deg) scale(0.9);
  pointer-events: none;
  transition: opacity 0.08s linear;
}
.vibe-stamp.skip {
  left: 12%;
  color: #f87171;
  border-color: #f87171;
  transform: rotate(-18deg);
}
.vibe-stamp.save {
  right: 12%;
  color: #4ade80;
  border-color: #4ade80;
  transform: rotate(18deg);
}
.vibe-stamp.show { opacity: 1; }

.vibe-card {
  width: min(100%, 420px);
  height: 100%;
  max-height: min(72vh, 680px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: #16121c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform;
  user-select: none;
  position: relative;
  z-index: 2;
}
.vibe-card.is-dragging { transition: none; }
.vibe-card.exit-left {
  transform: translateX(-130%) rotate(-18deg);
  opacity: 0;
}
.vibe-card.exit-right {
  transform: translateX(130%) rotate(18deg);
  opacity: 0;
}
.vibe-card.enter {
  animation: vibe-enter 0.28s ease;
}
@keyframes vibe-enter {
  from { transform: scale(0.94) translateY(12px); opacity: 0.35; }
  to { transform: none; opacity: 1; }
}

.vibe-player-wrap {
  flex: 1;
  min-height: 200px;
  background: #000;
  position: relative;
}
.vibe-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: auto;
}
.vibe-meta {
  padding: 0.9rem 1.05rem 1.05rem;
  background: linear-gradient(180deg, #1a1523, #120e18);
  flex-shrink: 0;
}
.vibe-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
}
.vibe-meta h2 {
  margin: 0 0 0.25rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #fff;
}
.vibe-meta p#vibe-sub {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 240, 234, 0.72);
}

.vibe-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  flex-shrink: 0;
  align-items: center;
}
.vibe-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.85rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
}
.vibe-btn.skip {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}
.vibe-btn.save {
  background: linear-gradient(165deg, #34d399, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.35);
}
.vibe-btn.vibe-ext {
  min-width: 3.1rem;
  width: 3.1rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.8rem;
}
.vibe-btn:hover { filter: brightness(1.08); }
.vibe-btn:disabled {
  opacity: 0.35;
  cursor: default;
  filter: none;
}

body.vibe-open {
  overflow: hidden;
  touch-action: none;
}
body.mini-open main {
  padding-bottom: 5.5rem;
}

/* —— Mini player —— */
.mini-player {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 9000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 16px;
  background: rgba(20, 16, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  color: #f5f0ea;
  font-family: "DM Sans", system-ui, sans-serif;
}
.mini-player[hidden] {
  display: none !important;
}
.mini-thumb {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #2a2435;
}
.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mini-play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.85rem;
}
.mini-body { min-width: 0; }
.mini-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-sub {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: rgba(245, 240, 234, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-controls {
  display: flex;
  gap: 0.25rem;
}
.mini-ctrl {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
.mini-ctrl:hover { background: rgba(255, 255, 255, 0.18); }

/* —— Toast —— */
.vibe-toast {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: rgba(20, 16, 28, 0.92);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.vibe-toast[hidden] { display: none !important; }
.vibe-toast.save { border-color: rgba(74, 222, 128, 0.5); }
.vibe-toast.skip { border-color: rgba(248, 113, 113, 0.45); }

/* —— Video mode chrome —— */
.video-subtabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e5dcd0;
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
}
.video-subtab {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 650;
  font-size: 0.86rem;
  color: #5c5568;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
}
.video-subtab.on {
  background: #1a1523;
  color: #fff;
}
.video-swipe-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  margin-bottom: 0.35rem;
  border-radius: 18px;
  border: 1px solid #e5dcd0;
  background: linear-gradient(120deg, #faf7ff, #fff8f4);
  box-shadow: 0 8px 28px rgba(26, 21, 35, 0.06);
}
.video-swipe-cta strong {
  display: block;
  font-size: 1.05rem;
  color: #5b3d8a;
  margin-bottom: 0.2rem;
}
.video-swipe-cta p {
  margin: 0;
  font-size: 0.9rem;
  color: #4a4458;
  max-width: 28rem;
}
.video-swipe-cta .btn {
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 650;
  font-size: 0.92rem;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  background: linear-gradient(165deg, #6b4a9e, #5b3d8a);
  color: #fff;
}
.saved-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .saved-grid { grid-template-columns: 1fr 1fr; }
}
.saved-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  background: #fffcf9;
  border: 1px solid #e5dcd0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 21, 35, 0.05);
}
.saved-card img {
  width: 7rem;
  height: 100%;
  min-height: 5.5rem;
  object-fit: cover;
  background: #efe8f8;
}
.saved-body {
  padding: 0.75rem 0.85rem 0.75rem 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.saved-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.saved-body .meta {
  margin: 0;
  font-size: 0.85rem;
  color: #4a4458;
}
.saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}
.saved-actions button,
.saved-actions a {
  border: 1px solid #e5dcd0;
  background: #fff;
  color: #5b3d8a;
  font: inherit;
  font-weight: 650;
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
.saved-actions button.primary {
  background: #1a1523;
  color: #fff;
  border-color: #1a1523;
}
.saved-actions button.danger {
  color: #8a3a4a;
}

@media (min-width: 800px) {
  .vibe-card { width: min(100%, 480px); }
}
