/* css/components.css */

/* --- Checkout Styles --- */
.checkout-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.checkout-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.form-input:invalid {
    border-color: #f44336;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method.selected {
    border-color: var(--accent);
    background: rgba(30, 144, 255, 0.1);
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-method small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.checkout-total {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border);
    text-align: right;
}

.checkout-security {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.security-icon {
    font-size: 1rem;
}

.btn-loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* --- Logo e Header --- */
.no-scroll { overflow: hidden !important; overscroll-behavior: none !important; }
.header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    padding: 4px 8px;
}

/* Firefox slider track and thumb */
.volume-slider::-moz-range-track { height: 4px; background: #333333; border-radius: 2px; }
.volume-slider::-moz-range-thumb {
  -moz-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: currentColor;
  color: #1e90ff;
  border: 1px solid var(--border);
  /* Speaker icon mask */
  mask-image: url('https://unpkg.com/lucide-static@latest/icons/volume-2.svg');
  -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/volume-2.svg');
  mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
  mask-position: center; -webkit-mask-position: center;
  mask-size: 80% 80%; -webkit-mask-size: 80% 80%;
}

/* Logo circle: match theme toggle style */
.app-logo {
  border-radius: 9999px;
  border: 1px solid var(--border);
}

.header-top .logo { justify-self: start; min-width: 40px; }
.header-top .theme-toggle { justify-self: end; }
.header-title { grid-column: 2; text-align: center; }
.header-actions { justify-self: end; display: inline-flex; align-items: center; gap: 0.5rem; }
.header-title h1 {
    color: #1e90ff;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    line-height: 1;
}
.header-title .subtitle {
    color: #b3b3b3;
    font-size: 0.65rem;
    margin: 0;
    letter-spacing: 1px;
    font-weight: 300;
}

/* Indicador de host no FM */
.fm-host-indicator { color: #cfd8e3; font-size: 0.95rem; }

/* --- Radial FM Layout --- */
#fm-section { grid-template-columns: 1fr; gap: 1rem; }
#fm-section.section.active { display: grid !important; }
@media (min-width: 768px) {
  #fm-section { grid-template-columns: 1.2fr minmax(320px, 1fr); align-items: start; }
  #fm-section > .fm-chat { grid-column: 2; grid-row: 1; align-self: start; }
  #fm-section > :not(.fm-chat) { grid-column: 1; }
}

/* Bloqueio de controlos quando listener (seguindo host) */
body.fm-listening .player .control-btn,
body.fm-listening .player .progress-bar {
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
}
/* Manter volume como controlo pessoal mesmo quando a seguir o host */
body.fm-listening .player .volume-slider {
  pointer-events: auto;
  opacity: 1;
  cursor: pointer;
}
/* Indicador visual no título do player */
body.fm-listening .player-details::after {
  content: 'Sintonizado';
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 9999px;
  color: #1e90ff;
  background: rgba(30,144,255,0.12);
  border: 1px solid rgba(30,144,255,0.35);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.logo-text { display: flex; flex-direction: column; align-items: center; }

.theme-toggle { position: static; width: 40px; height: 40px; border-radius: 9999px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }

.app-logo {
    height: clamp(28px, 5vw, 40px);
    width: auto;
    display: block;
    margin: 0;
}

.logo h1 {
    color: #1e90ff;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    line-height: 1;
}

.logo .subtitle {
    color: #b3b3b3;
    font-size: 0.65rem;
    margin: 0;
    letter-spacing: 1px;
    font-weight: 300;
}

/* --- Navegação --- */
.nav-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 1rem;
    scroll-behavior: smooth;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch; /* momentum scroll iOS */
    scroll-snap-type: x proximity; /* snapping suave */
    flex-wrap: wrap;
    margin: 0 auto;
}

.nav-container::-webkit-scrollbar {
    display: none;
}

@media (max-width: 767.98px) {
  :root { --bottom-nav-height: 56px; }
  #nav-container {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    height: var(--bottom-nav-height);
    z-index: 180; /* abaixo do player (200) */
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0 !important;
    margin: 0 !important;
  }
  #nav-container.icon-only .nav-btn {
    height: var(--bottom-nav-height) !important;
    border-radius: 0 !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
  /* Esconder setas de navegação no header em mobile (agora vivem na nav inferior) */
  #nav-back-btn, #nav-forward-btn { display: none !important; }
}

.nav-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease;
    white-space: nowrap;
    font-size: 0.85rem;
    flex-shrink: 0;
    min-width: fit-content;
    scroll-snap-align: center;
    box-shadow: 0 1px 2px var(--shadow);
    font-weight: 500;
}

.nav-btn:hover, .nav-btn.active { border-color: var(--accent); box-shadow: 0 2px 8px var(--shadow); }

.nav-btn:active {
    transform: translateY(1px);
}

.nav-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent), 0 2px 10px var(--shadow); }

/* Icon-only navigation variant */
.nav-container.icon-only .nav-btn { width: 44px; height: 44px; padding: 0; font-size: 0; display: inline-flex; align-items: center; justify-content: center; }
.nav-container.icon-only .nav-btn::before { content: attr(data-icon); font-size: 1.1rem; }

/* Agrupador à direita na barra inferior para Voltar/Avançar */
#nav-container .nav-right-cluster { margin-left: auto; display: inline-flex; gap: 0.5rem; }
@media (max-width: 767.98px) {
  #nav-container.icon-only .nav-right-cluster .nav-btn {
    height: var(--bottom-nav-height) !important;
    border-radius: 0 !important;
    flex: 0 0 auto !important; /* não esticar os botões de setas */
  }
}

