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

:root {
    --primary-color: #1DB954;
    --primary-hover: #1ed760;
    --background-dark: #121212;
    --background-light: #181818;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --player-height: 90px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    overflow: hidden;
}

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

.sidebar {
    width: 250px;
    background-color: #000000;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 32px;
    text-align: center;
    font-weight: bold;
}

.main-nav ul {
    list-style: none;
}

.main-nav li {
    margin-bottom: 16px;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav li.active a {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.icon {
    font-size: 20px;
}

.playlists {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.playlists h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
}

#playlist-list {
    list-style: none;
}

#playlist-list li {
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 8px;
}

#playlist-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    background: linear-gradient(180deg, #1e3a5f 0%, var(--background-dark) 300px);
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.desktop-only {
    display: block;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 20px;
}

.search-icon {
    font-size: 20px;
    color: var(--text-secondary);
}

.user-avatar-icon {
    font-size: 24px;
    color: var(--text-secondary);
}

.search-bar input {
    width: 400px;
    padding: 10px 16px;
    border-radius: 20px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    outline: none;
}

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

.search-bar button {
    padding: 10px 24px;
    border-radius: 20px;
    border: none;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.search-bar button:hover {
    transform: scale(1.05);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    position: relative;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
}

.user-dropdown-trigger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background-color: #282828;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    padding: 8px;
    z-index: 10000;
}

.user-dropdown-content.show {
    display: flex;
}

.user-dropdown-content a {
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.user-dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-dropdown-content a.danger {
    color: var(--primary-color);
}

.user-dropdown-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* modales de usuario */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    backdrop-filter: blur(5px);
}

.modal-content-user {
    background-color: #282828;
    width: 400px;
    padding: 32px;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    gap: 20px;
}

.modal-content-user.active {
    display: flex;
}

.modal-content-user h3 {
    font-size: 24px;
}

.modal-content-user h3.danger-text {
    color: white;
}

.modal-content-user input {
    width: 100%;
    padding: 12px;
    background-color: #3e3e3e;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
}

.modal-content-user input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.modal-actions button {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background-color: transparent;
    color: white;
}

/* botón de acción positiva (cambiar nombre) */
.modal-btn-save {
    background-color: var(--primary-color);
    color: black;
}

/* botón de acción destructiva (borrar) - ahora en blanco y muy discreto */
.modal-btn-danger {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.modal-btn-danger:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* highlight para cancelar/volver en el flujo de borrado */
#modal-delete-1 .modal-btn-cancel,
#modal-delete-2 .modal-btn-cancel {
    background-color: var(--primary-color);
    color: black;
}

#modal-delete-1 .modal-btn-cancel:hover,
#modal-delete-2 .modal-btn-cancel:hover {
    background-color: var(--primary-color); /* mantener el mismo verde */
    transform: none; /* sin escalado */
}

.content-area {
    padding: 32px;
}

