/* Media Showcase Public CSS */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --msp-accent: #e63946;
  --msp-sc-color: #ff5500;
  --msp-dark: #1a1a2e;
  --msp-mid: #16213e;
  --msp-text: #1f2937;
  --msp-muted: #6b7280;
  --msp-bg: #f8fafc;
  --msp-radius: 14px;
  --msp-shadow: 0 4px 24px rgba(0,0,0,0.10);
  --msp-shadow-hover: 0 12px 40px rgba(0,0,0,0.18);
}

/* ===================== SECTION ===================== */
.msp-section {
  font-family: 'Nunito', sans-serif;
  margin: 48px 0;
}

.msp-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.msp-section-title { display: flex; flex-direction: column; gap: 6px; }
.msp-section-title h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--msp-dark);
  line-height: 1.2;
}

.msp-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  width: fit-content;
}
.msp-yt-badge { background: #ffe4e4; color: #cc0000; }
.msp-sc-badge { background: #fff0e6; color: #cc4400; }

.msp-view-all-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}
.msp-yt-btn { background: #ff0000; color: #fff; }
.msp-yt-btn:hover { background: #cc0000; color: #fff; transform: translateY(-1px); }
.msp-sc-btn { background: var(--msp-sc-color); color: #fff; }
.msp-sc-btn:hover { filter: brightness(1.1); color: #fff; transform: translateY(-1px); }

/* ===================== GRID ===================== */
.msp-grid {
  display: grid;
  gap: 20px;
}
.msp-yt-grid.msp-layout-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.msp-yt-grid.msp-layout-list {
  grid-template-columns: 1fr;
}
.msp-yt-grid.msp-layout-masonry {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Featured first card in grid */
.msp-layout-grid .msp-yt-card[data-featured="true"],
.msp-layout-masonry .msp-yt-card[data-featured="true"] {
  grid-column: span 2;
}

/* ===================== CARD ===================== */
.msp-card {
  background: #fff;
  border-radius: var(--msp-radius);
  overflow: hidden;
  box-shadow: var(--msp-shadow);
  transition: transform .25s, box-shadow .25s;
}
.msp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--msp-shadow-hover);
}

/* List layout card */
.msp-layout-list .msp-card {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.msp-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  cursor: pointer;
}
.msp-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s, opacity .3s;
}
.msp-thumb-wrap:hover img { transform: scale(1.05); opacity: .85; }

.msp-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}
.msp-thumb-wrap:hover .msp-play-btn { opacity: 1; }
.msp-play-btn svg { width: 64px; height: 64px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }

.msp-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.msp-card-body { padding: 16px 18px 18px; }
.msp-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--msp-dark);
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msp-card-channel { font-size: 13px; color: var(--msp-muted); margin: 0 0 10px; }

.msp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.msp-stat-item {
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 9px;
  border-radius: 50px;
  font-weight: 600;
}
.msp-stat-date { font-size: 12px; color: var(--msp-muted); align-self: center; margin-left: auto; }

.msp-watch-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ff0000;
  text-decoration: none;
  transition: gap .2s;
  gap: 2px;
}
.msp-watch-link:hover { color: #cc0000; gap: 6px; }

/* ===================== MODAL ===================== */
.msp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}
.msp-modal.active { display: flex; align-items: center; justify-content: center; }
.msp-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
}
.msp-modal-box {
  position: relative;
  z-index: 1;
  width: min(900px, 95vw);
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: msp-modal-in .25s ease;
}
@keyframes msp-modal-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.msp-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.msp-modal-close:hover { background: rgba(255,255,255,0.3); }
.msp-modal-iframe-wrap { aspect-ratio: 16/9; }
.msp-modal-iframe-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* ===================== SOUNDCLOUD ===================== */
.msp-sc-track-list { display: flex; flex-direction: column; gap: 20px; }
.msp-sc-track {
  display: flex;
  gap: 18px;
  background: #fff;
  border-radius: var(--msp-radius);
  padding: 18px;
  box-shadow: var(--msp-shadow);
  transition: transform .2s, box-shadow .2s;
  align-items: flex-start;
}
.msp-sc-track:hover { transform: translateY(-2px); box-shadow: var(--msp-shadow-hover); }
.msp-sc-artwork {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--msp-sc-color), #ff8800);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.msp-sc-artwork img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msp-sc-track-body { flex: 1; min-width: 0; }
.msp-sc-track-body h3 { font-size: 16px; font-weight: 700; color: var(--msp-dark); margin: 0 0 4px; }
.msp-sc-user { font-size: 13px; color: var(--msp-muted); margin: 0 0 8px; }
.msp-sc-embed-wrap { margin-top: 10px; border-radius: 8px; overflow: hidden; }
.msp-sc-embed-wrap iframe { display: block; }
.msp-sc-profile-embed { border-radius: var(--msp-radius); overflow: hidden; box-shadow: var(--msp-shadow); }
.msp-sc-profile-embed iframe { display: block; }

/* ===================== EMPTY / NOTICE ===================== */
.msp-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--msp-muted);
  background: #fff;
  border-radius: var(--msp-radius);
  box-shadow: var(--msp-shadow);
}
.msp-empty span { font-size: 48px; display: block; margin-bottom: 12px; }
.msp-notice {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .msp-yt-grid.msp-layout-grid,
  .msp-yt-grid.msp-layout-masonry { grid-template-columns: 1fr 1fr; }
  .msp-layout-grid .msp-yt-card[data-featured="true"],
  .msp-layout-masonry .msp-yt-card[data-featured="true"] { grid-column: span 2; }
  .msp-layout-list .msp-card { grid-template-columns: 1fr; }
  .msp-section-header { flex-direction: column; align-items: flex-start; }
  .msp-sc-track { flex-direction: column; }
  .msp-sc-artwork { width: 100%; height: 120px; border-radius: 8px; }
}
@media (max-width: 480px) {
  .msp-yt-grid.msp-layout-grid,
  .msp-yt-grid.msp-layout-masonry { grid-template-columns: 1fr; }
  .msp-layout-grid .msp-yt-card[data-featured="true"],
  .msp-layout-masonry .msp-yt-card[data-featured="true"] { grid-column: span 1; }
}

/* Fallback embed */
.msp-yt-fallback-embed { border-radius:12px; overflow:hidden; box-shadow:var(--msp-shadow); }
.msp-yt-fallback-embed iframe { display:block; }
.msp-fetch-notice { background:#fef9c3; border-left:4px solid #eab308; padding:10px 16px; border-radius:8px; font-size:13px; color:#713f12; margin-bottom:16px; }
.msp-admin-debug { background:#1a1a2e; color:#94a3b8; padding:10px 16px; border-radius:8px; font-size:12px; margin-top:12px; }
.msp-admin-debug a { color:#a5f3fc; }