/* --- Secções e Títulos --- */
.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e90ff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Fontes personalizadas */
@font-face {
    font-family: 'Gugi';
    src: url('../../assets/Fonts/bm_space/DotGothic16,Geo,Gugi,Lato,Syne_Mono,etc/Gugi/Gugi-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Tektur-Bold';
    src: url('../../assets/Fonts/bm_space/DotGothic16,Geo,Gugi,Lato,Syne_Mono,etc/Tektur/static/Tektur-Bold.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'SyneMono';
    src: url('../../assets/Fonts/bm_space/DotGothic16,Geo,Gugi,Lato,Syne_Mono,etc/Syne_Mono/SyneMono-Regular.ttf') format('truetype');
    font-display: swap;
}

/* Aplicação das fontes */
/* Títulos principais */
.section-title,
.header-title h1,
h1, h2, h3 { 
    font-family: 'Gugi', 'Space Grotesk', var(--font-primary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Reset de pesos de fonte para um visual mais fino */
* {
    font-weight: 400 !important;
}

/* Carregar Lato Light */
@font-face {
    font-family: 'Lato-Light';
    src: url('../../assets/Fonts/bm_space/DotGothic16,Geo,Gugi,Lato,Syne_Mono,etc/Lato/Lato-Light.ttf') format('truetype');
    font-display: swap;
}

/* Textos normais */
body, p, .track-info, .track-meta,
.track-description, .card-description {
    font-family: 'Lato-Light', 'Lato', 'Space Grotesk', var(--font-primary) !important;
    font-weight: 400 !important;
    line-height: 1.6;
    letter-spacing: 0.5px;
    color: #e0e0e0;
}

/* --- Performance: defer rendering of large grids until scrolled into view --- */
/* Helps on low-end mobiles by reducing initial layout/paint work */
.track-grid,
.videos-grid,
#releases-grid,
#artists-grid,
#music-results-tracks-grid,
#music-results-artists-grid,
#music-results-releases-grid,
#music-results-videos-grid {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

/* Reduzir/Desativar animações em dispositivos com reduce-motion ou Modo de Dados */
body.reduce-motion *,
body.lite * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Estilo específico para os cartões */
.track-card, .track-card *,
.release-card, .release-card *,
.artist-card, .artist-card *,
.playlist-grid *, .track-grid * {
    font-family: 'Lato-Light', 'Lato', 'Space Grotesk', var(--font-primary) !important;
    font-weight: 400 !important;
    line-height: 1.5;
    letter-spacing: 0.3px;
    color: #e0e0e0;
}

/* Títulos dentro dos cartões */
.track-card .track-title,
.release-card .release-title,
.artist-card .artist-name {
    font-family: 'Lato', 'Space Grotesk', var(--font-primary) !important;
    font-weight: 500 !important;
    color: #fff;
    margin: 0.25rem 0;
}

/* Texto secundário nos cartões */
.track-card .track-artist,
.track-card .track-meta,
.release-card .release-meta,
.artist-card .artist-meta {
    font-family: 'Lato-Light', 'Lato', 'Space Grotesk', var(--font-primary) !important;
    font-weight: 300 !important;
    color: #b0b0b0;
    font-size: 0.9em;
    letter-spacing: 0.2px;
}

/* Títulos principais */
.section-title,
.header-title h1,
h1, h2, h3 { 
    font-family: 'Gugi', 'Space Grotesk', var(--font-primary) !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px;
}

/* Destaques sutis */
.track-card .track-title,
.release-card .release-title,
.artist-card .artist-name,
.section-title,
.header-title h1,
h1, h2, h3 {
    color: #fff;
}

/* Botões - um pouco mais destacados, mas ainda finos */
button, .btn, .action-btn, .tab-btn, .nav-btn {
    font-weight: 450 !important;
}

/* Textos normais adicionais */
.track-info, .track-meta, .track-description, .card-description {
    font-family: 'SyneMono', 'Space Grotesk', var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.5px;
    color: #e0e0e0; /* Cor mais clara para melhor contraste */
}

/* Destaques e botões */
button, .btn, .action-btn,
#admin-tabs .admin-tab {
    font-family: 'Tektur-Bold', 'Space Grotesk', var(--font-primary);
}

/* Seção inicial */
#home-section .section-header h3,
#home-section h1,
#home-section h2,
#home-section h3 { 
    font-family: 'Geo', 'Space Grotesk', var(--font-primary) !important;
    color: inherit !important;
    font-size: 22px !important;
    font-weight: 400;
    letter-spacing: 0.8px;
    text-transform: none;
    line-height: 1.2;
}

/* Ocultar títulos apenas nas secções principais (manter nos detalhes) */
#library-section > .section-title,
#music-section > .section-title,
#releases-section > .section-title,
#artists-section > .section-title,
#videos-section > .section-title,
#fm-section > .section-title,
#about-section > .section-title,
#news-section > .section-title { display: none; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.home-featured { margin-bottom: 1rem; display: grid; grid-template-columns: repeat(2, minmax(120px, 160px)); gap: 1rem; justify-content: start; }
.featured-card-container { display: flex; flex-direction: column; gap: 0.5rem; }
.featured-card { position: relative; background: #111; background-size: cover; background-position: center; border: 1px solid var(--border); border-radius: 12px; min-height: 120px; overflow: hidden; box-shadow: 0 4px 14px var(--shadow); aspect-ratio: 1 / 1; }
.featured-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 35%, rgba(0,0,0,0.6) 100%); }
.featured-content { position: relative; z-index: 1; padding: 1rem; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem; height: 100%; }
.feat-eyebrow { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.feat-title { font-size: 1.15rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.feat-sub { color: #ddd; font-size: 0.95rem; }
.feat-meta { font-size: 0.8rem; color: #cfd8e3; }
.feat-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; justify-content: flex-start; }
/* Destaques: botões pequenos consistentes com os action-btn dos cartões */
.feat-actions .btn { min-height: 36px; padding: 6px 10px; border-radius: 8px; box-shadow: 0 1px 2px var(--shadow); }
.feat-actions .btn-ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.feat-actions .btn-ghost:hover { border-color: var(--accent); background: rgba(30,144,255,0.08); }
.feat-actions .btn-primary { box-shadow: 0 1px 2px var(--shadow); }
@media (min-width: 1024px) {
  .home-featured { grid-template-columns: repeat(2, minmax(240px, 320px)); }
  .featured-card { min-height: 240px; }
  .featured-card-container { gap: 0.75rem; }
}

/* Estilos para telas menores */
@media (max-width: 767.98px) {
  .feat-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .feat-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Carrossel de Releases (Swiper.js) --- */
.featured-swiper { width: 100%; height: auto; padding-bottom: 12px; margin-bottom: 1rem; overflow: visible; }
.featured-swiper .swiper-slide { height: auto; }
.featured-swiper .track-card { margin: 0; width: 100%; height: auto; display: flex; flex-direction: column; }
.featured-swiper .track-cover { width: 100%; height: auto; aspect-ratio: 1 / 1; background-size: cover; background-position: center; border-radius: 4px; }
.featured-swiper .swiper-button-prev,
.featured-swiper .swiper-button-next { color: var(--accent); top: 40%; }
.featured-swiper .swiper-pagination-bullet { background: var(--accent); opacity: 0.5; }
.featured-swiper .swiper-pagination-bullet-active { opacity: 1; }

@media (min-width: 768px) {
  .gtk-swiper .swiper-slide { width: 120px; }
  .featured-swiper .swiper-slide { height: auto; }
}
@media (min-width: 1024px) {
  .gtk-swiper .swiper-slide { width: 140px; }
  .featured-swiper .swiper-slide { height: auto; }
  .dd-swiper .swiper-slide { height: auto; }
}

/* --- Hot (Recém‑Descoberto) & Deep Dive Swipers --- */
.hot-swiper, .discover-swiper, .dd-swiper { width: 100%; height: auto; padding-bottom: 12px; margin-bottom: 0.75rem; overflow: visible; }
.hot-swiper .swiper-slide, .discover-swiper .swiper-slide { height: auto; }
.hot-swiper .track-card, .discover-swiper .track-card, .dd-swiper .track-card { margin: 0; width: 100%; height: auto; display: flex; flex-direction: column; }
.hot-swiper .track-cover, .discover-swiper .track-cover { width: 100%; aspect-ratio: 1 / 1; background-size: cover; background-position: center; border-radius: 4px; }
.discover-swiper .track-cover.mystery { filter: blur(2.5px) saturate(0.8); }
.dd-level #dd-swiper-0 .track-cover, #dd-level-0 .track-card .track-cover { filter: none !important; }
.track-grid > .dd-swiper { grid-column: 1 / -1; width: 100%; }
.dd-level > .dd-swiper { width: 100%; }
/* Larguras dos cartões no Deep Dive (compacto, próximo da secção Música) */
.dd-swiper .swiper-slide { height: auto; }
@media (min-width: 768px) {
  .hot-swiper .swiper-slide, .discover-swiper .swiper-slide { height: auto; }
  .dd-swiper .swiper-slide { height: auto; }
}
@media (min-width: 1024px) {
  .hot-swiper .swiper-slide, .discover-swiper .swiper-slide { height: auto; }
  .dd-swiper .swiper-slide { height: auto; }
}

/* Navegação mais visível mas discreta nos níveis */
.dd-swiper .swiper-button-prev,
.dd-swiper .swiper-button-next {
  color: var(--accent);
  top: 42%;
  width: 28px;
  height: 28px;
}

body.perf-low .swiper,
body.lite .swiper { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scrollbar-width: none; }
body.perf-low .swiper::-webkit-scrollbar,
body.lite .swiper::-webkit-scrollbar { display: none; }
body.perf-low .swiper .swiper-wrapper,
body.lite .swiper .swiper-wrapper { display: flex; gap: 8px; width: auto; transform: none !important; }
body.perf-low .swiper .swiper-slide,
body.lite .swiper .swiper-slide { flex: 0 0 auto; scroll-snap-align: start; width: 160px; }
@media (min-width: 480px) {
  body.perf-low .swiper .swiper-slide,
  body.lite .swiper .swiper-slide { width: 180px; }
}
@media (min-width: 768px) {
  body.perf-low .swiper .swiper-slide,
  body.lite .swiper .swiper-slide { width: 200px; }
}
body.perf-low .swiper .swiper-button-prev,
body.perf-low .swiper .swiper-button-next,
body.perf-low .swiper .swiper-pagination,
body.lite .swiper .swiper-button-prev,
body.lite .swiper .swiper-button-next,
body.lite .swiper .swiper-pagination { display: none !important; }

@media (max-width: 520px) {
  .track-card { border-radius: 8px; }
  .track-cover { border-radius: 8px 8px 0 0; }
  .track-info { padding: 0.3rem; }
  .track-title { font-size: 0.8rem; line-height: 1.3; height: calc(1.3em * 2); }
  .track-card .track-artist { font-size: 0.72rem; }
  .track-grid { gap: 0.45rem; }
}

/* --- Deep Dive Progress --- */
.dd-progress-bar { position: relative; height: 6px; background: var(--border); border-radius: 6px; margin-top: 6px; overflow: hidden; }
.dd-progress-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #1e90ff, #76e4f7); border-radius: 6px; }
.dd-progress-bar .label { display: inline-block; margin-top: 4px; font-size: 0.72rem; color: var(--muted); }

.dd-group-progress { margin: -0.35rem 0 0.5rem; }
.dd-progress-agg { position: relative; height: 8px; background: var(--border); border-radius: 9999px; overflow: hidden; }
.dd-progress-agg .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #ffd35f, #ff765f); }
.dd-progress-agg-label { margin-top: 4px; font-size: 0.8rem; color: var(--muted); }

.section-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e90ff;
}

.view-all-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px var(--shadow);
}

.view-all-btn:hover { border-color: var(--accent); box-shadow: 0 2px 10px var(--shadow); }

.section-subtitle {
    color: #b3b3b3;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.back-btn {
    background: none;
    border: none;
    color: #1e90ff;
    font-size: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

/* --- Pesquisa --- */
.search-container {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #666666;
}

.search-input:focus {
    border-color: #1e90ff;
    background: #222222;
}

/* --- Grid de Músicas/Artistas --- */
.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    justify-content: start;
}

#artists-section #artists-grid.track-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (min-width: 768px) { #artists-section #artists-grid.track-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
@media (min-width: 1024px) { #artists-section #artists-grid.track-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
#music-section .track-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
@media (min-width: 768px) { #music-section .track-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (min-width: 1024px) { #music-section .track-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

/* Home search results: unificar com Randomizer */
#search-tracks.track-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 768px) { #search-tracks.track-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (min-width: 1024px) { #search-tracks.track-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

/* Unificar tamanhos dos cartões aleatórios (Home) com Deep Dive/Música */
#random-tracks.track-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 140px)); }
@media (min-width: 768px) { #random-tracks.track-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 150px)); } }
@media (min-width: 1024px) { #random-tracks.track-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 160px)); } }

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 250px));
    gap: 1rem;
    justify-content: start;
}

/* Playlists: tornar cartões clicáveis visualmente */
.playlist-grid .track-card { cursor: pointer; }

/* Playlists mais compactas no mobile */
@media (max-width: 520px) {
  /* Nav perfeitamente centrada em mobile */
  .nav-container { padding: 0; justify-content: center; }
  .nav-container.icon-only { justify-content: center; }

  .playlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playlist-grid .track-card { padding: 0.85rem; }
  .playlist-grid .track-cover { width: 80px; height: 80px; }
  .playlist-grid .track-card .track-actions { justify-content: space-between; flex-wrap: wrap; width: 100%; }
  .playlist-grid .track-card .action-btn { width: 32px; height: 32px; padding: 0; }
  .playlist-grid .track-card .track-info { min-height: 2.2em; }
  .playlist-grid .track-title { font-size: 0.85rem; }
  .playlist-grid .track-artist { font-size: 0.75rem; }
  .track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  #random-tracks.track-grid,
  #search-tracks.track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .track-card { width: 100%; max-width: 100%; height: 100%; }
  /* Garantir 2 colunas na secção Música */
  #music-section .track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.5rem; }

  /* Featured mais compacto e sem cortes */
  .home-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .home-featured > .featured-card { aspect-ratio: 1 / 1; height: auto; min-height: 0; background-size: cover; background-position: center; }
  .featured-content { padding: 0.6rem; gap: 0.25rem; }
  .feat-title { font-size: 1rem; }
  .feat-sub { display: none; }
  .feat-meta { font-size: 0.75rem; }
  .feat-actions { margin-top: 0.15rem; gap: 0.35rem; }
  .feat-actions .btn { min-height: 32px; padding: 0.4rem 0.6rem; }
}

/* --- Card de Música/Artista/Playlist --- */
.track-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    cursor: default;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    position: relative;
}
.track-card { height: 100%; }

.track-card:hover { background: var(--surface-2); }

.track-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: var(--border);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0;
    overflow: hidden;
    cursor: pointer;
}

/* Centrar apenas nos cartões em grelha, não na lista */
.track-card > .track-cover { margin-left: 0; margin-right: 0; }

/* Playlists: capas centradas (cartões maiores suportam melhor) */
.playlist-grid .track-card > .track-cover { margin-left: auto; margin-right: auto; }

.track-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.track-info {
    width: 100%;
    overflow: hidden;
    padding: 0.4rem;
}

.track-title {
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    line-height: 1.3;
    height: calc(1.3em * 2); /* reservar 2 linhas para alinhar o artista */
}

/* Título com link: manter cor original e sem sublinhado (sublinhar no hover) */
.track-title a { color: inherit; text-decoration: none; }
.track-title a:hover { text-decoration: underline; }

.track-artist {
    font-size: 0.75rem;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.artist-link { background: none; border: none; color: #1e90ff; cursor: pointer; padding: 0; font: inherit; text-decoration: none; }
.artist-link:hover { text-decoration: underline; }

/* --- Artist Card (consistente com track-card) --- */
.artist-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}
.artist-card:hover { background: var(--surface-2); }
.artist-avatar {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px 12px 0 0;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text);
    margin: 0;
    overflow: hidden;
}
.artist-info { width: 100%; overflow: hidden; padding: 0.5rem; }
.artist-name { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-meta { font-size: 0.8rem; color: #b3b3b3; }

/* Deep Dive visual: neutral grid + subtle cosmic motion, masking outer blue */
#deep-dive-section { position: relative; isolation: isolate; background: var(--bg); border: 1px solid var(--border); border-radius: 0; padding: 0.75rem; margin-left: -8px; margin-right: -8px; }
#deep-dive-section::before { content: ''; position: absolute; inset: -16px; pointer-events: none; z-index: 0; background-image:
  repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0, rgba(255,255,255,.028) 1px, transparent 1px, transparent 38px),
  repeating-linear-gradient(90deg, rgba(255,255,255,.028) 0, rgba(255,255,255,.028) 1px, transparent 1px, transparent 38px);
}
#deep-dive-section::after { content: ''; position: absolute; inset: -16px; pointer-events: none; z-index: 0; background-image:
  radial-gradient(60% 40% at 50% 0%, rgba(255,255,255,.06) 0%, rgba(0,0,0,0) 70%),
  radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,.45) 0 1px, transparent 2px),
  radial-gradient(1px 1px at 80% 35%, rgba(255,255,255,.35) 0 1px, transparent 2px),
  radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,.25) 0 1px, transparent 2px);
  background-size: auto, 400px 300px, 420px 320px, 360px 260px;
  animation: dd-rad 10s ease-in-out infinite alternate, dd-stars 60s linear infinite;
}
#deep-dive-section > * { position: relative; z-index: 1; }
#deep-dive-section .section-title, #deep-dive-section .section-header h3 { color: var(--text); }
@keyframes dd-rad { from { transform: translateY(0); } to { transform: translateY(8px); } }
@keyframes dd-stars { 0% { background-position: 0 0, 0 0, 0 0, 0 0; } 100% { background-position: 0 0, 400px 0, -420px 0, 360px 0; } }

