/* Harmonia v5 - Design Premium */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-elevated: #222222;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --gold: #B89B5E;
    --gold-dark: #D4B47C;
    --gold-light: #E5C892;
    --border: rgba(184, 155, 94, 0.3);
    --sidebar-width: 260px;
    --player-height: 90px;
    --header-height: 64px;
    --mobile-nav-height: 60px;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --bg-elevated: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --gold: #B89B5E;
    --gold-dark: #D4B47C;
    --border: rgba(184, 155, 94, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-primary); color: var(--text-primary); overflow: hidden; height: 100vh; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

.app { display: grid; grid-template-columns: var(--sidebar-width) 1fr; grid-template-rows: 1fr var(--player-height); height: 100vh; overflow: hidden; }

.sidebar { background: var(--bg-secondary); display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--border); }
.sidebar-header { padding: 24px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { width: 36px; height: 36px; border-radius: 10px; }
.logo span { font-size: 1.2rem; font-weight: 700; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.sidebar-nav { padding: 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.nav-link { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 12px; color: var(--text-secondary); text-decoration: none; transition: all 0.2s; cursor: pointer; }
.nav-link i { width: 22px; font-size: 1.1rem; }
.nav-link span { font-size: 0.9rem; font-weight: 500; }
.nav-link:hover { background: var(--bg-tertiary); color: var(--gold); }
.nav-link.active { background: linear-gradient(135deg, rgba(184, 155, 94, 0.1), rgba(212, 180, 124, 0.05)); color: var(--gold); border-left: 3px solid var(--gold); }

.sidebar-playlists { flex: 1; overflow-y: auto; padding: 16px; }
.playlists-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 8px; color: var(--text-secondary); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.create-playlist-btn-modern { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; color: #000; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.create-playlist-btn-modern:hover { transform: scale(1.1) rotate(90deg); background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 4px 12px rgba(184, 155, 94, 0.4); }
.create-playlist-btn-modern i { font-size: 0.9rem; transition: transform 0.3s ease; }
.create-playlist-btn-modern:hover i { transform: rotate(90deg); }
.playlists-list { display: flex; flex-direction: column; gap: 4px; }
.playlist-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: all 0.2s; color: var(--text-secondary); }
.playlist-item:hover { background: var(--bg-tertiary); color: var(--gold); transform: translateX(4px); }
.playlist-item i { width: 24px; }

.sidebar-cta { padding: 16px; margin: 16px; background: linear-gradient(135deg, rgba(184, 155, 94, 0.1), rgba(212, 180, 124, 0.05)); border-radius: 16px; border: 1px solid var(--border); text-align: center; }
.cta-card i { font-size: 2rem; color: var(--gold); margin-bottom: 12px; }
.cta-card h4 { font-size: 0.9rem; margin-bottom: 4px; }
.cta-card p { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 12px; }
.cta-btn { display: inline-block; padding: 8px 20px; background: var(--gold); color: #000; border-radius: 40px; font-size: 0.75rem; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.cta-btn:hover { transform: scale(1.02); }

.main-content { background: var(--bg-primary); display: flex; flex-direction: column; overflow: hidden; }
.main-header { height: var(--header-height); display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.user-menu { display: flex; align-items: center; gap: 16px; }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-tertiary); border: none; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.theme-toggle:hover { background: var(--bg-elevated); color: var(--gold); transform: rotate(15deg); }

.user-dropdown { position: relative; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.user-avatar:hover { transform: scale(1.05); }
.user-avatar span { font-size: 0.9rem; font-weight: 600; color: #000; }
.dropdown-menu { position: absolute; top: 48px; right: 0; background: var(--bg-elevated); border-radius: 12px; min-width: 200px; opacity: 0; visibility: hidden; transition: all 0.2s; border: 1px solid var(--border); z-index: 100; }
.user-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; font-size: 0.85rem; }
.dropdown-header span { font-size: 0.7rem; color: var(--text-secondary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 8px 0; }
.dropdown-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text-secondary); text-decoration: none; transition: all 0.2s; }
.dropdown-item:hover { background: var(--bg-tertiary); color: var(--gold); }

.auth-buttons { display: flex; gap: 12px; }
.btn-outline { padding: 8px 20px; border-radius: 40px; border: 1px solid var(--gold); color: var(--gold); text-decoration: none; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; }
.btn-outline:hover { background: rgba(184, 155, 94, 0.1); transform: translateY(-2px); }
.btn-gold { padding: 8px 20px; border-radius: 40px; background: var(--gold); color: #000; text-decoration: none; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; }
.btn-gold:hover { transform: scale(1.02); box-shadow: 0 2px 8px rgba(184, 155, 94, 0.3); }

.content-area { flex: 1; overflow-y: auto; padding: 24px; }
.loading { text-align: center; padding: 60px; }
.loading i { font-size: 2rem; color: var(--gold); margin-bottom: 16px; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ========== CARROSSÉIS COM VIRTUAL SCROLLING ========== */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    padding: 0 8px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-header .section-count {
    font-size: 0.8rem;
    color: var(--gold);
}

/* Container do carrossel com scroll suave */
.carousel-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.carousel-container::-webkit-scrollbar {
    height: 4px;
}

.carousel-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 2px;
}

/* Carrossel com flex e lazy loading */
.carousel {
    display: flex;
    gap: 20px;
    padding: 8px 4px 20px;
}

/* Card com lazy loading */
.card {
    flex: 0 0 auto;
    width: 180px;
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-4px);
}

.card-artwork {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--bg-tertiary);
}

.card-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.card-artwork img[loading="lazy"] {
    opacity: 0;
}

.card-artwork img.loaded {
    opacity: 1;
}

.card-artwork .placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover .card-actions {
    opacity: 1;
}

.card-action-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.card-action-btn:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.05);
}

.card-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
    color: #000;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card:hover .card-play-btn {
    opacity: 1;
    transform: translateY(0);
}