.content-area h2 {
    font-size: 32px;
    margin-bottom: 24px;
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.song-card {
    background-color: var(--background-light);
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.song-card:hover {
    background-color: #282828;
    transform: translateY(-4px);
}

.song-card-image { overflow: hidden; display: flex; align-items: center; justify-content: center; 
    width: 100%;
    aspect-ratio: 1;
    background-color: #282828;
    border-radius: 4px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.song-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.song-card-title {
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.song-card-duration {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
}

/* reproductor flotante y neumorfista */
.player {
    height: var(--player-height);
    background-color: #1a1a1a !important; /* fondo sólido oscuro */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1400px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 9999; /* máxima prioridad sobre todo */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player.expanded {
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    transform: none;
    max-width: none;
    border-radius: 0;
    padding: 0;
    background: linear-gradient(180deg, #1e3a5f 0%, #121212 100%);
}

.player-expanded-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 500;
    padding: 60px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.player.expanded .player-expanded-view,
.player.closing .player-expanded-view {
    visibility: visible;
    opacity: 1;
}

/* ocultar elementos del mini player cuando está expandido o cerrándose */
.player.expanded .player-left,
.player.expanded .player-right,
.player.closing .player-left,
.player.closing .player-right {
    opacity: 0;
    pointer-events: none;
}

.player.expanded .player-center {
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    padding: 0 60px;
    z-index: 1001;
}

.expanded-content {
    display: flex;
    gap: 80px;
    align-items: center;
    justify-content: center;
    height: calc(100% - 140px);
}

.expanded-left {
    flex: 1;
    max-width: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.expanded-left h3 {
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 24px;
}

.queue-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.expanded-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.large-cover {
    width: 100%;
    max-width: 380px; /* reducido de 500px */
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    margin-bottom: 30px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.large-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.expanded-info h2 {
    font-size: 32px; /* reducido de 48px */
    font-weight: 800;
    margin-bottom: 8px;
}

.expanded-info h3 {
    font-size: 18px; /* reducido de 24px */
    color: var(--text-secondary);
    font-weight: 500;
}

.close-expanded {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 1002;
}

.close-expanded:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* botón play más pequeño y estilizado */
.player-controls .play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.player-controls .play-btn:hover {
    transform: scale(1.1);
}

/* transiciones entre canciones */
.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.slide-out-right {
    transform: translateX(100%);
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.clone-artwork {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.player-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-image {
    width: 56px;
    height: 56px;
    background-color: #282828;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-title {
    font-weight: bold;
    font-size: 14px;
}

.song-artist {
    color: var(--text-secondary);
    font-size: 12px;
}

.player-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

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

.control-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
}

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

.play-btn {
    font-size: 32px;
}

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

.time {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-filled {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.player-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.volume-slider {
    width: 100px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar span:not(.icon) {
        display: none;
    }
    
    .playlists-nav {
        display: none;
    }
    
    .search-bar input {
        width: 200px;
    }
    
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* estilos para iconos font awesome */
.fas, .fa {
    font-size: inherit;
}

.song-card-image i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.8);
}

.song-image i {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.6);
}

.main-nav i {
    font-size: 20px;
    min-width: 20px;
}

.control-btn i {
    font-size: inherit;
    pointer-events: none;
}

.play-btn i {
    font-size: 24px;
}

/* ====== estilos de autenticación ====== */

.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #000000;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-card {
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background-color: var(--primary-color);
    color: #000;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.auth-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(29, 185, 84, 0.3);
}

.auth-btn:active {
    transform: scale(0.98);
}

/* social auth styles */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #888;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #333;
}

.auth-divider span {
    padding: 0 10px;
    font-size: 0.85rem;
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s;
    font-size: 14px;
}

.google-btn {
    background-color: #fff;
    color: #000;
}

.apple-btn {
    background-color: #000;
    color: #fff;
}

.social-btn:hover {
    transform: scale(1.02);
}

.auth-error {
    padding: 12px;
    border-radius: 6px;
    background-color: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* ====== estilos de subida ====== */

.upload-container {
    max-width: 600px;
    background-color: var(--background-light);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.upload-info {
    margin-bottom: 24px;
    padding: 16px;
    background-color: rgba(29, 185, 84, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.standard-form .form-group {
    margin-bottom: 24px;
}

.standard-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.standard-form input[type="text"],
.standard-form input[type="file"] {
    width: 100%;
    padding: 12px;
    background-color: #282828;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
    outline: none;
}

.standard-form input[type="text"]:focus {
    border-color: var(--primary-color);
}

.upload-status {
    margin-top: 24px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.upload-status.success {
    background-color: rgba(29, 185, 84, 0.2);
    color: var(--primary-color);
}

.upload-status.error {
    background-color: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.standard-select {
    width: 100%;
    padding: 12px;
    background-color: #282828;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
    outline: none;
    cursor: pointer;
}

.standard-select:focus {
    border-color: var(--primary-color);
}

.upload-status.info {
    background-color: rgba(30, 58, 95, 0.4);
    border-left: 4px solid #1e3a5f;
    color: #b3b3b3;
}

/* ====== vistas grid y lista ====== */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-toggles {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: #282828;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #333;
    color: white;
}

.view-btn.active {
    background: white;
    color: black;
}

/* lista de canciones */
.songs-list {
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.list-header {
    display: grid;
    grid-template-columns: 60px 2fr 1fr 1fr;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list-item {
    display: grid;
    grid-template-columns: 60px 2fr 1fr 1fr;
    padding: 10px 16px;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.list-item .item-cover {
    width: 40px;
    height: 40px;
    background: #282828;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-item .item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-item .item-cover i {
    font-size: 18px;
    color: var(--text-secondary);
}

.list-item .item-info {
    display: flex;
    flex-direction: column;
}

.list-item .item-title {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.list-item .item-artist {
    color: var(--text-secondary);
    font-size: 13px;
}

.list-item .item-album, 
.list-item .item-date {
    color: var(--text-secondary);
    font-size: 13px;
}

@media (max-width: 900px) {
    .list-header, .list-item {
        grid-template-columns: 60px 1fr 1fr;
    }
    .col-date, .item-date {
        display: none;
    }
}

@media (max-width: 600px) {
    .list-header, .list-item {
        grid-template-columns: 60px 1fr;
    }
    .col-album, .item-album {
        display: none;
    }
    
    .player-right {
        display: none;
    }
    
    .player-left {
        flex: 2;
    }
    
    .song-image {
        width: 40px;
        height: 40px;
    }
    
    .player-controls {
        gap: 8px;
    }
    
    .play-btn {
        font-size: 24px;
    }
}

/* estilos para playlists */
.playlists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

#create-playlist-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

#create-playlist-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.playlist-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 20px 0 32px 0;
}

.playlist-image-container {
    width: 232px;
    height: 232px;
    position: relative;
    box-shadow: 0 4px 60px rgba(0,0,0,0.5);
    cursor: pointer;
    overflow: hidden;
}

.playlist-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
}

.playlist-image-container:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    font-size: 48px;
    margin-bottom: 8px;
}

.playlist-info {
    flex: 1;
}

.playlist-type {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.playlist-item {
    margin-bottom: 8px;
}

.playlist-item a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.playlist-item a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.playlist-item.active a {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.editable-title {
    font-size: 72px;
    font-weight: 900;
    margin: 8px 0;
    cursor: text;
    transition: color 0.2s;
    outline: none;
    border: 1px solid transparent;
    padding: 0 4px;
}

.editable-title:focus {
    border-bottom: 1px solid var(--text-secondary);
}

.editable-title:hover {
    color: white;
}

.playlist-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.play-btn:hover {
    transform: scale(1.05);
    background-color: #1ed760;
}

.options-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.options-btn:hover {
    color: var(--text-primary);
}

/* dropdown menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #282828;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 100;
    border-radius: 4px;
    margin-top: 4px;
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.dropdown-content.show {
    display: block;
}

.playlist-songs {
    margin-top: 24px;
}

/* menu contextual */
.context-menu {
    position: fixed;
    background-color: #282828;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 4px;
    padding: 4px 0;
}

.context-menu-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: bold;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
}

.context-menu-item {
    padding: 10px 12px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background-color: rgba(255,255,255,0.1);
}

/* drag and drop feedback */
.playlist-item.drag-over {
    background-color: rgba(255,255,255,0.2) !important;
    transform: scale(1.02);
}

/* cursor para elementos arrastrables */
.song-card, .list-item, .player-left .song-info {
    cursor: pointer;
}

[draggable="true"] {
    user-select: none;
}

/* barra de progreso interactiva */
.progress-container {
    flex: 1;
    height: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0 10px;
}

.progress-container:hover .progress-bar {
    height: 6px;
}

.progress-container:hover .progress-filled {
    background-color: var(--primary-color);
}

/* ajustes finales ui */
.playlist-item span {
    font-size: 14px;
    padding: 2px 0;
}

.song-info {
    cursor: grab;
}

.song-info:active {
    cursor: grabbing;
}

/* REPRODUCTOR CENTRADO Y ANCHO */
.player-center {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 1000px;
}

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

.progress-container {
    flex: 1;
    height: 6px;
    background-color: #4d4d4d;
    border-radius: 3px;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    width: 0;
}

/* ====== RESPONSIVO MÓVIL ====== */

.mobile-only, .mobile-bottom-menu {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    /* barra inferior neumórfica */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 75px;
        background-color: #1a1a1a;
        padding: 0;
        flex-direction: row;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        z-index: 10001;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
        border-radius: 20px 20px 0 0;
        display: flex !important;
    }

    .logo, .playlists-nav {
        display: none !important;
    }

    .main-nav {
        width: 100%;
        height: 100%;
    }

    .main-nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
        margin: 0;
        padding: 0;
    }

    .main-nav li {
        margin: 0;
        flex: 1;
    }

    .main-nav a {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 0;
        height: 100%;
        background: none !important;
    }

    .main-nav a i {
        font-size: 22px;
    }

    .main-nav a span {
        display: none; /* solo iconos */
    }

    .main-nav li.active a i {
        color: var(--primary-color);
    }

    /* reproductor móvil ultra-minimalista con barrita inferior */
    .player {
        bottom: 95px;
        width: calc(100% - 24px);
        left: 50%;
        transform: translateX(-50%);
        height: 85px; 
        min-height: 85px;
        border-radius: 24px;
        display: grid !important;
        grid-template-areas: "artwork details play";
        grid-template-columns: 60px 1fr 60px;
        align-items: center;
        gap: 12px;
        padding: 0 20px;
        background-color: #1a1a1a !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        overflow: hidden; /* para que la barrita no se salga de las esquinas redondeadas */
        border: 1px solid rgba(255,255,255,0.05);
        position: fixed;
    }

    /* la pequeña barrita en la parte de abajo */
    .player::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        height: 4px; /* muy finita */
        background-color: var(--primary-color);
        width: var(--progress-percent, 0%);
        transition: width 0.1s linear;
    }

    .player-left {
        grid-area: artwork;
        display: flex !important;
        justify-content: flex-start;
    }

    .player-left .song-image {
        width: 55px !important;
        height: 55px !important;
        margin: 0 !important;
    }

    /* texto grande y centrado en la única fila */
    .player-left .song-details {
        grid-area: details;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        text-align: center;
    }

    .player-left .song-title {
        font-size: 16px !important;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        color: white;
    }

    .player-left .song-artist {
        font-size: 13px !important;
        color: var(--text-secondary);
    }

    .player-center {
        grid-area: play;
        display: flex !important;
        justify-content: flex-end !important;
        width: auto !important;
        margin: 0 !important;
    }

    .player-controls {
        display: flex !important;
        justify-content: flex-end !important;
    }

    .player-controls #prev-btn, .player-controls #next-btn {
        display: none !important;
    }

    .play-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin: 0 !important;
    }

    /* barra de progreso oculta en el mini */
    .player-progress {
        display: none !important;
    }

    .player-right {
        display: none !important;
    }

    /* ajustes slideup móvil */
    .player.expanded .player-center {
        bottom: 140px !important; /* subir controles */
        position: fixed;
        left: 0;
        right: 0;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .player.expanded .player-controls {
        display: flex !important;
        gap: 40px;
        justify-content: center;
    }

    .player.expanded .player-controls #prev-btn, 
    .player.expanded .player-controls #next-btn {
        display: flex !important;
        font-size: 24px;
        color: white;
    }

    .player.expanded .play-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .player.expanded .player-progress {
        display: flex !important;
        width: 85% !important;
        margin-top: 24px;
    }

    .player.expanded .player-progress .time {
        display: block !important;
        color: white;
    }

    .expanded-left {
        display: none !important;
    }

    .expanded-content {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .large-cover {
        max-width: 320px;
        margin-top: 60px; /* bajar carátula */
        margin-bottom: 12px; /* reducir espacio con título */
    }

    .expanded-info {
        text-align: center;
    }

    .expanded-info h2 {
        font-size: 26px;
        margin-bottom: 2px;
    }

    .expanded-info h3 {
        font-size: 18px;
    }

    /* MENÚ PLAYLISTS MÓVIL (Bottom Sheet) */
    .mobile-bottom-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 11000;
        display: none;
        align-items: flex-end;
    }

    .mobile-bottom-menu.show {
        display: flex !important;
    }

    .menu-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
    }

    .menu-content {
        position: relative;
        width: 100%;
        background-color: #1a1a1a;
        border-radius: 32px 32px 0 0;
        padding: 32px;
        max-height: 75%;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
        animation: slideUpMob 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    @keyframes slideUpMob {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .menu-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
    }

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

    .mobile-add-btn, .mobile-close-btn {
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .mobile-add-btn {
        background-color: var(--primary-color);
        color: black;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    .mobile-close-btn:active {
        background-color: rgba(255, 255, 255, 0.2);
    }

    #mobile-playlist-list-content {
        list-style: none;
        padding: 0;
    }

    #mobile-playlist-list-content li {
        margin-bottom: 8px;
    }

    #mobile-playlist-list-content a {
        color: white;
        text-decoration: none;
        font-size: 18px;
        display: block;
        padding: 18px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* ajustes para vista de detalle de playlist en móvil */
    .playlist-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 20px;
        gap: 16px;
    }

    .playlist-image-container {
        width: 200px;
        height: 200px;
        margin-bottom: 8px;
    }

    .playlist-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .editable-title {
        font-size: 36px;
        text-align: center;
        line-height: 1.2;
    }

    .playlist-actions {
        justify-content: center;
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .top-bar {
        padding: 16px 20px;
        background-color: transparent;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }

    .search-bar {
        flex: 1;
        background-color: rgba(255, 255, 255, 0.1);
        padding: 8px 16px;
        border-radius: 500px;
        display: flex;
        align-items: center;
        gap: 8px;
        width: auto;
    }

    .search-icon {
        color: var(--text-secondary);
        font-size: 16px;
        display: block !important;
    }

    .search-bar input {
        width: 100%;
        background-color: transparent;
        padding: 0;
        font-size: 15px;
    }

    .user-dropdown-trigger {
        background: none !important;
        padding: 0 !important;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-avatar-icon {
        font-size: 28px;
        color: white;
    }

    #user-name {
        display: none;
    }

    /* adjust the user dropdown positioning on mobile if necessary */
    .user-dropdown-content {
        top: calc(100% + 12px);
    }
}