/* Deep Dive: per-level visibility rules */
#dd-level-0 .track-label { display: none; }
#dd-level-1 .track-info, #dd-level-1 .track-actions { display: none; }
#dd-level-2 .track-title, #dd-level-2 .track-artist { display: none; }
#dd-level-2 .track-label { display: block; }

/* Theme Deep Dive: remove the inner dark container to let global backdrop show */
body.theme-deep-dive #deep-dive-section {
  background: transparent !important;
  border: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
body.theme-deep-dive #deep-dive-section::before,
body.theme-deep-dive #deep-dive-section::after { display: none !important; }

/* --- Release Card (consistente com track-card) --- */
#deep-dive-section .dd-card { position: relative; background: rgba(15,15,22,.50); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; margin: 0.5rem 12px 0.75rem; backdrop-filter: saturate(110%) blur(3px); -webkit-backdrop-filter: saturate(110%) blur(3px); overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transition: border-color .2s ease, box-shadow .25s ease; }
@media (max-width: 480px) {
  #deep-dive-section .dd-card { margin-left: 8px; margin-right: 8px; }
}
body.theme-deep-dive #deep-dive-section .dd-card { background: rgba(8,8,14,.42); }
#deep-dive-section .dd-card:hover, #deep-dive-section .dd-card:focus-within { border-color: #a855f7; box-shadow: 0 0 0 1px rgba(168,85,247,.35) inset, 0 12px 28px rgba(168,85,247,.12); }
#deep-dive-section .dd-card .section-header { margin: 0 0 0.5rem 0; padding: 0; }
#deep-dive-section .dd-intro .section-title { margin-bottom: 0.25rem; }
#deep-dive-section .dd-intro .dd-howto ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }

/* Deep Dive foreground particles (over cards) */
body.theme-deep-dive #deep-dive-section.dd-fore { position: relative; }
body.theme-deep-dive #deep-dive-section.dd-fore::after {
  content: '';
  position: absolute;
  inset: -6px;
  pointer-events: none;
  z-index: 3;
  /* override previous hide */
  display: block !important;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,.55) 0 1px, transparent 2px),
    radial-gradient(1px 1px at 45% 65%, rgba(255,255,255,.45) 0 1px, transparent 2px),
    radial-gradient(1px 1px at 78% 32%, rgba(255,255,255,.40) 0 1px, transparent 2px),
    linear-gradient(120deg, transparent 0%, transparent 42%, rgba(168,85,247,.12) 50%, transparent 58%, transparent 100%),
    linear-gradient(70deg, transparent 0%, transparent 55%, rgba(0,255,209,.10) 60%, transparent 65%, transparent 100%);
  background-size:
    520px 360px,
    640px 420px,
    600px 440px,
    180% 160%,
    140% 140%;
  background-repeat: repeat;
  animation: dd-fore-stars 90s linear infinite, dd-fore-comets 16s linear infinite;
  mix-blend-mode: screen;
}
@keyframes dd-fore-stars { 0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; } 100% { background-position: 520px 0, -640px 0, 600px 0, 0 0, 0 0; } }
@keyframes dd-fore-comets { 0% { background-position: 0 0, 0 0, 0 0, -60% -40%, 80% -20%; } 100% { background-position: 0 0, 0 0, 0 0, 160% 140%, -60% 120%; } }

/* Low-power mode: disable DD particles */
body.perf-low #deep-dive-section.dd-fore::after { display: none !important; animation: none !important; }

/* Low-power Deep Dive: CSS grid fallback for levels (instead of Swiper) */
.dd-level-grid { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px) { .dd-level-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .dd-level-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .dd-level-grid { grid-template-columns: repeat(6, 1fr); } }

.release-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}
.release-card:hover { background: var(--surface-2); }
.release-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px 12px 0 0;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
}
.release-cover-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.release-info { width: 100%; overflow: hidden; padding: 0.5rem; }
.release-title {
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    line-height: 1.25;
    height: calc(1.25em * 2); /* reservar 2 linhas para alinhar o artista */
}
.release-meta { font-size: 0.8rem; color: #b3b3b3; }
#music-section .music-group { margin: 0.25rem 0; }
#music-section .music-group.music-box {
  background: rgba(15,15,22,.18);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 1px 6px var(--shadow);
}
#music-section .music-group.music-box .section-header { margin-bottom: 0.5rem; }

.music-swiper { width: 100%; height: auto; padding-bottom: 8px; margin-bottom: 0.5rem; overflow: visible; }
.music-swiper .swiper-slide { height: auto; width: 160px; }
@media (max-width: 1024px) { .music-swiper .swiper-slide { width: 150px; } }
@media (max-width: 768px)  { .music-swiper .swiper-slide { width: 140px; } }
.music-swiper .swiper-button-prev,
.music-swiper .swiper-button-next { color: var(--accent); top: 42%; }

#home-section .home-box { background: rgba(15,15,22,.18); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; box-shadow: 0 1px 6px var(--shadow); margin-bottom: 0.3rem; }
#home-section .home-box .section-header { margin-bottom: 0.5rem; }

/* Staff Picks: card left + text right, equal heights */
#home-staffpicks { display: block; }
#home-staffpicks .sp-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  grid-template-areas: 'img content';
  gap: 0.5rem;
  align-items: stretch;
  position: relative;
  isolation: isolate;
}
#home-staffpicks .sp-wrap > .featured-card { grid-area: img; min-width: 0; align-self: start; height: auto; }
#home-staffpicks .sp-wrap > .sp-desc { grid-area: content; min-width: 0; min-height: 0; overflow: hidden; }
#home-staffpicks .sp-wrap .featured-card { min-height: 160px; }
#home-staffpicks .sp-desc { display: grid; grid-template-rows: auto 1fr auto; gap: 0.35rem; text-align: right; align-items: end; }
#home-staffpicks .sp-actions { display: flex; gap: 0.5rem; justify-content: flex-end; justify-self: stretch; width: 100%; }
#home-staffpicks .sp-wrap .featured-card { position: relative; z-index: 0; }
#home-staffpicks .sp-desc { position: relative; z-index: 2; }
@media (max-width: 640px) {
  #home-staffpicks .sp-wrap { grid-template-columns: 1fr; }
  #home-staffpicks .sp-actions { justify-content: flex-end; }
}