.card-play-btn:hover {
    transform: scale(1.05);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading more no carrossel */
.carousel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    min-width: 120px;
    color: var(--gold);
}

.carousel-loading i {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

/* ========== PÁGINA DE BUSCAR ========== */
.search-page { max-width: 1200px; margin: 0 auto; }
.search-header { text-align: center; margin-bottom: 32px; }
.search-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search-header p { color: var(--text-secondary); font-size: 0.85rem; }
.search-input-wrapper { max-width: 500px; margin: 0 auto 24px; position: relative; }
.search-input-wrapper i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 1rem; }
.search-input-wrapper input { width: 100%; padding: 14px 20px 14px 48px; background: var(--bg-tertiary); border: 2px solid var(--border); border-radius: 60px; color: var(--text-primary); font-size: 1rem; font-family: inherit; transition: all 0.2s; }
.search-input-wrapper input:focus { outline: none; border-color: var(--gold); background: var(--bg-elevated); }
.search-stats { text-align: center; margin-bottom: 24px; padding: 8px 16px; background: var(--bg-tertiary); border-radius: 40px; display: inline-block; width: auto; margin-left: auto; margin-right: auto; }
.search-stats span { font-size: 0.8rem; color: var(--text-secondary); }
.search-stats strong { color: var(--gold); font-size: 1rem; }

