/* Mitr4 5.1.0 · UI fluida, cache visual, skeletons e carregamento leve */
:root{
  --mitr4-skel-a:rgba(255,255,255,.055);
  --mitr4-skel-b:rgba(99,102,241,.15);
}
body.mitr4-loading-soft #mainContent,
body.mitr4-loading-soft .tab.active{
  cursor:progress;
}
.mitr4-stale-badge{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9998;
  display:none;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(15,23,42,.82);
  border:1px solid rgba(148,163,184,.22);
  box-shadow:0 18px 60px rgba(0,0,0,.36);
  color:#dbeafe;
  font-size:.78rem;
  backdrop-filter:blur(18px);
}
body.mitr4-has-stale-data .mitr4-stale-badge{display:flex}
.mitr4-skeleton-card{
  min-height:96px;
  border-radius:22px;
  border:1px solid rgba(148,163,184,.14);
  background:linear-gradient(110deg,var(--mitr4-skel-a),var(--mitr4-skel-b),var(--mitr4-skel-a));
  background-size:220% 100%;
  animation:mitr4Skeleton 1.15s ease-in-out infinite;
}
.mitr4-skeleton-row{
  height:58px;
  border-radius:16px;
  background:linear-gradient(110deg,var(--mitr4-skel-a),rgba(34,211,238,.10),var(--mitr4-skel-a));
  background-size:220% 100%;
  animation:mitr4Skeleton 1.15s ease-in-out infinite;
  border:1px solid rgba(148,163,184,.12);
}
@keyframes mitr4Skeleton{
  0%{background-position:120% 0}
  100%{background-position:-120% 0}
}
.player-playlist-section,
.player-only-playlist-card,
.inline-playlist-chip,
.youtube-suggestion-card,
.player-card,
.card,
.settings-card{
  content-visibility:auto;
  contain-intrinsic-size:1px 220px;
}
.inline-playlist-chip,
.player-only-playlist-card,
.youtube-suggestion-card{
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.inline-playlist-chip:hover,
.player-only-playlist-card:hover,
.youtube-suggestion-card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 42px rgba(0,0,0,.22);
}
.mitr4-cache-note{
  color:#9fb0d8;
  font-size:.78rem;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.mitr4-cache-note::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#34d399;
  box-shadow:0 0 12px rgba(52,211,153,.6);
}
@media (prefers-reduced-motion:reduce){
  .mitr4-skeleton-card,.mitr4-skeleton-row{animation:none}
  .inline-playlist-chip,.player-only-playlist-card,.youtube-suggestion-card{transition:none}
}


/* 5.1.4 playlist ownership/editor */
.downloaded-playlist-card.saved-profile-playlist{
  border-color:rgba(52,211,153,.32)!important;
  background:linear-gradient(135deg,rgba(15,23,42,.78),rgba(22,78,99,.22))!important;
}
.downloaded-playlist-hint{
  display:block;
  margin-top:4px;
  color:#a9b8d9;
  font-size:.74rem;
}
.mitr4-playlist-editor-backdrop{
  position:fixed;
  inset:0;
  z-index:10020;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(2,6,23,.72);
  backdrop-filter:blur(16px);
}
.mitr4-playlist-editor-backdrop.show{display:flex}
.mitr4-playlist-editor-card{
  width:min(620px,96vw);
  border-radius:26px;
  background:linear-gradient(145deg,rgba(15,23,42,.96),rgba(30,27,75,.94));
  border:1px solid rgba(148,163,184,.24);
  box-shadow:0 28px 100px rgba(0,0,0,.48);
  padding:18px;
}
.mitr4-playlist-editor-head,
.mitr4-playlist-editor-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.mitr4-playlist-editor-head strong{font-size:1.05rem}
.mitr4-playlist-editor-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin:14px 0;
}
.mitr4-playlist-editor-grid label{
  display:grid;
  gap:6px;
  color:#dbeafe;
  font-size:.82rem;
}
.mitr4-playlist-editor-preview{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.16);
  background:rgba(15,23,42,.48);
  margin-bottom:14px;
}
.mitr4-playlist-editor-preview img{
  width:62px;
  height:62px;
  object-fit:cover;
  border-radius:16px;
}
.mitr4-playlist-editor-preview span{
  color:#a9b8d9;
  font-size:.8rem;
}
@media(min-width:720px){
  .mitr4-playlist-editor-grid{grid-template-columns:1fr 1fr}
  .mitr4-playlist-editor-grid label:last-child{grid-column:1 / -1}
}