/* Reusable side-by-side card layout (image left, text/actions right) */
.sidecard-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  grid-template-areas: 'img content';
  gap: 0.5rem;
  align-items: stretch;
  position: relative;
  isolation: isolate;
}
.sidecard-wrap > .featured-card { grid-area: img; min-width: 0; align-self: start; height: auto; }
.sidecard-wrap > .sidecard-desc { grid-area: content; min-width: 0; min-height: 0; overflow: hidden; }
.sidecard-wrap .featured-card { min-height: 160px; }
.sidecard-desc { display: grid; grid-template-rows: auto 1fr auto; gap: 0.35rem; text-align: right; align-items: end; }
.sidecard-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; justify-self: stretch; width: 100%; }
.sidecard-wrap .featured-card { position: relative; z-index: 0; }
.sidecard-desc { position: relative; z-index: 2; }
/* Align featured images across Staff Picks and Get to Know, and avoid cropping */
#home-staffpicks .sp-wrap .featured-card,
.sidecard-wrap .featured-card {
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* In GTK boxes, neutralize the grid styles of .home-featured */
#home-gtk-box .home-featured,
#home-gtk-release-box .home-featured { display: block; margin-bottom: 0; }
/* clamps para manter alturas consistentes com Staff Picks */
#home-staffpicks .sp-title { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; line-clamp: 2; }
#home-staffpicks .sp-text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 4; line-clamp: 4; }
.sidecard-desc .sp-title { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; line-clamp: 2; }
.sidecard-desc .sp-text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 4; line-clamp: 4; }
.sidecard-desc .feat-sub { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; line-clamp: 2; }
.sidecard-desc .feat-meta { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 1; line-clamp: 1; }

/* Tipografia base partilhada */
.sp-title { font-size: 1.05rem; font-weight: 700; color: #fff; }
.sp-text  { font-size: 0.9rem; color: #cfd8e3; }
@media (max-width: 640px) {
  .sidecard-wrap { grid-template-columns: 1fr; }
  .sidecard-actions { justify-content: flex-end; }
}

/* Equal image column widths on larger screens for consistent image size */
@media (min-width: 768px) {
  #home-staffpicks .sp-wrap { grid-template-columns: 260px 1fr; }
  .sidecard-wrap { grid-template-columns: 260px 1fr; }
  /* Equalize vertical height across wrappers so actions align */
  #home-staffpicks .sp-wrap,
  .sidecard-wrap { min-height: 240px; }
}
@media (min-width: 1024px) {
  #home-staffpicks .sp-wrap { grid-template-columns: 280px 1fr; }
  .sidecard-wrap { grid-template-columns: 280px 1fr; }
  /* Equalize vertical height across wrappers so actions align */
  #home-staffpicks .sp-wrap,
  .sidecard-wrap { min-height: 260px; }
}

/* Curation row: 1 col mobile, 2 cols tablet, 3 cols desktop */
.curation-row { display: grid; gap: 0.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .curation-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .curation-row { grid-template-columns: 1fr 1fr 1fr; align-items: stretch; }
}

/* Make each home-box in the curation row equal height and let content stretch */
.curation-row > .home-box { display: flex; flex-direction: column; position: relative; overflow: hidden; }
.curation-row > .home-box .home-featured { flex: 1 1 auto; display: block; margin-bottom: 0; }

/* Ensure internal wraps stretch to fill height so actions can anchor to bottom */
#home-staffpicks .sp-wrap, .sidecard-wrap { height: 100%; }
.sidecard-desc, #home-staffpicks .sp-desc { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.sidecard-actions, #home-staffpicks .sp-actions { margin-top: auto; }

/* Amplify active state of nav buttons with a clear blue border like before */
.nav-btn.active { border-color: var(--accent) !important; border-width: 2px !important; box-shadow: 0 0 0 1px rgba(30,144,255,0.5), 0 2px 8px var(--shadow) !important; }

/* Mobile layout refinements for Home featured tiles (até 768px) */
@media (max-width: 767.98px) {
  /* Staff Picks: imagem quadrada fixa à esquerda (120px) e conteúdo à direita */
  #home-staffpicks .sp-wrap { grid-template-columns: 120px 1fr; gap: 10px; align-items: stretch; }
  #home-staffpicks .sp-wrap .featured-card { width: 100%; aspect-ratio: 1 / 1; height: auto; min-height: 0; border-radius: 10px; background-size: cover; background-position: center; }
  #home-staffpicks .sp-desc { display: grid; grid-template-rows: auto 1fr auto; align-items: start; min-height: 120px; height: auto; overflow: hidden; }
  #home-staffpicks .sp-actions { margin-top: auto; }

  /* Discover & Get To Know (sidecards): mesma lógica que Staff Picks */
  .sidecard-wrap { grid-template-columns: 120px 1fr; gap: 8px; align-items: stretch; }
  .sidecard-wrap .featured-card { width: 100%; aspect-ratio: 1 / 1; height: auto; min-height: 0; border-radius: 10px; background-size: cover; background-position: center; }
  .sidecard-desc { display: grid; grid-template-rows: auto 1fr auto; align-items: start; min-height: 120px; height: auto; overflow: hidden; gap: 2px; }
  .sidecard-actions { margin-top: auto; }

  /* Box global mais compacto em mobile */
  #home-section .home-box { padding-bottom: 0.1rem; margin-bottom: 0.15rem; }
  #home-section .home-box .section-header { margin-bottom: 0.35rem; }

  /* Ações coladas ao fundo dentro dos 120px (paridade com Staff Picks) */
  /* Mantemos o default (margin-top:auto) definido acima */
  /* Nenhum override aqui para evitar espaço extra dentro da caixa */

  /* Reduzir número de linhas em mobile para compactar ainda mais */
  #home-staffpicks .sp-text { -webkit-line-clamp: 3; line-clamp: 3; }
  .sidecard-desc .sp-title { -webkit-line-clamp: 1; line-clamp: 1; }
  .sidecard-desc .sp-text { -webkit-line-clamp: 2; line-clamp: 2; }
  .sidecard-desc .feat-eyebrow { font-size: 0.7rem; }
  #home-gtk-box .sidecard-desc .sp-text { display: none !important; }
  .sidecard-actions { flex-wrap: nowrap; gap: 6px; }
  .sidecard-actions .btn { min-height: 30px; padding: 4px 8px; font-size: 0.85rem; }

  /* Evitar qualquer estiramento vertical nas caixas em mobile */
  .curation-row > .home-box { display: block !important; }
  .curation-row > .home-box .home-featured { flex: 0 0 auto !important; }
}

/* Unified actions styling across Staff Picks and sidecards */
.sp-actions, .sidecard-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: stretch;
  width: 100%;
}
.sp-actions .btn, .sidecard-actions .btn {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
}

/* Generic horizontal scroll row (admin/curation) */
.hscroll-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.hscroll-row > * { scroll-snap-align: start; flex: 0 0 auto; }
.hscroll-row .card-min { min-width: 140px; width: 140px; }
@media (max-width: 1024px) { .hscroll-row .card-min { min-width: 130px; } }
@media (max-width: 768px)  { .hscroll-row .card-min { min-width: 120px; } }

/* Forçar tamanho dos cartões na lista Admin Releases */
#admin-releases-list .track-card { width: 140px; }

/* Release details header */
.release-header { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.release-cover-large { width: 200px; height: 200px; border-radius: 12px; background: var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.release-cover-large-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.release-title-large { font-size: 1.2rem; font-weight: 700; color: #fff; }
.release-meta-text { color: #b3b3b3; font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; }
.release-meta-line { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.meta-separator { opacity: 0.6; }
.release-actions { display: flex; gap: 0.5rem; margin: 0.75rem 0; }

/* Artist details header */
.artist-header { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.artist-avatar-large { width: 200px; height: 200px; border-radius: 12px; background: var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 2.5rem; color: var(--text); }
.artist-title-large { font-size: 1.2rem; font-weight: 700; color: #fff; }
.artist-meta-text { color: #b3b3b3; font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; }
.artist-meta-line { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Chips and filters panel */
.chips-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.chip { background: var(--surface); border: 1px solid var(--border); padding: 0.25rem 0.5rem; border-radius: 9999px; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.25rem; }
.chip button { background: none; border: none; color: #bbb; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; }

.filters-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; box-shadow: 0 4px 16px var(--shadow); margin-bottom: 0.75rem; }
.filters-header { display: none; }
.filters-title { color: #1e90ff; font-weight: 600; }
.filters-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; }
.filter-group { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; }
.filter-label { display: none; }
.filter-label { color: #b3b3b3; font-size: 0.9rem; }
.filter-check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; }
.facet-list { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem; background: var(--surface-2); }
.filter-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Desktop: filtros mais compactos e sem título */
@media (min-width: 1024px) {
  .filters-header { display: none; }
  .filters-panel { padding: 0.5rem; }
  .filters-body { gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .filter-group { gap: 0.35rem 0.5rem; }
  .filter-check { font-size: 0.9rem; }
}

/* Library tabs in one row, centered */
.library-tabs { display: flex; gap: 0.5rem; justify-content: center; align-items: center; flex-wrap: nowrap; overflow-x: auto; }
.library-tab-btn { white-space: nowrap; }

/* Upload subtabs (Label Admin) */
#label-admin-upload-tabs .upload-subtab { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
#label-admin-upload-tabs .upload-subtab.active { border-color: var(--accent); background: rgba(30,144,255,0.08); box-shadow: 0 2px 10px var(--shadow); }

/* Track rows (Upload) */
#label-admin-upload-tracks .track-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
}
#label-admin-upload-tracks .track-row:hover { border-color: var(--accent); }
#label-admin-upload-tracks .track-row.dragging { opacity: 0.9; border-color: var(--accent); box-shadow: 0 4px 16px var(--shadow); }

.track-duration { font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; }
.track-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }

/* Ações nos cartões: abaixo do artista */
.track-card .track-actions { position: static; margin-top: auto; padding: 0.5rem; display: flex; gap: 6px; justify-content: center; width: 100%; }
/* Ações padrão (sobreposição) continuam para outros contextos */
.track-actions { position: absolute; top: 5px; right: 5px; display: flex; gap: 5px; }

.action-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px var(--shadow);
}

.action-btn:hover { border-color: var(--accent); box-shadow: 0 2px 10px var(--shadow); }
.action-btn:active { transform: translateY(1px); }

/* --- Lista de Músicas (Recentes, Detalhes) --- */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-list.collapsed > .track-item:nth-child(n+7) { display: none; }
.release-tracklist .tracklist-toggle { margin-top: 0.25rem; display: flex; justify-content: flex-end; }

.track-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.track-item:hover { background: var(--surface-2); }

.track-number { font-size: 1rem; color: var(--muted); margin-right: 1rem; width: 20px; text-align: center; }

.track-item .track-cover {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.track-item .track-info {
    flex-grow: 1;
    min-width: 0;
}

.track-item .track-duration {
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Ações dos itens horizontais: alinhadas à direita, sem posição absoluta */
.track-item .track-actions {
    position: static;
    display: flex;
    gap: 6px;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

/* --- Eventos --- */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.event-date {
    font-size: 0.85rem;
    color: #b3b3b3;
}

.event-btn,
.create-playlist-btn,
.play-playlist-btn {
    background: var(--accent);
    color: var(--accent-contrast);
    border: 1px solid var(--accent);
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.06s ease, filter 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(30,144,255,0.35);
}

.event-btn:hover,
.create-playlist-btn:hover,
.play-playlist-btn:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(30,144,255,0.4); }

.event-btn:active,
.create-playlist-btn:active,
.play-playlist-btn:active {
    transform: translateY(1px);
}

/* Shotgun Events Listing theme overrides */
#shotgun-events-listing {
    --shotgun-muted: #f4f4f5;
    --shotgun-accent: #f4f4f5;
    --shotgun-accent-foreground: #ff765f;
    --shotgun-border: #e4e4e7;
    --shotgun-foreground: #ffffff;
}

/* Compactar a listagem na Home */
.events-section #shotgun-events-listing {
    max-height: clamp(300px, 48vh, 420px);
    overflow: auto;
}

#shotgun-widget-container iframe {
    width: 100%;
    height: 800px;
    max-height: calc(100vh - 200px);
    border: 0;
}

#shotgun-past-events iframe {
    width: 100%;
    height: 800px;
    max-height: calc(100vh - 200px);
    border: 0;
    margin-top: 1rem;
}

/* --- Sociais --- */
.socials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.social-card {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-card:hover {
    background: #222222;
    border-color: #1e90ff;
}

.social-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.social-name {
    font-weight: 600;
    font-size: 1rem;
}

.social-handle {
    font-size: 0.8rem;
    color: #b3b3b3;
}

/* --- Vídeos --- */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: background 0.2s ease; }

.video-card:hover { background: var(--surface-2); }

.video-thumbnail { height: 150px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--text); background-color: var(--border); }

.video-info {
    padding: 1rem;
}

.video-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-stats {
    font-size: 0.8rem;
    color: #b3b3b3;
}

/* --- Player --- */
.player-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-grow: 1;
    min-width: 0;
    grid-column: 1;
    grid-row: 1 / span 2;
    text-align: left;
}

/* Fundo dinâmico do player (blur da capa + overlay) */
.player { overflow: hidden; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 0.5rem; }
.player::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--player-bg, none);
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.25);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}
.player::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 70% at 50% 0%, rgba(30,144,255,0.12) 0%, rgba(0,0,0,0) 60%), var(--player-overlay-grad);
    z-index: 1;
    pointer-events: none;
}
.player > * { position: relative; z-index: 2; }
.player.expanded::after { opacity: 0.45; }