.search-results { background: var(--bg-secondary); border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.search-result-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: all 0.2s; cursor: pointer; }
.search-result-item:hover { background: var(--bg-tertiary); }
.search-result-item:last-child { border-bottom: none; }
.search-result-info { display: flex; align-items: center; gap: 16px; flex: 1; }
.search-result-artwork { width: 48px; height: 48px; border-radius: 8px; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.search-result-artwork img { width: 100%; height: 100%; object-fit: cover; }
.search-result-artwork i { font-size: 1.2rem; color: var(--text-secondary); }
.search-result-details { flex: 1; min-width: 0; }
.search-result-title-wrapper { display: flex; align-items: center; gap: 8px; }
.search-result-equalizer { display: none; align-items: center; gap: 3px; height: 16px; }
.search-result-equalizer span { display: block; width: 3px; background: var(--gold); border-radius: 1px; animation: equalize 0.8s ease-in-out infinite alternate; }
.search-result-equalizer span:nth-child(1) { height: 6px; animation-delay: 0s; }
.search-result-equalizer span:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.search-result-equalizer span:nth-child(3) { height: 8px; animation-delay: 0.1s; }
.search-result-equalizer span:nth-child(4) { height: 14px; animation-delay: 0.3s; }
@keyframes equalize { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }
.search-result-title { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-item.playing .search-result-equalizer { display: flex; }
.search-result-item.playing .search-result-title { color: var(--gold); font-weight: 700; }
.search-result-artist { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.search-result-duration { font-size: 0.7rem; font-family: monospace; color: var(--text-secondary); min-width: 45px; text-align: right; }
.search-result-actions { display: flex; align-items: center; gap: 12px; }
.search-favorite-btn, .search-menu-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; border-radius: 50%; transition: all 0.2s; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.search-favorite-btn:hover, .search-menu-btn:hover { background: var(--bg-elevated); color: var(--gold); transform: scale(1.1); }
.search-favorite-btn.active { color: var(--gold); }

/* ========== PLAYLISTS ========== */
.playlists-header-page { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.playlists-header-page h2 { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--gold); }
.playlists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.playlist-card { background: var(--bg-elevated); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s ease; border: 1px solid var(--border); position: relative; }
.playlist-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.playlist-card-cover { aspect-ratio: 1; background: linear-gradient(135deg, var(--gold-dark), var(--gold)); display: flex; align-items: center; justify-content: center; position: relative; }
.playlist-card-cover i { font-size: 3rem; color: #000; }
.playlist-card-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 8px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); opacity: 0; transition: opacity 0.3s ease; }
.playlist-card:hover .playlist-card-actions { opacity: 1; }
.playlist-action-btn { background: rgba(0, 0, 0, 0.6); border: none; width: 32px; height: 32px; border-radius: 50%; color: white; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.playlist-action-btn:hover { background: var(--gold); color: #000; transform: scale(1.05); }
.playlist-action-btn.delete:hover { background: #e91429; color: white; }
.playlist-card-info { padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.playlist-card-info h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.playlist-card-info p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }
.playlist-card-stats { font-size: 0.7rem; color: var(--gold); background: rgba(184, 155, 94, 0.1); padding: 2px 8px; border-radius: 20px; white-space: nowrap; }

/* ========== TRACK LIST ========== */
.track-list-header { display: grid; grid-template-columns: 48px 1fr 160px 80px; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); }
.track-row { display: grid; grid-template-columns: 48px 1fr 160px 80px; gap: 16px; align-items: center; padding: 12px 16px; border-radius: 12px; cursor: pointer; transition: all 0.2s; position: relative; }
.track-row:hover { background: var(--bg-tertiary); }
.track-number { font-family: monospace; font-size: 0.85rem; color: var(--text-secondary); text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; }
.track-equalizer { display: none; align-items: center; gap: 2px; height: 14px; }
.track-equalizer span { display: block; width: 3px; background: var(--gold); border-radius: 1px; animation: equalize 0.8s ease-in-out infinite alternate; }
.track-equalizer span:nth-child(1) { height: 6px; animation-delay: 0s; }
.track-equalizer span:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.track-equalizer span:nth-child(3) { height: 8px; animation-delay: 0.1s; }
.track-equalizer span:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.track-row.playing .track-number .track-number-text { display: none; }
.track-row.playing .track-equalizer { display: flex; }
.track-info { display: flex; align-items: center; gap: 12px; }
.track-artwork { width: 48px; height: 48px; border-radius: 8px; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.track-artwork img { width: 100%; height: 100%; object-fit: cover; }
.track-artwork i { font-size: 1.2rem; color: var(--text-secondary); }
.track-details { flex: 1; }
.track-title { font-size: 0.9rem; font-weight: 500; }
.track-row.playing .track-title { color: var(--gold); font-weight: 700; }
.track-artist { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.track-album { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-actions { display: flex; gap: 8px; justify-content: flex-end; }
.track-favorite { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 6px; border-radius: 50%; transition: all 0.2s; }
.track-favorite:hover { color: var(--gold); transform: scale(1.1); }
.track-favorite.active { color: var(--gold); }
.track-menu-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 6px; border-radius: 50%; transition: all 0.2s; }
.track-menu-btn:hover { color: var(--gold); background: var(--bg-elevated); transform: scale(1.1); }

/* ========== PLAYER BAR ========== */
#player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    border-top: 2px solid #B89B5E;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), background 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
}
#player-bar.active { transform: translateY(0) !important; }
.player-container { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 80px; }
.player-left { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.player-artwork { width: 56px; height: 56px; border-radius: 8px; background: #1a1a1a; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.player-artwork img { width: 100%; height: 100%; object-fit: cover; }
.player-artwork i { font-size: 1.5rem; color: #b3b3b3; }
.player-track-info { min-width: 0; }
.player-title { font-size: 0.95rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.player-artist { font-size: 0.75rem; color: #b3b3b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; max-width: 280px; }
.player-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.play-pause-btn { width: 52px; height: 52px; border-radius: 50%; background: #B89B5E !important; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.25s ease; box-shadow: 0 4px 12px rgba(184, 155, 94, 0.4); }
.play-pause-btn i { font-size: 1.2rem; color: #000; margin-left: 2px; }
.play-pause-btn:hover { transform: scale(1.08); background: #e5c892 !important; box-shadow: 0 6px 18px rgba(184, 155, 94, 0.6); }
.play-pause-btn:active { transform: scale(0.95); }

#player-bar[data-color="0"] { background: linear-gradient(135deg, #1a1a1a, #0a0a0a); border-top-color: #B89B5E; }
#player-bar[data-color="1"] { background: linear-gradient(135deg, #1a1a2e, #0f0f1a); border-top-color: #7B2FBE; }
#player-bar[data-color="2"] { background: linear-gradient(135deg, #1e2a1e, #0f1a0f); border-top-color: #2E7D32; }
#player-bar[data-color="3"] { background: linear-gradient(135deg, #2e1a2e, #1a0f1a); border-top-color: #9C27B0; }
#player-bar[data-color="4"] { background: linear-gradient(135deg, #2e2e1a, #1a1a0f); border-top-color: #CDDC39; }
#player-bar[data-color="5"] { background: linear-gradient(135deg, #1a2e2e, #0f1a1a); border-top-color: #00BCD4; }
#player-bar[data-color="6"] { background: linear-gradient(135deg, #2e1a1a, #1a0f0f); border-top-color: #F44336; }
#player-bar[data-color="7"] { background: linear-gradient(135deg, #1a2e1a, #0f1a0f); border-top-color: #4CAF50; }

@media (max-width: 768px) {
    .player-container { padding: 0 16px; height: 70px; }
    .player-artwork { width: 44px; height: 44px; }
    .player-title { max-width: 180px; font-size: 0.85rem; }
    .player-artist { max-width: 180px; font-size: 0.65rem; }
    .play-pause-btn { width: 44px; height: 44px; }
    .play-pause-btn i { font-size: 1rem; }
    #player-bar { bottom: 60px !important; }
}
@media (max-width: 480px) {
    .player-title { max-width: 140px; font-size: 0.75rem; }
    .player-artist { max-width: 140px; font-size: 0.6rem; }
}

/* ========== MOBILE ========== */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: var(--mobile-nav-height); background: var(--bg-secondary); border-top: 1px solid var(--border); z-index: 1000; }
.mobile-nav-inner { display: flex; align-items: center; justify-content: space-around; height: 100%; }
.mobile-nav-link, .mobile-info-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-secondary); text-decoration: none; transition: all 0.2s; cursor: pointer; background: none; border: none; font-family: inherit; font-size: 0.65rem; font-weight: 500; }
.mobile-nav-link i, .mobile-info-btn i { font-size: 1.2rem; }
.mobile-nav-link span, .mobile-info-btn span { font-size: 0.65rem; font-weight: 500; }
.mobile-nav-link.active { color: var(--gold); }
.mobile-nav-link:hover, .mobile-info-btn:hover { color: var(--gold); transform: translateY(-2px); }

.mobile-mini-player { display: none; position: fixed; bottom: var(--mobile-nav-height); left: 0; right: 0; background: var(--bg-tertiary); cursor: pointer; z-index: 99; }
.mini-player-info { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.mini-artwork { width: 44px; height: 44px; border-radius: 8px; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mini-artwork img { width: 100%; height: 100%; object-fit: cover; }
.mini-artwork i { font-size: 1.2rem; }
.mini-track-info { flex: 1; min-width: 0; }
.mini-title { font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 0.65rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-play { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #000; border: none; cursor: pointer; margin-right: 12px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.mini-play:hover { transform: scale(1.05); }
.mini-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--bg-elevated); }
.mini-progress-fill { height: 100%; background: var(--gold); width: 0; }

/* ========== CONTEXT MENU ========== */
.context-menu { position: fixed; background: var(--bg-elevated); border-radius: 12px; min-width: 200px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); z-index: 2000; overflow: hidden; border: 1px solid var(--border); animation: menuFadeIn 0.15s ease; }
@keyframes menuFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.context-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.context-item:hover { background: var(--bg-tertiary); color: var(--gold); }
.context-item i { width: 20px; font-size: 0.9rem; }
.context-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ========== MODAL ========== */
.modern-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 3000; animation: fadeInModal 0.3s ease; }
@keyframes fadeInModal { from { opacity: 0; backdrop-filter: blur(0); } to { opacity: 1; backdrop-filter: blur(8px); } }
.modern-modal-content { background: var(--bg-secondary); border-radius: 28px; width: 90%; max-width: 450px; padding: 0; border: 1px solid var(--gold); box-shadow: 0 25px 50px -12px rgba(184, 155, 94, 0.4); animation: slideUpModal 0.4s cubic-bezier(0.34, 1.2, 0.64, 1); overflow: hidden; }
@keyframes slideUpModal { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.modern-modal-header { padding: 24px 24px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, rgba(184, 155, 94, 0.05), transparent); }
.modern-modal-header h3 { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--gold); }
.modern-modal-header h3 i { font-size: 1.3rem; }
.modern-modal-close { background: var(--bg-tertiary); border: none; width: 32px; height: 32px; border-radius: 50%; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.modern-modal-close:hover { background: var(--gold); color: #000; transform: rotate(90deg); }
.modern-modal-body { padding: 24px; }
.modern-input-group { margin-bottom: 20px; }
.modern-input-group label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); margin-bottom: 8px; }
.modern-input-group input, .modern-input-group textarea { width: 100%; padding: 14px 16px; background: var(--bg-tertiary); border: 2px solid var(--border); border-radius: 16px; color: var(--text-primary); font-family: inherit; font-size: 0.9rem; transition: all 0.2s; }
.modern-input-group input:focus, .modern-input-group textarea:focus { outline: none; border-color: var(--gold); background: var(--bg-elevated); }
.modern-modal-footer { padding: 16px 24px 24px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--border); }
.modern-btn-secondary { padding: 10px 24px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 40px; color: var(--text-secondary); font-weight: 600; cursor: pointer; transition: all 0.2s; }
.modern-btn-secondary:hover { background: var(--bg-elevated); color: var(--text-primary); transform: translateY(-2px); }
.modern-btn-primary { padding: 10px 28px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: none; border-radius: 40px; color: #000; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(184, 155, 94, 0.3); }
.modern-btn-primary:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(184, 155, 94, 0.4); }
.modern-btn-primary:disabled { opacity: 0.6; transform: none; cursor: not-allowed; }
.modern-btn-danger { padding: 10px 28px; background: linear-gradient(135deg, #e91429, #b01020); border: none; border-radius: 40px; color: white; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.modern-btn-danger:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(233, 20, 41, 0.4); }

/* ========== INFO POPUP ========== */
.info-popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 3000; animation: fadeIn 0.2s ease; }
.info-card { background: var(--bg-secondary); border-radius: 28px; width: 90%; max-width: 400px; padding: 32px; text-align: center; border: 1px solid var(--gold); box-shadow: 0 25px 50px -12px rgba(184, 155, 94, 0.3); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.info-logo { text-align: center; margin-bottom: 20px; }
.info-logo img { width: 80px; height: 80px; border-radius: 16px; object-fit: cover; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.info-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.info-card .subtitle { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px; }
.info-divider { height: 1px; background: var(--border); margin: 20px 0; }
.info-row-clickable { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); transition: all 0.2s; cursor: pointer; }
.info-row-clickable:hover { background: var(--bg-tertiary); border-radius: 12px; padding-left: 12px; padding-right: 12px; margin-left: -12px; margin-right: -12px; }
.info-label-icon { display: flex; align-items: center; gap: 12px; }
.info-label-icon i { width: 28px; font-size: 1.1rem; color: var(--gold); }
.info-label-icon span { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.info-value-clickable { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; color: var(--gold); }
.info-value-clickable i { font-size: 0.8rem; opacity: 0.7; transition: transform 0.2s; }
.info-row-clickable:hover .info-value-clickable i { transform: translateX(3px); opacity: 1; }
.share-native-btn { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: none; padding: 12px 24px; border-radius: 40px; color: #000; font-weight: 600; cursor: pointer; width: 100%; margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; font-size: 0.9rem; }
.share-native-btn:hover { transform: scale(1.02); background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.close-info { background: var(--gold); border: none; padding: 12px 24px; border-radius: 40px; color: #000; font-weight: 600; cursor: pointer; width: 100%; margin-top: 16px; transition: all 0.2s; }
.close-info:hover { transform: scale(1.02); background: var(--gold-light); }

/* ========== TOAST ========== */
#toast-container { position: fixed; top: 80px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 12px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-elevated); border-radius: 12px; border-left: 3px solid var(--gold); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); animation: slideIn 0.3s ease; }
.toast i { font-size: 1rem; }
.toast-success i { color: var(--gold); }
.toast-error i { color: #ff4444; }
@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 4rem; color: var(--gold); margin-bottom: 20px; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); }

/* ========== RESPONSIVO ========== */
@media (max-width: 1024px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-nav { display: block; }
    .content-area { padding-bottom: calc(var(--player-height) + var(--mobile-nav-height) + 60px); }
    .track-list-header { display: none; }
    .track-row { grid-template-columns: 48px 1fr 48px; }
    .track-album { display: none; }
    .card { width: 150px; }
    .playlists-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
}

@media (max-width: 768px) {
    .main-header { padding: 0 16px; }
    .section-header h2 { font-size: 1.2rem; }
    .search-header h2 { font-size: 1.4rem; }
    .search-input-wrapper { max-width: 100%; }
    .search-input-wrapper input { padding: 12px 16px 12px 44px; font-size: 0.9rem; }
    .search-result-item { padding: 10px 16px; }
    .search-result-artwork { width: 40px; height: 40px; }
    .search-result-title { font-size: 0.85rem; }
    .search-result-artist { font-size: 0.7rem; }
    .search-result-duration { font-size: 0.65rem; min-width: 40px; }
    .playlist-card-info h3 { font-size: 0.85rem; }
    .card { width: 140px; }
    .carousel { gap: 12px; }
}

@media (max-width: 480px) {
    .card { width: 130px; }
    .card-title { font-size: 0.8rem; }
    .card-artist { font-size: 0.65rem; }
}

/* ========== MARQUEE (TEXTO ROLANTE) ========== */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: inline-block;
    animation: marquee 8s linear infinite;
    padding-left: 100%;
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Para títulos na busca e player */
.track-title.marquee,
.player-title.marquee {
    cursor: pointer;
}

.player-title.marquee {
    max-width: 200px;
}

/* ========== PLAYER EXPANDIDO (MODAL) ========== */
.expanded-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    animation: expandPlayer 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    overflow-y: auto;
}

@keyframes expandPlayer {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.expanded-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.expanded-player-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expanded-player-close:hover {
    background: var(--gold);
    color: #000;
    transform: rotate(90deg);
}

.expanded-player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.expanded-artwork {
    width: 280px;
    height: 280px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 32px;
    animation: fadeInUp 0.4s ease;
}

.expanded-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.expanded-artwork i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: 20px;
}

.expanded-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.expanded-artist {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.expanded-controls {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
}

.expanded-control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.expanded-control-btn:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.expanded-play-btn {
    width: 64px;
    height: 64px;
    background: var(--gold);
    color: #000;
    border-radius: 50%;
    font-size: 1.5rem;
}

.expanded-play-btn:hover {
    transform: scale(1.08);
    background: var(--gold-light);
}

.expanded-progress {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.expanded-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    cursor: pointer;
}

.expanded-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    width: 0;
}

.expanded-time {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-secondary);
}

.expanded-volume {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
    margin-bottom: 32px;
}

.expanded-volume-slider {
    width: 150px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
}

.expanded-volume-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    width: 80%;
}

.expanded-queue {
    width: 100%;
    margin-top: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.expanded-queue h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.queue-item:hover {
    background: var(--bg-tertiary);
}

.queue-item.active {
    background: linear-gradient(135deg, rgba(184, 155, 94, 0.1), rgba(212, 180, 124, 0.05));
    border-left: 3px solid var(--gold);
}

.queue-artwork {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.queue-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-info {
    flex: 1;
}

.queue-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-artist {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.queue-duration {
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--text-secondary);
}

/* ========== AUTO-PLAY TOGGLE ========== */
.auto-play-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 20px;
    transition: all 0.2s;
}

.auto-play-toggle.active {
    color: var(--gold);
}

.auto-play-toggle i {
    font-size: 1rem;
}

.auto-play-toggle span {
    font-size: 0.7rem;
}

/* ========== MARQUEE NA BUSCA ========== */
.search-result-title-wrapper {
    overflow: hidden;
}

.search-result-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-title.marquee {
    text-overflow: clip;
    animation: marquee 8s linear infinite;
}

.search-result-title.marquee:hover {
    animation-play-state: paused;
}

/* Responsivo */
@media (max-width: 768px) {
    .expanded-artwork {
        width: 200px;
        height: 200px;
    }
    
    .expanded-title {
        font-size: 1.3rem;
    }
    
    .expanded-controls {
        gap: 20px;
    }
    
    .expanded-control-btn {
        padding: 8px;
        font-size: 1rem;
    }
    
    .expanded-play-btn {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
    
    .expanded-volume-slider {
        width: 100px;
    }
}