:root {
    /* Pink Aesthetic Dark Theme */
    --bg-base: #0a0407;
    --bg-surface: #170711;
    --bg-surface-hover: #260c1d;
    --bg-player: #12050d;
    
    --primary: #ff3377;
    --primary-hover: #ff5c93;
    --primary-glow: rgba(255, 51, 119, 0.4);
    
    --text-main: #ffffff;
    --text-muted: #ffb3c6;
    --text-dark: #8c5a71;
    
    --border: #3d1b33;
    
    --font-family: 'Outfit', sans-serif;
    --sidebar-width: 250px;
    --player-height: 90px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-hover);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.app-container {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--player-height));
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-base);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-right: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 16px;
    border-radius: 8px;
}

.nav-item i {
    font-size: 24px;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    background-color: var(--bg-surface);
}

.nav-item.active {
    color: var(--primary);
    background-color: rgba(255, 51, 119, 0.1);
}

.sidebar-playlists {
    flex: 1;
    overflow-y: auto;
}

.sidebar-playlists h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-left: 16px;
}

.sidebar-playlists ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-playlists a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    display: block;
}

.sidebar-playlists a:hover {
    color: var(--text-main);
    background-color: var(--bg-surface-hover);
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* =========================================
   MAIN CONTENT
   ========================================= */
.main-content {
    flex: 1;
    background: linear-gradient(180deg, #2b0e20 0%, var(--bg-base) 100%);
    overflow-y: auto;
    position: relative;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    position: sticky;
    top: 0;
    background: rgba(10, 4, 7, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 20;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-arrows {
    display: flex;
    gap: 8px;
}

.nav-arrow-btn {
    background: var(--bg-surface-hover);
    color: var(--text-muted);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.nav-arrow-btn:hover {
    background: var(--text-main);
    color: var(--bg-base);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-surface);
    padding: 10px 20px;
    border-radius: 24px;
    width: 320px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 51, 119, 0.2);
}

.search-bar i {
    color: var(--text-muted);
    font-size: 20px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: var(--text-dark);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    padding: 4px 16px 4px 4px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background: var(--bg-surface-hover);
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    padding: 60px 32px 40px;
    display: flex;
    align-items: flex-end;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,51,119,0.15) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    background-color: rgba(255, 51, 119, 0.2);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-content h1 {
    font-size: 72px;
    line-height: 1.1;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 16px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 51, 119, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 13px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* Songs List */
.songs-section {
    padding: 0 32px 60px;
    position: relative;
    z-index: 2;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.songs-table-header {
    display: grid;
    grid-template-columns: 40px 1fr 200px 80px;
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.song-item {
    display: grid;
    grid-template-columns: 40px 1fr 200px 80px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.song-item:hover {
    background-color: var(--bg-surface);
}

.song-item.active {
    background-color: rgba(255, 51, 119, 0.1);
}

.song-index-container {
    width: 30px;
    display: flex;
    justify-content: center;
}

.song-index {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.song-play-icon {
    display: none;
    color: var(--primary);
    font-size: 20px;
}

.song-item:hover .song-index { display: none; }
.song-item:hover .song-play-icon { display: block; color: var(--text-main); }

.song-item.active .song-index { display: none; }
.song-item.active .song-play-icon { display: block; color: var(--primary); }

.song-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 16px;
}

.song-title {
    font-weight: 500;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item.active .song-title {
    color: var(--primary);
}

.song-artist {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    color: var(--text-muted);
    font-size: 14px;
}

/* =========================================
   PLAYER FOOTER
   ========================================= */
.player {
    height: var(--player-height);
    background-color: var(--bg-player);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: relative;
    z-index: 30;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 30%;
    min-width: 180px;
}

.now-playing-img {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4a1532, var(--primary));
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    overflow: hidden;
}

.now-playing-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.now-playing-info h4 {
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.now-playing-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.icon-btn:hover {
    color: var(--text-main);
}

.like-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 40%;
    max-width: 600px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--text-main);
    color: var(--bg-base);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.progress-container span {
    font-size: 12px;
    color: var(--text-muted);
    width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.progress-bar-wrapper, .volume-bar-wrapper {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.progress-bar, .volume-bar {
    height: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
    width: 0%;
    position: relative;
    transition: background-color 0.2s ease;
}

.progress-bar::after, .volume-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-bar-wrapper:hover .progress-bar, .volume-bar-wrapper:hover .volume-bar {
    background-color: var(--primary);
}

.progress-bar-wrapper:hover .progress-bar::after, .volume-bar-wrapper:hover .volume-bar::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 30%;
    min-width: 180px;
}

.volume-bar-wrapper {
    width: 100px;
    flex: none;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .songs-table-header, .song-item {
        grid-template-columns: 40px 1fr 80px;
    }
    .th-artist, .song-artist-col {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        display: none; /* In a real app, use a hamburger menu */
    }
    
    .player {
        padding: 0 16px;
    }

    .player-left {
        width: 40%;
    }
    
    .player-right {
        display: none;
    }
    
    .player-center {
        width: 60%;
    }
    
    .progress-container {
        display: none; /* Hide progress bar on small mobile for space */
    }
    
    .topbar {
        padding: 16px;
    }
    
    .search-bar {
        width: 200px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
}