.player-cover {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.player-details {
    overflow: hidden;
    white-space: nowrap;
}

.player-title { font-size: 0.9rem; font-weight: 600; text-overflow: ellipsis; overflow: hidden; }

.player-artist { font-size: 0.8rem; color: var(--muted); text-overflow: ellipsis; overflow: hidden; }

.player.playing .player-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 9999px; background: #1ed760; margin-right: 6px; vertical-align: middle; }

.player-controls { display: flex; gap: 0.5rem; margin: 0 1rem; flex-shrink: 0; grid-column: 2; grid-row: 1; justify-self: center; }

.control-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 1px 2px var(--shadow);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease, filter 0.2s ease;
}

.control-btn:hover { border-color: var(--accent); box-shadow: 0 2px 10px var(--shadow); }
.control-btn:active { transform: translateY(1px); }

.next-with-badges { position: relative; display: inline-flex; align-items: center; }
.queue-badge { position: absolute; top: -6px; right: -6px; background: #ff765f; color: #000; font-weight: 700; border-radius: 9999px; font-size: 0.7rem; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.3); box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.queue-badge.queue { right: -6px; top: 14px; background: #1e90ff; color: #fff; border-color: rgba(255,255,255,0.2); }

.control-btn.play-pause {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(30,144,255,0.35);
    border-radius: 14px;
}

/* Ordem dos controlos no rodapé minimizado */
.player-controls > .control-btn.shuffle { order: 10; }
.player-controls > .control-btn:first-child { order: 20; }
.player-controls > .control-btn.play-pause { order: 30; }
.player-controls > .next-with-badges { order: 40; }
.player-controls > .control-btn.chat { order: 50; }

/* Ocultar shuffle/repeat no player minimizado para evitar clutter/overlap */
.player .control-btn.shuffle,
.player .control-btn.repeat,
.player .control-btn.buy { display: none; }
.player.expanded .control-btn.shuffle,
.player.expanded .control-btn.repeat,
.player.expanded .control-btn.buy { display: inline-flex; }

/* Mostrar shuffle também no player minimizado (apenas desktop) */
@media (min-width: 768px) {
  .player:not(.expanded) .control-btn.shuffle { display: inline-flex; }
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
}

.volume-slider {
    width: 80px;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #333333;
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background-color: currentColor;
    color: #1e90ff;
    cursor: pointer;
    border: 1px solid var(--border);
    /* Speaker icon mask */
    -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/volume-2.svg');
    mask-image: url('https://unpkg.com/lucide-static@latest/icons/volume-2.svg');
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 80% 80%; mask-size: 80% 80%;
}

.progress-container {
    display: none; /* Escondido no player minimizado */
    width: 100%;
    margin-top: 1rem;
}

.player.expanded .progress-container {
    display: block;
    position: sticky;
    top: 12px;
    z-index: 5;
    background: var(--player-overlay-grad);
    backdrop-filter: blur(2px);
    padding-top: 0.25rem;
}

.progress-bar { height: 12px; background: var(--border); border-radius: 6px; cursor: pointer; margin-bottom: 0.5rem; position: relative; }

.progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 6px; transition: width 0.1s linear; pointer-events: none; }

.progress-time { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }

.close-expanded {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
}

.player.expanded .close-expanded {
    display: block;
}

.player.expanded::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: #2a2a2a;
    opacity: 0.9;
}

.player.expanded .player-info {
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin-bottom: 2rem;
}

/* Expanded: stack sections and pin controls to bottom; progress above controls */
.player.expanded { display: flex; flex-direction: column; overflow-x: hidden; overflow-y: hidden; align-items: center; touch-action: pan-y; overscroll-behavior: none; }
.player.expanded .player-info { order: 10; }
.player.expanded .waveform { order: 30; }
.player.expanded .progress-container { order: 40; position: relative; top: auto; background: transparent; backdrop-filter: none; padding-top: 18px; }
.player.expanded .player-volume { order: 45; }
.player.expanded .player-controls { order: 50; margin-top: auto; }

.player.expanded .player-cover {
    width: 180px;
    height: 180px;
    font-size: 4rem;
    margin: 0 0 1rem 0;
}

.player.expanded .player-details {
    white-space: normal;
}

