/* ═══════════════════════════════════════════════════════════
   AI AGENT OVERLAY
═══════════════════════════════════════════════════════════ */
.ai-overlay {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: rgba(8, 18, 22, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.ai-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.ai-overlay-close {
  display: none;
}

/* Two-column layout */
.ai-overlay-body {
  display: flex;
  width: 100%;
  height: 100%;
  padding-bottom: 180px;
}
.ai-overlay-left {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 40px 0 80px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.ai-overlay-left::-webkit-scrollbar { display: none; }
.ai-overlay-right {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  padding: 60px 80px 0 40px;
  transform: translateX(60px);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25,1,0.5,1);
  pointer-events: none;
  overflow-y: auto;
  scrollbar-width: none;
}
.ai-overlay-right::-webkit-scrollbar { display: none; }
.ai-overlay-right.visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

/* Results header */
.ai-results-crumbs {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(238,247,247,0.4);
  margin-bottom: 8px;
}
.ai-results-count {
  font-size: 16px;
  font-weight: 300;
  color: var(--accent2);
  margin-bottom: 24px;
}

/* Results grid */
.ai-results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: none;
}
.ai-results-grid::-webkit-scrollbar { display: none; }
.ai-result-card {
  width: calc(33.333% - 6px);
  opacity: 0;
  animation: aiCardFadeIn 0.5s ease forwards;
  cursor: pointer;
}
@keyframes aiCardFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ai-results-grid {
  transition: opacity 0.3s ease;
}
.ai-results-grid.fading {
  opacity: 0;
}
.ai-result-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background-size: cover;
  background-position: center;
  border-radius: 0;
  margin-bottom: 0;
  position: relative;
}
.ai-result-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 18px;
  color: rgba(238,247,247,0.5);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  transition: color 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.ai-result-card.favorited .ai-result-heart {
  color: var(--accent);
}
.ai-result-card.favorited .ai-result-heart.pop {
  transform: scale(1.4);
}
.ai-result-card:not(.favorited) .ai-result-heart {
  opacity: 0;
  transition: opacity 0.2s ease, color 0.3s ease;
}
.ai-result-card:hover .ai-result-heart,
.ai-result-card:active .ai-result-heart {
  opacity: 1;
}
.ai-result-title {
  display: none;
}
.ai-result-meta {
  display: none;
}

/* Smart suggestion cards (inline in bubble column) */
.ai-suggestion-row {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}
.ai-suggestion-card {
  width: 120px;
  flex-shrink: 0;
  cursor: pointer;
}
.ai-suggestion-poster {
  width: 120px;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: 0;
  margin-bottom: 6px;
}
.ai-suggestion-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Experience suggestion cards (contextual, non-poster) */
.ai-experience-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 16px;
}
.ai-experience-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: rgba(238,247,247,0.03);
  border: 1px solid rgba(238,247,247,0.05);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ai-experience-card:hover,
.ai-experience-card:active {
  background: rgba(238,247,247,0.07);
  border-color: rgba(238,247,247,0.1);
}
.ai-exp-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(238,247,247,0.7);
}
.ai-exp-icon svg {
  width: 24px;
  height: 24px;
}
.ai-exp-content {
  flex: 1;
  min-width: 0;
}
.ai-exp-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 4px;
}
.ai-exp-title {
  font-size: 20px;
  font-weight: 200;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.ai-exp-type {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Conversation stack */
.ai-bubbles {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  overflow: visible;
  transition: transform 1.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Per-group block */
.ai-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.ai-group.visible { opacity: 1; }

/* Label above each group — matches gal-mood-label */
.ai-group-label {
  font-size: 13px;
  font-weight: 300;
  color: rgba(238,247,247,0.55);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Bubble options — matches gal-mood-word */
.ai-bubble-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.ai-bubble {
  font-size: 40px;
  font-weight: 200;
  color: rgba(238,247,247,0.55);
  cursor: pointer;
  line-height: 1.35;
  letter-spacing: -0.02em;
  transition: color 1s ease, opacity 1s ease;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.ai-bubble.selected { color: var(--text-primary); }
.ai-bubble.dimmed { opacity: 0.15; pointer-events: none; }

/* Small tag */
.ai-bubble-tag {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  vertical-align: middle;
  position: relative;
  top: -4px;
}

/* Confirmation message */
.ai-confirm {
  font-size: 28px;
  font-weight: 200;
  color: var(--accent2);
  letter-spacing: -0.01em;
  line-height: 1.35;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.ai-confirm.visible { opacity: 1; }

.ai-reset {
  font-size: 16px;
  color: rgba(238,247,247,0.4);
  cursor: pointer;
  margin-top: 8px;
  letter-spacing: 0.05em;
  transition: color 0.4s ease, opacity 1.2s ease;
}
.ai-reset:active { color: rgba(238,247,247,0.7); }
/* ═══════════════════════════════════════════════════════════
   PLAYLIST PAGE
═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   CONTENT DETAIL MODAL
═══════════════════════════════════════════════════════════ */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.detail-modal.open {
  opacity: 1;
  pointer-events: all;
}
.detail-modal-left {
  width: 960px;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.detail-modal-left-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.detail-modal-left::after {
  display: none;
}
.detail-modal-right {
  flex: 1;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 64px;
  cursor: pointer;
  position: relative;
  overflow-y: auto;
}
.detail-modal-close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
}
.detail-modal-close svg {
  width: 24px;
  height: 24px;
}
.detail-modal-content {
  text-align: center;
  max-width: 825px;
}
.detail-modal-title {
  font-size: 48px;
  font-weight: 200;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.detail-modal-meta {
  font-size: 20px;
  font-weight: 300;
  color: rgba(238,247,247,0.4);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
}
.detail-modal-poster {
  width: 280px;
  aspect-ratio: 2/3;
  border-radius: 0;
  overflow: hidden;
  margin: 0 auto 40px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.detail-modal-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-modal-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.detail-modal-playback {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}
.detail-modal-playback-primary {
  padding: 14px 32px;
  border-radius: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.detail-modal-playback-secondary {
  padding: 14px 32px;
  border-radius: 28px;
  border: 1px solid rgba(238,247,247,0.15);
  background: transparent;
  color: rgba(238,247,247,0.5);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.detail-modal-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.12);
}
.detail-modal-progress-fill {
  height: 100%;
  background: var(--accent);
}
.detail-modal-desc {
  font-size: 20px;
  font-weight: 300;
  color: rgba(238,247,247,0.5);
  line-height: 1.5;
  margin-bottom: 36px;
}
.detail-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.detail-modal-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