.player.expanded .player-controls { 
    margin: 2rem 0; 
    padding: 0 12px; 
    display: grid; 
    grid-template-columns: repeat(6, auto); 
    grid-auto-rows: auto; 
    gap: 12px 18px; 
    align-items: center; 
    justify-items: center; 
    justify-content: center; 
    width: max-content; 
    margin-inline: auto; 
}
.player.expanded #prev-btn { grid-row: 1; grid-column: 2; }
.player.expanded #play-btn { grid-row: 1; grid-column: 3 / span 2; }
.player.expanded .next-with-badges { grid-row: 1; grid-column: 5; }
.player.expanded .control-btn.shuffle { grid-row: 2; grid-column: 2; }
.player.expanded .control-btn.chat { grid-row: 2; grid-column: 3; }
.player.expanded .control-btn.buy { grid-row: 2; grid-column: 4; }
.player.expanded .control-btn.repeat { grid-row: 2; grid-column: 5; }
.player.expanded .progress-time { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.player.expanded .control-btn { width: 48px; height: 48px; font-size: 1.35rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 12px; }
.player.expanded .control-btn:hover { border-color: var(--accent); box-shadow: 0 2px 10px var(--shadow); background: var(--surface-2); }
.player.expanded .control-btn.play-pause { width: 60px; height: 60px; font-size: 1.4rem; background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

.player.expanded .player-volume {
    display: flex;
    justify-content: center;
    width: max-content;
    margin-inline: auto;
}
/* Hide external speaker icon in expanded volume row */
.player.expanded .player-volume > span { display: none !important; }

.player .icon-btn { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 0; }
.player .icon-btn:hover { border-color: var(--accent); background: var(--surface-2); }

.player.neon .control-btn { background: rgba(0,0,0,0.3); border: 1px solid #1e90ff; color: #ffffff; transition: all 0.3s ease-in-out; }
.player.neon .control-btn:hover { border-color: #00ffff; box-shadow: 0 0 10px #1e90ff, 0 0 20px #1e90ff, 0 0 30px #00ffff; transform: scale(1.05); }
.player.neon .control-btn.play-pause { background: #1e90ff; border-color: #00ffff; color: #000000; box-shadow: 0 0 15px #1e90ff; }
.player.neon .control-btn.play-pause:hover { background: #00ffff; color: #000000; box-shadow: 0 0 10px #00ffff, 0 0 30px #00ffff, 0 0 50px #00ffff; }
.player.neon .icon-btn { background: rgba(0,0,0,0.3); border: 1px solid #1e90ff; color: #ffffff; transition: all 0.3s ease-in-out; }
.player.neon .icon-btn:hover { border-color: #00ffff; box-shadow: 0 0 10px #1e90ff, 0 0 20px #1e90ff, 0 0 30px #00ffff; }

@supports (-webkit-mask-image: url("") ) or (mask-image: url("") ) {
  body.uses-vector-icons .player .control-btn { font-size: 0 !important; line-height: 0 !important; position: relative; }
  body.uses-vector-icons .player .control-btn::before {
    content: '';
    width: 22px; height: 22px; display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  }
  body.uses-vector-icons .player #prev-btn::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/skip-back.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/skip-back.svg'); }
  body.uses-vector-icons .player:not(.playing) #play-btn::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/play.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/play.svg'); }
  body.uses-vector-icons .player.playing #play-btn::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/pause.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/pause.svg'); }
  body.uses-vector-icons .player #next-btn::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/skip-forward.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/skip-forward.svg'); }
  body.uses-vector-icons .player .control-btn.shuffle::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/shuffle.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/shuffle.svg'); }
  body.uses-vector-icons .player .control-btn.repeat::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/repeat.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/repeat.svg'); }
  body.uses-vector-icons .player .control-btn.chat::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/message-circle.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/message-circle.svg'); }
  body.uses-vector-icons .player #buy-btn::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/shopping-bag.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/shopping-bag.svg'); }
  /* Ensure play/pause text never shows when using vector icons */
  body.uses-vector-icons .player .control-btn.play-pause,
  body.uses-vector-icons .player #play-btn { font-size: 0 !important; line-height: 0 !important; }

  /* Release action buttons: vector icons */
  body.uses-vector-icons .release-actions .btn .btn-emoji { display: none !important; }
  body.uses-vector-icons .release-actions .btn { position: relative; }
  body.uses-vector-icons .release-actions .btn::before {
    content: '';
    width: 20px; height: 20px; display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  }
  body.uses-vector-icons .release-actions .btn[data-action="buy"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/shopping-bag.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/shopping-bag.svg'); }
  body.uses-vector-icons .release-actions .btn[data-action="play"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/play.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/play.svg'); }
  body.uses-vector-icons .release-actions .btn[data-action="favorite"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/heart.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/heart.svg'); }
  body.uses-vector-icons .release-actions .btn[data-action="playlist"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/list-plus.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/list-plus.svg'); }
  body.uses-vector-icons .release-actions .btn[data-action="share"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/share-2.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/share-2.svg'); }

  /* Track action buttons (cards and lists) */
  body.uses-vector-icons .track-actions .action-btn { font-size: 0 !important; line-height: 0 !important; position: relative; }
  body.uses-vector-icons .track-actions .action-btn::before {
    content: '';
    width: 18px; height: 18px; display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  }
  body.uses-vector-icons .track-actions .action-btn[data-action="queue-add"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/plus.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/plus.svg'); }
  body.uses-vector-icons .track-actions .action-btn[data-action="buy"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/shopping-bag.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/shopping-bag.svg'); }
  body.uses-vector-icons .track-actions .action-btn[data-action="favorite"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/heart.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/heart.svg'); }
  body.uses-vector-icons .track-actions .action-btn.favorited { color: #ff4d67; }
  body.uses-vector-icons .track-actions .action-btn[data-action="playlist"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/list-plus.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/list-plus.svg'); }
  body.uses-vector-icons .track-actions .action-btn[data-action="delete"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/trash-2.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/trash-2.svg'); }
  body.uses-vector-icons .track-actions .action-btn[data-action="move-up"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/chevron-up.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/chevron-up.svg'); }
  body.uses-vector-icons .track-actions .action-btn[data-action="move-down"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/chevron-down.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/chevron-down.svg'); }

  /* Navigation: use vector icons instead of emoji in icon-only mode */
  body.uses-vector-icons .nav-container.icon-only .nav-btn { font-size: 0 !important; line-height: 0 !important; }
  body.uses-vector-icons .nav-container.icon-only .nav-btn::before {
    content: '';
    width: 22px; height: 22px; display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="home"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/home.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/home.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="music"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/music.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/music.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="recent"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/clock.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/clock.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="profile"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/user.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/user.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="releases"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/disc.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/disc.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="artists"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/users.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/users.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="events"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/calendar.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/calendar.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="news"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/newspaper.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/newspaper.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="fm"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/radio.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/radio.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="about"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/info.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/info.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="admin"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/wrench.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/wrench.svg'); }
  body.uses-vector-icons .nav-container.icon-only .nav-btn[data-section="label-admin"]::before { -webkit-mask-image: url('https://unpkg.com/lucide-static@latest/icons/tag.svg'); mask-image: url('https://unpkg.com/lucide-static@latest/icons/tag.svg'); }
}

@media (max-width: 767.98px) {
  /* Minimized footer: show only prev/play/next + cover/info; hide the rest */
  .player:not(.expanded) .player-volume,
  .player:not(.expanded) #fullscreen-btn,
  .player:not(.expanded) #queue-open-btn,
  .player:not(.expanded) .control-btn.shuffle,
  .player:not(.expanded) .control-btn.repeat,
  .player:not(.expanded) .control-btn.chat,
  .player:not(.expanded) .control-btn.buy { display: none !important; }

  /* Hide everything in controls except prev/play/next */
  .player:not(.expanded) .player-controls > * { display: none !important; }
  .player:not(.expanded) #prev-btn,
  .player:not(.expanded) #play-btn,
  .player:not(.expanded) .next-with-badges,
  .player:not(.expanded) #next-btn { display: inline-flex !important; }
  .player:not(.expanded) .player-controls { gap: 0.35rem; }

  /* Mobile footer layout: inline flex; controls at right of title/artist */
  .player:not(.expanded) { display: flex; align-items: center; padding: 6px 8px; }
  .player:not(.expanded) .player-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .player:not(.expanded) .player-details { text-align: left; min-width: 0; }
  .player:not(.expanded) .player-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  /* Hide progress bar entirely on mobile minimized */
  .player:not(.expanded) .progress-container { display: none !important; }

  /* Expanded: keep full centered layout on mobile; slight compaction only */
  .player.expanded .player-controls { gap: 10px 12px; }
  .player.expanded .control-btn { width: 44px; height: 44px; font-size: 1.2rem; }
  .player.expanded .control-btn.play-pause { width: 56px; height: 56px; }
  /* Move info just above progress and enlarge cover */
  .player.expanded .player-info { order: 35; margin-top: auto; margin-bottom: 0.75rem; }
  .player.expanded .player-cover { width: min(92vw, 400px); height: min(92vw, 400px); font-size: 6rem; }
  .player.expanded .player-details { text-align: center; }

  /* Release details (mobile): compact rows with small cover and 2x2 action grid */
  .release-tracklist .track-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    grid-auto-rows: auto;
    gap: 6px 8px;
    align-items: center;
    padding: 0.5rem;
  }
  .release-tracklist .track-number { display: none; }
  .release-tracklist .track-cover { grid-column: 1; width: 48px; height: 48px; border-radius: 6px; margin: 0; }
  .release-tracklist .track-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
  }
  .release-tracklist .track-info { grid-column: 2; min-width: 0; }
  .release-tracklist .track-title {
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .release-tracklist .track-artist {
    font-size: 0.74rem;
    opacity: 0.85;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .release-tracklist .track-actions {
    grid-column: 3;
    display: grid;
    grid-template-columns: repeat(2, 36px);
    grid-auto-rows: 36px;
    gap: 4px;
    justify-content: end;
    margin-left: 0;
    align-items: center;
  }
  .release-tracklist .track-actions .action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }
  .release-tracklist .track-item .track-cover { width: 48px; height: 48px; }

  /* Track cards (vertical) actions centered on mobile */
  .track-card .track-actions { justify-content: center; }

  /* Release header: full-width rectangular buttons in 5-column grid */
  .release-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; margin: 0.5rem 0; }
  .release-actions .btn { width: 100%; height: 48px; min-height: 48px; padding: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; text-overflow: clip; }
  .release-actions .btn .btn-text { display: none; }
  .release-actions .btn .btn-aux { display: none; }
  .release-actions .btn .btn-emoji { font-size: 1.1rem; line-height: 1; }
}
.player.expanded.no-stagger .control-btn.repeat { grid-row: 2; grid-column: 2; }
.player.expanded.no-stagger .control-btn.chat { grid-row: 2; grid-column: 3; }
.player.expanded.no-stagger .control-btn.buy { grid-row: 2; grid-column: 4; }

@media (min-width: 769px) {
  .release-tracklist.compact .track-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    grid-auto-rows: auto;
    gap: 6px 8px;
    align-items: center;
    padding: 0.35rem 0.5rem;
  }
  .release-tracklist.compact .track-number { display: none; }
  .release-tracklist.compact .track-cover { grid-column: 1; width: 36px; height: 36px; border-radius: 6px; margin: 0; }
  .release-tracklist.compact .track-cover-img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
  .release-tracklist.compact .track-info { grid-column: 2; min-width: 0; }
  .release-tracklist.compact .track-title { font-size: 0.95rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .release-tracklist.compact .track-artist { font-size: 0.78rem; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .release-tracklist.compact .track-actions {
    grid-column: 3;
    display: grid;
    grid-template-columns: repeat(4, 30px);
    grid-auto-rows: 30px;
    gap: 4px;
    justify-content: end;
    align-items: center;
    margin-left: 0;
  }
  .release-tracklist.compact .track-actions .action-btn { width: 30px; height: 30px; padding: 0; border-radius: 8px; }
}

@media (max-width: 420px) {
  .player.expanded.no-stagger .player-controls { grid-template-columns: repeat(4, minmax(44px, 1fr)); gap: 10px 12px; }
}

.waveform { display: none; height: 80px; margin: 0.5rem 0; }
.player.expanded .waveform { display: block; }
.waveform canvas { border-radius: 8px; }
/* Remove explicit minimize on expanded */
.player.expanded .close-expanded { display: none !important; }

/* badge overhang compensation no longer required with symmetric gutters */

@media (max-width: 420px) {
  .player.expanded .player-controls { grid-template-columns: repeat(6, auto); gap: 10px 12px; justify-content: center; }
  .release-actions { grid-template-columns: repeat(5, 1fr); }
}

/* Footer (minimized) player: barra fina com tempos por cima, nas pontas */
.player:not(.expanded) .progress-container { display: block; position: relative; grid-column: 1 / -1; grid-row: 2; padding: 14px 56px 0; margin-top: 6px; }
.player:not(.expanded) .progress-bar { height: 4px; margin: 4px 0 0; }
.player:not(.expanded) .progress-time { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); pointer-events: none; }

/* --- Modais --- */

.modal-content { background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; border-radius: 12px; width: 90%; max-width: 400px; box-shadow: 0 4px 15px var(--shadow); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.2rem;
    color: #1e90ff;
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #b3b3b3;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: #333333;
    border: 1px solid #444444;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
}

.form-textarea {
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 40px;
    line-height: 1;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 2px var(--shadow);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease, opacity 0.2s ease;
}

.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }

.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); box-shadow: 0 4px 14px rgba(30,144,255,0.35); }

.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(30,144,255,0.4); }

.btn-secondary:hover { border-color: var(--accent); filter: brightness(1.03); }

.btn-primary:active, .btn-secondary:active { transform: translateY(1px); }

.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent), 0 2px 10px var(--shadow); }

/* Variantes adicionais de botões */
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }

.btn-ghost:hover { border-color: var(--accent); background: rgba(30,144,255,0.08); }

/* Tamanhos */
.btn-sm {
    min-height: 36px;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.btn-md {
    min-height: 42px;
}

/* --- Toast Notification --- */
#toast-container {
    position: fixed;
    bottom: 80px; /* Acima do player */
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.toast {
    background: #333333;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

/* Media Query para Player no modo expandido */
@media (min-width: 769px) {
    .player.expanded {
        width: 400px;
        left: 50%;
        transform: translateX(-50%);
        height: 80%;
        top: 10%;
        bottom: auto;
        border-radius: 12px;
    }
}

/* --- Playlist Management Actions --- */
.track-item .playlist-actions {
    position: static !important;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: 1rem;
}

.track-item .playlist-actions .action-btn {
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
    font-size: 1.1rem;
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid #1e90ff;
    border-radius: 6px;
}

.track-item .playlist-actions .action-btn:hover {
    background: rgba(30, 144, 255, 0.3);
    border-color: #1e90ff;
}

.track-item .playlist-actions .remove-btn {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

.track-item .playlist-actions .remove-btn:hover {
    background: rgba(255, 68, 68, 0.3);
    border-color: #ff6666;
}

.action-spacer {
    display: inline-block;
    width: 36px;
    height: 36px;
    visibility: hidden;
}

/* Playlist header actions */
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.playlist-header .playlist-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Long Press Menu --- */
.long-press-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #1a1a1a 0%, #1a1a1a 95%, transparent 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    padding: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.long-press-menu.show {
    transform: translateY(0);
}

.long-press-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.long-press-header strong {
    color: #1e90ff;
    font-size: 1.1rem;
}

.close-menu {
    background: none;
    border: none;
    color: #999;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    color: #fff;
}

.long-press-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.long-press-actions button {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.long-press-actions button:hover,
.long-press-actions button:active {
    background: #333;
    border-color: #1e90ff;
    transform: translateX(4px);
}

.long-press-actions button.danger {
    border-color: #ff4444;
}

.long-press-actions button.danger:hover,
.long-press-actions button.danger:active {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff6666;
}

/* Overlay escuro quando menu está aberto */
.long-press-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.long-press-menu.show::before {
    opacity: 1;
}

/* Indicador visual de que pode fazer long press */
.track-item {
    position: relative;
}

.track-item::after {
    content: '';
    display: none;
}

.track-item:hover::after,
.track-item:active::after {
    opacity: 0.8;
}

/* --- Releases Section --- */
.release-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    max-width: 160px;
}
@media (max-width: 1024px) { .release-card { max-width: 150px; } }
@media (max-width: 768px)  { .release-card { max-width: 140px; } }

.release-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(30, 144, 255, 0.2);
}

.coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9800;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

.release-cover {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1e90ff 0%, #0d47a1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    color: white;
    overflow: hidden;
}

.release-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.release-info {
    padding: 1rem;
}

.release-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.6em; /* 2 linhas * 1.3 line-height */
}

.release-meta {
    font-size: 0.9rem;
    color: #999;
}

/* Release Details */
.release-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.release-cover-large {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #1e90ff 0%, #0d47a1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.release-cover-large-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.release-header-info {
    flex: 1;
    min-width: 250px;
}

.release-title-large {
    font-size: 2rem;
    margin: 0 0 0.25rem 0;
    color: #fff;
    line-height: 1.2;
}

.release-subtitle {
    font-size: 1rem;
    color: #999;
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
}

/* Info inline - sem caixas */
.release-meta-text {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 1rem 0 0.5rem 0;
}

.release-meta-text strong {
    color: #1e90ff;
    font-weight: 500;
}

.release-meta-line {
    margin: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-meta-line .emoji {
    font-size: 1.1rem;
}

.meta-separator {
    color: #555;
    margin: 0 0.4rem;
}

.release-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.release-description,
.release-credits,
.release-tracklist {
    background: rgba(26, 26, 26, 0.45);
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

/* Quando a descrição está dentro do cabeçalho do release, retirar caixa visual */
.release-header .release-description {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 0.35rem 0 0;
}

.release-description h3,
.release-credits h4,
.release-tracklist h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #1e90ff;
    font-size: 1.1rem;
    font-weight: 600;
}

.release-description p {
    line-height: 1.6;
    color: #ccc;
    margin: 0;
}


.credits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.credits-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
    color: #ccc;
}

.credits-list li:last-child {
    border-bottom: none;
}

.credits-list strong {
    color: #1e90ff;
    margin-right: 0.5rem;
}

.playlist-select-btn {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    text-align: left;
}

.playlist-select-btn:hover {
    background: #333;
    border-color: #1e90ff;
}

/* --- Artists Section --- */
.artist-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0; cursor: pointer; transition: all 0.25s ease; display: flex; flex-direction: column; align-items: stretch; text-align: left; max-width: none; }

.artist-card:hover { background: var(--surface-2); box-shadow: 0 4px 12px var(--shadow); }

.artist-avatar {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: var(--border);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    overflow: hidden;
}

.artist-info { width: 100%; }

.artist-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0.5rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.artist-meta {
    font-size: 0.8rem;
    color: #999;
    margin: 0 0.5rem 0.5rem;
}

/* Artist Details */
.artist-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.artist-avatar-large {
    width: 180px;
    height: 180px;
    background: var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.artist-header-info {
    flex: 1;
    min-width: 250px;
}

.artist-title-large {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
    line-height: 1.2;
}

.artist-meta-text {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 1rem 0 0.5rem 0;
}

.artist-meta-text strong {
    color: #1e90ff;
    font-weight: 500;
}

.artist-meta-line {
    margin: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.artist-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.artist-tracklist { background: rgba(26, 26, 26, 0.45); padding: 1.25rem; border-radius: 10px; margin-bottom: 1.25rem; }
.artist-meta-line.artist-bio { overflow: hidden; }
@media (min-width: 768px) { .artist-meta-line.artist-bio { display: -webkit-box !important; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; } }
@media (max-width: 767.98px) { .artist-meta-line.artist-bio { display: none !important; } }

.artist-tracklist h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #1e90ff;
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- Videos Section --- */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #000;
    overflow: hidden;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-card:hover .play-overlay.player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    z-index: 200;
    transition: transform 0.3s ease;
}

.video-card:hover .play-button {
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Video Player Modal */
.video-modal-content {
    max-width: 1200px;
    width: 95%;
}

.video-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Chat --- */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-header { display: flex; align-items: center; gap: 0.5rem; }
.chat-title { font-weight: 600; }
.chat-status { margin-left: auto; color: #b3b3b3; font-size: 0.9rem; }

.chat-messages {
    background: #0f0f10;
    border: 1px solid #2b2b2e;
    border-radius: 12px;
    padding: 0.75rem;
    height: 45vh;
    min-height: 240px;
    overflow-y: auto;
}

.chat-message { display: block; margin-bottom: 0.5rem; line-height: 1.35; }
.chat-meta { color: #8aa4c8; margin-right: 0.35rem; }
.chat-text { color: #e8e8e8; }

.chat-pinned {
    background: rgba(30,144,255,0.08);
    border: 1px solid rgba(30,144,255,0.35);
    color: #e6f0ff;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0 0.5rem 0;
}

.chat-pin-editor {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.25rem 0 0.5rem 0;
}
.chat-pin-editor .chat-input { flex: 1; }
.chat-pin-actions { display: flex; gap: 0.5rem; }

.chat-input-form { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.chat-input {
    flex: 1;
    background: #151517;
    border: 1px solid #2b2b2e;
    color: #ffffff;
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
}

@media (max-width: 480px) {
  .chat-messages { height: 35vh; }
}

/* Chat ocupa toda a coluna no desktop */
@media (min-width: 768px) {
  #fm-section .chat-container { max-width: none; }
}

@media (max-width: 768px) {
    .nav-container { justify-content: center; }
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-modal-content {
        width: 100%;
        margin: 0;
    }
    
    .release-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .release-cover-large {
        width: 192px;
        height: 192px;
        margin: 0 auto 0.75rem;
    }
    
    .release-header-info {
        width: 100%;
    }
    
    .release-meta-text {
        font-size: 0.9rem;
    }
    
    .release-meta-line {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .release-actions {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        align-items: stretch;
        justify-content: initial;
        width: 100%;
        overflow: visible;
    }
    
    .release-actions .btn {
        width: 100%;
        height: 48px;
        min-height: 48px;
        padding: 0;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: clip;
    }
    
    /* Artist mobile */
    .artist-card {
        max-width: 100%;
    }
    
    .artist-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .artist-avatar-large {
        width: 150px;
        height: 150px;
        font-size: 3.5rem;
        margin: 0 auto 1rem;
    }
    
    .artist-header-info {
        width: 100%;
    }
    
    .artist-actions {
        flex-direction: column;
    }
    
    .artist-actions .btn {
        width: 100%;
    }
}

/* Telefone (<=480px): condensar cartões e navegação */
@media (max-width: 480px) {
    /* Navegação mais compacta */
    .nav-container { gap: 0.4rem; padding: 0 0.5rem; justify-content: center; }
    .nav-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; border-radius: 16px; }

    /* Header mais leve */
    .logo h1 { font-size: 1.4rem; }
    .logo .subtitle { font-size: 0.6rem; }

    /* Pesquisa mais compacta */
    .search-input { padding: 0.75rem 1rem; font-size: 0.95rem; }

    /* Cartões mais pequenos e 2 colunas */
    .track-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    /* Mantém capas full-width: não sobrescrever padding/dimensões */
    .track-title { font-size: 0.85rem; }
    .track-artist { font-size: 0.75rem; }
    .track-duration { font-size: 0.65rem; }

    /* Releases/Artists ocupam largura total no mobile pequeno */
    .release-card { max-width: 100%; }
    .artist-card { max-width: 100%; }

    /* Vídeos em 1 coluna */
    .videos-grid { grid-template-columns: 1fr; }

    /* Player expandido mais compacto */
    .player.expanded .player-cover { width: 120px; height: 120px; font-size: 3rem; }
    .player.expanded .player-controls { margin: 1rem 0; }
    .player.expanded .progress-container { margin-top: 0.5rem; }
    .player.expanded .player-title { font-size: 1rem; }
    .player.expanded .player-artist { font-size: 0.85rem; }

    /* Controlos menores no rodapé em ecrãs pequenos */
    .player:not(.expanded) .control-btn { width: 40px; height: 40px; font-size: 1.1rem; }
    .player:not(.expanded) .control-btn.play-pause { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* Home: linha única horizontal de músicas aleatórias (fixo, com scroll se necessário) */
#random-tracks.track-grid {
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: 160px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
@media (max-width: 1024px) {
  #random-tracks.track-grid { grid-auto-columns: 150px; }
}
@media (max-width: 768px) {
  #random-tracks.track-grid { grid-auto-columns: 140px; }
}

@media (min-width: 1024px) {
  #random-tracks.track-grid { overflow-x: hidden; }
}

#release-tracks-grid.track-grid {
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: 160px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 1024px) { #release-tracks-grid.track-grid { grid-auto-columns: 150px; } }
@media (max-width: 768px) { #release-tracks-grid.track-grid { grid-auto-columns: 140px; } }
#release-tracks-grid.track-grid > .track-card { scroll-snap-align: start; }

/* Label: grelha horizontal de músicas com paginação */
#label-tracks-grid.track-grid {
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: 160px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 1024px) { #label-tracks-grid.track-grid { grid-auto-columns: 150px; } }
@media (max-width: 768px) { #label-tracks-grid.track-grid { grid-auto-columns: 140px; } }
#label-tracks-grid.track-grid > .track-card { scroll-snap-align: start; }

/* Bullets quadrados para paginação (globais) */
.page-dots { display: inline-flex; gap: 6px; align-items: center; }
.page-dots .page-dot { width: 8px; height: 8px; background: #444; border-radius: 2px; display: inline-block; cursor: pointer; }
.page-dots .page-dot.active { background: #1e90ff; }

/* Fade nas margens das grelhas horizontais */
.edge-fade { position: relative; }
.edge-fade::before,
.edge-fade::after { content: ''; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; z-index: 2; }
.edge-fade::before { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0)); }
.edge-fade::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,0.6), rgba(0,0,0,0)); }

#about-section { position: relative; overflow: hidden; text-align: center; max-width: 980px; margin: 0 auto; padding: 0.5rem 1rem; }
#about-section .section-subtitle { font-size: clamp(1rem, 2.2vw, 1.25rem); color: #e5e7eb; }
#about-section h2.section-title { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: 0.06em; background: linear-gradient(90deg, #ffffff 0%, #1e90ff 50%, #ff765f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
#about-section h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); color: #ffffff; margin: 1rem 0 0.5rem; }
#about-section p { max-width: 70ch; margin: 0.25rem auto 0.85rem; line-height: 1.75; color: #d1d5db; }
#about-section .socials-grid { margin: 1rem auto 0; max-width: 860px; }

#intro-splash { position: fixed; inset: 0; background: #000000; color: #ffffff; display: flex; align-items: center; justify-content: center; z-index: 10000; transition: opacity 0.6s ease, visibility 0.6s ease; }
#intro-splash.hidden { opacity: 0; visibility: hidden; }
#intro-splash .intro-content { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1rem; }
#intro-splash .intro-logo { width: clamp(56px, 14vw, 84px); height: auto; margin-bottom: 0.25rem; }
#intro-splash .intro-title { font-weight: 800; letter-spacing: 0.14em; font-size: clamp(1.4rem, 5.2vw, 2.2rem); }
#intro-splash .intro-subtitle { font-size: clamp(0.8rem, 2.6vw, 1rem); color: #d1d5db; letter-spacing: 0.06em; }

/* Painel de filtros compacto */
.filters-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; margin-bottom: 0.5rem; }
.filters-body { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-group { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.filter-check { display: inline-flex; align-items: center; gap: 0.35rem; }
.filter-actions { display: flex; justify-content: flex-end; }
#music-filters-panel .form-input { min-height: 34px; }

/* Analytics: sticky filters and sections layout */
.analytics-sticky-filters { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; box-shadow: 0 4px 16px var(--shadow); }
.analytics-sections-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0.75rem; align-items: start; }
.analytics-section { display: flex; flex-direction: column; gap: 0.25rem; }
.analytics-section-title { font-size: 0.9rem; font-weight: 600; color: #1e90ff; margin: 0.15rem 0; }
@media (max-width: 1024px) {
  .analytics-sections-grid { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Compact density inside Analytics only */
#label-admin-analytics .kpi-grid { gap: 0.4rem !important; }
#label-admin-analytics .kpi-card { padding: 6px !important; border-radius: 8px; }
#label-admin-analytics .kpi-card .text-muted { font-size: 0.75rem !important; }

#label-admin-analytics .analytics-sections-grid { gap: 0.5rem !important; }
#label-admin-analytics .analytics-section { gap: 0.2rem; }
#label-admin-analytics .analytics-section .text-muted { margin: 0.35rem 0 0.15rem !important; }

#label-admin-analytics .track-list { gap: 0.35rem; }
#label-admin-analytics .track-item { padding: 0.5rem; }
#label-admin-analytics .track-item .track-cover { width: 32px; height: 32px; }
#label-admin-analytics .track-number { margin-right: 0.5rem; width: 16px; }
#label-admin-analytics .track-item .track-actions { gap: 4px; margin-left: 0.5rem; }

#label-admin-analytics .analytics-sticky-filters { padding: 0.4rem; }
#label-admin-analytics .analytics-sticky-filters .form-input { min-height: 30px; padding: 2px 6px; font-size: 0.85rem; }
#label-admin-analytics .analytics-sticky-filters .btn-sm { padding: 0.35rem 0.55rem; height: 30px; }

/* Two-column utility inside sections */
.analytics-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; align-items: start; }
@media (max-width: 900px) { .analytics-2col { grid-template-columns: 1fr; } }

/* Streaming section spans full width and has custom top layout */
#label-admin-analytics .analytics-section.streaming { grid-column: 1 / -1; }
.analytics-streaming-top { display: grid; grid-template-columns: 2fr 1fr; gap: 0.75rem; align-items: start; }
@media (max-width: 900px) { .analytics-streaming-top { grid-template-columns: 1fr; } }

/* KPI row: single line, scrollable, compact */
#label-admin-analytics .kpi-row { display: flex; gap: 0.35rem; overflow: auto; white-space: nowrap; align-items: stretch; scrollbar-width: thin; }
#label-admin-analytics .kpi-row .kpi-card { min-width: 120px; display: flex; flex-direction: column; justify-content: center; }
#label-admin-analytics .kpi-row.kpi-compact .kpi-card { padding: 6px !important; }
#label-admin-analytics .kpi-row.kpi-compact .kpi-card .text-muted { font-size: 0.7rem !important; }
#label-admin-analytics .kpi-row.kpi-compact .kpi-card > div:last-child { font-size: 1rem !important; }

/* Harmonize list heights (internal scroll) */
#label-admin-analytics .analytics-section .track-list { max-height: 200px; overflow: auto; }
#label-admin-analytics .analytics-section .track-item { padding: 0.45rem; }
