/* ============================================ */
/* CHICAGO SMOOTH JAZZ PLAYER - CSS PRINCIPAL */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #0f0f0f 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
}

/* ============================================ */
/* HEADER FIJO CON FONDO OSCURO */
/* ============================================ */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.95), rgba(30, 30, 30, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    min-height: 70px; /* Altura más compacta */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #f8b500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.total-songs-counter {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: normal;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    background: linear-gradient(135deg, #333333, #444444);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.header-btn:hover {
    background: linear-gradient(135deg, #444444, #555555);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.config-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
}

.config-btn:hover {
    background: linear-gradient(135deg, #ff8fb3, #d55579);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
}

.user-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================ */
/* CONTENEDOR PRINCIPAL DEL PLAYER */
/* ============================================ */
.player-container {
    margin-top: 70px;
    padding: 30px 20px;
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.player-card {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.9), rgba(30, 30, 30, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px 35px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    text-align: center;
}

/* INFO DE CARPETA Y CANCIÃ“N */
.track-info {
    margin-bottom: 25px;
}

.folder-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 500;
}

.song-name {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.song-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* ============================================ */
/* BARRA DE PROGRESO */
/* ============================================ */
.progress-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(30, 30, 30, 0.6));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(60, 60, 60, 0.8), rgba(80, 80, 80, 0.6));
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #c44569, #f8b500);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
}

.progress-handle {
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 2px solid rgba(255, 107, 157, 0.8);
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.current-time {
    color: #ff6b9d;
    background: rgba(255, 107, 157, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.total-time {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/* INDICADOR DE PRECARGA */
/* ============================================ */
.preload-section {
    margin: 25px 0;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.9), rgba(35, 35, 35, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.4s ease;
}

.preload-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.preload-icon {
    font-size: 20px;
    min-width: 25px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.preload-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.next-song-info {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 40px;
    font-style: italic;
    line-height: 1.4;
}

/* ============================================ */
/* BOTÃ“N PLAY/PAUSE */
/* ============================================ */
.play-button {
    margin-top: 25px;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4); */
    letter-spacing: 1px;
    min-width: 160px;
}

.play-button:hover {
    transform: translateY(-3px);
    /* box-shadow: 0 12px 35px rgba(255, 107, 157, 0.6); */
    background: linear-gradient(135deg, #ff8fb3, #d55579);
}

.play-button:active {
    transform: translateY(-1px);
}

/* ============================================ */
/* ESTADOS DE PRECARGA */
/* ============================================ */
.preload-waiting {
    border-color: rgba(248, 181, 0, 0.4);
    background: linear-gradient(135deg, rgba(248, 181, 0, 0.1), rgba(248, 181, 0, 0.05));
}

.preload-waiting .preload-icon {
    color: #f8b500;
    text-shadow: 0 0 10px rgba(248, 181, 0, 0.5);
}

.preload-waiting .preload-text {
    color: #f8b500;
}

.preload-loading {
    border-color: rgba(248, 181, 0, 0.6);
    background: linear-gradient(135deg, rgba(248, 181, 0, 0.15), rgba(248, 181, 0, 0.08));
}

.preload-loading .preload-icon {
    color: #f8b500;
    animation: spin 1.2s linear infinite;
    text-shadow: 0 0 15px rgba(248, 181, 0, 0.6);
}

.preload-loading .preload-text {
    color: #f8b500;
}

.preload-ready {
    border-color: rgba(46, 204, 113, 0.6);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(46, 204, 113, 0.08));
    animation: readyPulse 2s ease-in-out infinite;
}

.preload-ready .preload-icon {
    color: #2ecc71;
    text-shadow: 0 0 15px rgba(46, 204, 113, 0.6);
}

.preload-ready .preload-text {
    color: #2ecc71;
}

.preload-error {
    border-color: rgba(231, 76, 60, 0.6);
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.08));
}

.preload-error .preload-icon {
    color: #e74c3c;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.preload-error .preload-text {
    color: #e74c3c;
}

/* ============================================ */
/* DASHBOARD MODAL */
/* ============================================ */
#dashboard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    width: 350px;
    max-width: 90%;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

#dashboard.hidden {
    display: none;
}

/* HEADER DEL DASHBOARD */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header h3 {
    color: #ff6b9d;
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e74c3c;
    color: white;
}

/* INFORMACIÃ“N DEL USUARIO EN DASHBOARD */
.dashboard-user-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    color: white;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-icon {
    font-size: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-icon:hover {
    background: rgba(255,255,255,0.3);
}

.user-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 2px;
}

.user-phone {
    font-size: 12px;
    opacity: 0.8;
}

.edit-name-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    color: white;
    transition: background 0.3s ease;
}

.edit-name-btn:hover {
    background: rgba(255,255,255,0.3);
}

.edit-name-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.edit-name-form.hidden {
    display: none;
}

.edit-name-form input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.edit-buttons {
    display: flex;
    gap: 8px;
}

.edit-buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    color: white;
    transition: background 0.3s ease;
}

.edit-buttons button:hover {
    background: rgba(255,255,255,0.3);
}

.dashboard-title {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
}

/* ESTADÃSTICAS DE REPRODUCCIÃ“N */
.dashboard-stats {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-stats h4 {
    color: #ff6b9d;
    margin: 0 0 15px 0;
    font-size: 16px;
    text-align: center;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.history-section {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 126, 95, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 126, 95, 0.2);
}

.reset-btn {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 126, 95, 0.4);
    background: linear-gradient(135deg, #ff9472 0%, #ffc48e 100%);
}

.reset-btn:active {
    transform: translateY(0);
}

.reset-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reset-warning {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-style: italic;
    display: block;
    text-align: center;
    line-height: 1.4;
}

/* SECCIÃ“N DE FOLDERS */
.folders-section {
    margin: 20px 0;
}

.folders-section h4 {
    color: #ff6b9d;
    margin: 0 0 15px 0;
    font-size: 16px;
    text-align: center;
}

/* FOLDER ITEMS */
.folderItem {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #333;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
    gap: 15px;
}

.folderItem:hover {
    background: #444;
}

.folderItem.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.dragHandle {
    cursor: grab;
    color: #888;
    font-size: 16px;
}

.dragHandle:active {
    cursor: grabbing;
}

.folder-display {
    flex-grow: 1;
    text-align: left;
}

.folder-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.folder-technical {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.folder-song-count {
    font-size: 12px;
    color: #bbb;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder-slider {
    width: 80px;
}

.sliderValue {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    color: #27ae60;
}

/* VISTA PREVIA DEL PATRÃ“N */
.pattern-preview {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.pattern-preview h4 {
    margin: 0 0 10px 0;
    color: #f8b500;
    font-size: 14px;
    text-align: center;
}

#patternSequence {
    font-size: 13px;
    color: #ccc;
    line-height: 1.4;
    text-align: center;
}

/* BOTÃ“N GUARDAR */
.save-btn {
    width: 100%;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: linear-gradient(135deg, #58d68d, #2ecc71);
    transform: translateY(-2px);
}

/* LISTA DE FOLDERS */
#folderList {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ============================================ */
/* LOGIN MODAL */
/* ============================================ */
#loginModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#loginModal.hidden {
    display: none;
}

.login-container {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-container h2 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.2);
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 157, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

#verificationStep {
    display: none;
}

.success-message {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: #ffffff;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

.error-message {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: #ffffff;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

/* ============================================ */
/* SISTEMA DE FOTOS DE PERFIL */
/* ============================================ */
.profile-photo-container {
    position: relative;
    display: inline-block;
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-photo:hover {
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.05);
}

.default-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.default-avatar:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.photo-modal.hidden {
    display: none;
}

.photo-options {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    width: 90%;
}

.photo-options h3 {
    color: white;
    margin-bottom: 25px;
    font-size: 20px;
}

.photo-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-btn-camera {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
}

.photo-btn-gallery {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.photo-btn-delete {
    background: linear-gradient(45deg, #ff416c, #ff4757);
    color: white;
}

.photo-btn-cancel {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hidden-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dashboard-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
    cursor: pointer;
    margin-right: 15px;
}

.photo-loading {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

/* ============================================ */
/* CONFIRMACIONES Y MENSAJES */
/* ============================================ */
.save-confirmation {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.confirmation-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.confirmation-pattern {
    font-size: 12px;
    opacity: 0.9;
}

.hidden {
    display: none;
}

/* ============================================ */
/* ANIMACIONES */
/* ============================================ */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes readyPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
        transform: scale(1.01);
    }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ============================================ */
/* NUEVO HEADER PERSONALIZADO */
/* ============================================ */

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 25px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4px;
    position: relative;
}

/* Línea 1: Título principal con saludo */
.header-main-title {
    text-align: center;
    width: 100%;
}

#userGreeting {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #f8b500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

/* Línea 2: Info de canciones centrada */
.header-song-info {
    text-align: center;
    width: 100%;
}

.header-song-info .total-songs-counter {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: normal;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
}

/* Línea 3: Botones posicionados a la derecha */
.header-controls {
    position: absolute;
    top: 8px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ============================================ */
/* BOTÓN PLAY INTEGRADO */
/* ============================================ */

.integrated-play-section {
    margin: 5px 0;
    text-align: center;
}

.integrated-play-section .play-button {
    margin: 0;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4); */
    letter-spacing: 1px;
    min-width: 160px;
}

.integrated-play-section .play-button:hover {
    transform: translateY(-3px);
    /* box-shadow: 0 12px 35px rgba(255, 107, 157, 0.6); */
    background: linear-gradient(135deg, #ff8fb3, #d55579);
}

.integrated-play-section .play-button:active {
    transform: translateY(-1px);
}



/* ============================================ */
/* RESPONSIVE DESIGN - MÓVILES DESDE CERO */
/* ============================================ */

/* Variables para safe areas */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

/* ============================================ */
/* TABLETS Y PANTALLAS MEDIANAS (481px - 1024px) */
/* ============================================ */
@media (max-width: 1024px) and (min-width: 481px) {
    .header-content {
        padding: 12px 20px;
        gap: 6px;
    }

    .header-title, #userGreeting {
        font-size: 20px;
    }

    .header-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .player-container {
        margin-top: 75px;
        padding: 20px 15px;
        max-width: 500px;
    }

    .player-card {
        padding: 30px 25px;
    }

    .song-name {
        font-size: 18px;
        min-height: 40px;
    }

    .integrated-play-section .play-button {
        padding: 15px 30px;
        font-size: 18px;
        min-width: 140px;
    }
}

/* ============================================ */
/* TODOS LOS MÓVILES (hasta 480px) */
/* ============================================ */
@media (max-width: 480px) {
    /* HEADER PERSONALIZADO MÓVIL */
    .header-container {
        min-height: 160px;
        padding-top: calc(15px + var(--safe-area-inset-top));
        padding-bottom: 15px;
        background: linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(30, 30, 30, 0.98));
        backdrop-filter: blur(20px);
    }

    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 15px 15px 15px;
        gap: 8px;
        position: relative;
        min-height: 70px;
    }

    /* Línea 1: Saludo personalizado */
    .header-main-title {
        text-align: center;
        width: 100%;
        order: 1;
    }

    #userGreeting {
        font-size: 16px;
        font-weight: bold;
        background: linear-gradient(45deg, #ff6b9d, #c44569, #f8b500);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        display: inline-block;
        line-height: 1.2;
    }

    /* Línea 2: Info de canciones */
    .header-song-info {
        text-align: center;
        width: 100%;
        order: 2;
    }

    .header-song-info .total-songs-counter {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.7);
        background: rgba(255, 255, 255, 0.05);
        padding: 3px 8px;
        border-radius: 12px;
        font-weight: normal;
        letter-spacing: 0.5px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: inline-block;
    }

    /* Línea 3: Botones a la derecha */
    .header-controls {
        position: absolute;
        top: 8px;
        right: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
        order: 3;
    }

    .config-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        background: linear-gradient(135deg, #ff6b9d, #c44569);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .header-btn {
        background: linear-gradient(135deg, #333333, #444444);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 15px;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.3s ease;
        min-height: 36px;
        flex-shrink: 0;
    }

    /* Ocultar elementos desktop en móvil */
    .user-info {
        display: none;
    }

    .header-title {
        display: none;
    }

    /* PLAYER CONTAINER MÓVIL */
    .player-container {
        margin-top: calc(170px + var(--safe-area-inset-top));
        padding: 15px 12px;
        min-height: calc(100vh - 125px - var(--safe-area-inset-top));
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .player-card {
        padding: 20px 15px;
        border-radius: 15px;
        width: 100%;
        min-height: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        box-sizing: border-box;
        margin-top: 0;
    }

    /* ELEMENTOS DEL PLAYER CON ESPACIADO COMPACTO */
    .track-info {
        margin-bottom: 15px;
        flex-shrink: 0;
        width: 100%;
        text-align: center;
    }

    .song-name {
        font-size: 16px;
        min-height: 40px;
        line-height: 1.2;
        margin-bottom: 8px;
        padding: 5px 0;
    }

    .folder-info {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .song-count {
        font-size: 11px;
    }

    /* BOTÓN PLAY INTEGRADO */
    .integrated-play-section {
        margin: 10px 0;
        text-align: center;
        flex-shrink: 0;
    }

    .integrated-play-section .play-button {
        margin: 0;
        padding: 15px 30px;
        font-size: 16px;
        font-weight: bold;
        border: none;
        border-radius: 25px;
        background: linear-gradient(135deg, #ff6b9d, #c44569);
        color: #ffffff;
        cursor: pointer;
        transition: all 0.3s ease;
        /* box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4); */
        letter-spacing: 1px;
        min-width: 130px;
    }

    /* PROGRESS SECTION COMPACTA */
    .progress-section {
        margin: 12px 0;
        padding: 12px;
        background: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(30, 30, 30, 0.6));
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
        width: 100%;
    }

    .progress-bar {
        height: 8px;
        margin-bottom: 12px;
    }

    .time-display {
        font-size: 13px;
    }

    /* PRELOAD SECTION COMPACTA */
    .preload-section {
        margin: 10px 0;
        background: linear-gradient(135deg, rgba(25, 25, 25, 0.9), rgba(35, 35, 35, 0.7));
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 12px;
        transition: all 0.4s ease;
        flex-shrink: 0;
        width: 100%;
    }

    .preload-status {
        gap: 12px;
        margin-bottom: 8px;
    }

    .preload-text {
        font-size: 14px;
    }

    .next-song-info {
        font-size: 11px;
        margin-left: 28px;
    }

    /* DASHBOARD MÓVIL */
    #dashboard {
        width: 95%;
        max-width: 350px;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
    }

    /* ELEMENTOS DASHBOARD MÓVIL */
    .dashboard-stats {
        margin: 15px 0;
        padding: 12px;
    }
    
    .stat-item {
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .history-section {
        padding: 12px;
    }
    
    .reset-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .reset-warning {
        font-size: 11px;
    }

    .folderItem {
        padding: 10px;
        margin-bottom: 6px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .folderItem .dragHandle {
        display: none;
    }
    
    .folder-name {
        font-size: 14px;
        font-weight: bold;
        text-align: center;
    }
    
    .slider-container {
        justify-content: center;
        gap: 15px;
    }
    
    .folder-slider {
        width: 120px;
    }
    
    .sliderValue {
        font-size: 16px;
        min-width: 25px;
    }

    /* ELEMENTOS USUARIO DASHBOARD */
    .user-details {
        gap: 10px;
    }
    
    .user-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .profile-photo {
        width: 35px !important;
        height: 35px !important;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-phone {
        font-size: 11px;
    }
    
    .edit-name-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .dashboard-title {
        font-size: 12px;
    }

    /* LOGIN MODAL MÓVIL */
    .login-container {
        width: 95%;
        padding: 25px 20px;
    }

    /* PHOTO MODAL MÓVIL */
    .photo-modal .photo-options {
        width: 95%;
        padding: 20px 15px;
        margin: 10px;
    }
    
    .photo-options h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .photo-btn {
        padding: 12px;
        margin: 8px 0;
        font-size: 14px;
    }

    /* CONFIRMACIONES MÓVIL */
    .save-confirmation {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
        font-size: 14px;
        padding: 8px 15px;
    }
}

/* ============================================ */
/* IPHONE SE Y MÓVILES PEQUEÑOS (hasta 375px) */
/* ============================================ */
@media (max-width: 375px) {
    .header-container {
        min-height: 95px;
        padding-top: calc(12px + var(--safe-area-inset-top));
        padding-bottom: 12px;
    }

    .header-content {
        padding: 8px 12px 12px 12px;
        gap: 6px;
        min-height: 65px;
    }

    #userGreeting {
        font-size: 15px;
    }

    .header-song-info .total-songs-counter {
        font-size: 10px;
        padding: 2px 6px;
    }

    .header-controls {
        top: 6px;
        right: 12px;
        gap: 6px;
    }

    .config-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .header-btn {
        padding: 5px 10px;
        font-size: 11px;
        min-height: 34px;
    }

    .player-container {
    margin-top: calc(160px + var(--safe-area-inset-top));
    padding: 5px;
    min-height: calc(100vh - 200px - var(--safe-area-inset-top));
}

    .player-card {
        padding: 8px;
    }

    .song-name {
        font-size: 15px;
        min-height: 38px;
    }

    .integrated-play-section .play-button {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 120px;
    }

    .progress-section, .preload-section {
        padding: 10px;
        margin: 8px 0;
    }

    .preload-text {
        font-size: 13px;
    }

    .next-song-info {
        font-size: 10px;
        margin-left: 25px;
    }
}

/* ============================================ */
/* MÓVILES MUY PEQUEÑOS (hasta 320px) */
/* ============================================ */
@media (max-width: 320px) {
    .header-container {
        min-height: 150px;
        padding-top: calc(10px + var(--safe-area-inset-top));
        padding-bottom: 10px;
    }

    .header-content {
        padding: 6px 8px 10px 8px;
        gap: 4px;
        min-height: 60px;
    }

    #userGreeting {
        font-size: 14px;
    }

    .header-song-info .total-songs-counter {
        font-size: 9px;
        padding: 2px 5px;
    }

    .header-controls {
        top: 4px;
        right: 8px;
        gap: 4px;
    }

    .config-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .header-btn {
        padding: 4px 8px;
        font-size: 10px;
        min-height: 32px;
    }

    .player-container {
        margin-top: calc(100px + var(--safe-area-inset-top));
        padding: 10px 8px;
    }

    .player-card {
        padding: 15px 10px;
    }

    .song-name {
        font-size: 14px;
        min-height: 35px;
    }

    .integrated-play-section .play-button {
        padding: 12px 25px;
        font-size: 14px;
        min-width: 110px;
    }

    .progress-section, .preload-section {
        padding: 8px;
        margin: 6px 0;
    }

    #dashboard {
        width: 98%;
        padding: 15px;
    }
    
    .folderItem {
        padding: 8px;
    }
    
    .slider-container {
        gap: 10px;
    }
    
    .folder-slider {
        width: 100px;
    }
}

/* ============================================ */
/* MÓVILES EN LANDSCAPE */
/* ============================================ */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 812px) {
    .header-container {
        min-height: 70px;
        padding-top: calc(8px + var(--safe-area-inset-top));
        padding-bottom: 8px;
    }

    .header-content {
        padding: 6px 15px 8px 15px;
        gap: 4px;
        min-height: 50px;
    }

    .player-container {
        margin-top: calc(80px + var(--safe-area-inset-top));
        padding: 10px 15px;
        min-height: calc(100vh - 90px - var(--safe-area-inset-top));
    }

    .player-card {
        padding: 15px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }

    .track-info {
        margin-bottom: 10px;
    }

    .integrated-play-section {
        margin: 8px 0;
    }

    .progress-section, .preload-section {
        margin: 6px 0;
        padding: 8px;
    }

    #dashboard {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .login-container {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .photo-options {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ============================================ */
/* MEJORAS TOUCH-FRIENDLY */
/* ============================================ */
@media (hover: none) and (pointer: coarse) {
    button, .user-icon, .profile-photo {
        min-height: 44px;
        min-width: 44px;
    }
    
    .folder-slider {
        height: 40px;
    }
    
    .folderItem:hover {
        background: #333;
    }
    
    .user-icon:hover, .profile-photo:hover {
        transform: none;
    }
}

/* ============================================ */
/* FALLBACK PARA DISPOSITIVOS SIN SAFE-AREA */
/* ============================================ */
@supports not (padding: max(0px, env(safe-area-inset-top))) {
    @media (max-width: 480px) {
        .header-container {
            padding-top: 20px;
            min-height: 100px;
        }

        .player-container {
            margin-top: 120px;
            padding-top: 15px;
        }
    }

    @media (max-width: 375px) {
        .header-container {
            padding-top: 18px;
            min-height: 95px;
        }

        .player-container {
            margin-top: 115px;
        }
    }

    @media (max-width: 320px) {
        .header-container {
            padding-top: 15px;
            min-height: 90px;
        }

        .player-container {
            margin-top: 110px;
        }
    }
}

















/* ============================================ */
/* CSS MÓVIL QUIRÚRGICO - SOBRESCRIBE TODO */
/* ============================================ */

@media (max-width: 480px) {
    /* HEADER - Sobrescribir completamente */
    .header-container {
        min-height: 120px !important;
        padding-top: calc(15px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 20px !important;
        height: auto !important;
    }

    .header-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 12px 15px 18px 15px !important;
        gap: 8px !important;
        position: relative !important;
        min-height: 80px !important;
        height: auto !important;
        justify-content: flex-start !important;
    }

    /* Header personalizado - elementos específicos */
    .header-main-title {
        text-align: center !important;
        width: 100% !important;
        order: 1 !important;
        margin-bottom: 8px !important;
    }

    #userGreeting {
        font-size: 16px !important;
        line-height: 1.2 !important;
    }

    .header-song-info {
    text-align: center !important;
    width: 100% !important;
    order: 2 !important;
    margin-bottom: 5px !important;
    padding-right: 120px !important;
}

    .header-song-info .total-songs-counter {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }

    .header-controls {
        position: absolute !important;
        top: 8px !important;
        right: 15px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        order: 3 !important;
    }

    /* Ocultar elementos desktop */
    .header-title {
        display: none !important;
    }

    .user-info {
        display: none !important;
    }

    /* PLAYER CONTAINER - Compresión máxima */
    .player-container {
        margin-top: calc(130px + env(safe-area-inset-top, 0px)) !important;
        padding: 5px !important;
        min-height: calc(100vh - 180px - env(safe-area-inset-top, 0px)) !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .player-card {
        padding: 8px !important;
        border-radius: 15px !important;
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
    }

    /* ELEMENTOS INTERNOS - Compresión máxima */
    .track-info {
        margin-bottom: 5px !important;
        flex-shrink: 0 !important;
        width: 100% !important;
    }

    .song-name {
        font-size: 16px !important;
        min-height: 35px !important;
        line-height: 1.2 !important;
        margin-bottom: 3px !important;
        padding: 3px 0 !important;
    }

    .folder-info {
        font-size: 13px !important;
        margin-bottom: 3px !important;
    }

    .song-count {
        font-size: 11px !important;
    }

    /* BOTÓN PLAY INTEGRADO - Compacto */
    .integrated-play-section {
        margin: 3px 0 !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }

    .integrated-play-section .play-button {
        margin: 0 !important;
        padding: 12px 25px !important;
        font-size: 16px !important;
        min-width: 120px !important;
        margin-top: 3px !important;
        margin-bottom: 3px !important;
    }

    /* PROGRESS SECTION - Compacta */
    .progress-section {
        margin: 3px 0 !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
        width: 100% !important;
    }

    .progress-bar {
        height: 6px !important;
        margin-bottom: 8px !important;
    }

    .time-display {
        font-size: 12px !important;
    }

    /* PRELOAD SECTION - Compacta */
    .preload-section {
        margin: 3px 0 !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
        width: 100% !important;
    }

    .preload-status {
        gap: 8px !important;
        margin-bottom: 5px !important;
    }

    .preload-text {
        font-size: 13px !important;
    }

    .next-song-info {
        font-size: 10px !important;
        margin-left: 20px !important;
    }
}

/* iPhone X específico */
@media (max-width: 375px) {
    .header-container {
        min-height: 115px !important;
        padding-bottom: 18px !important;
    }

    .player-container {
        margin-top: calc(125px + env(safe-area-inset-top, 0px)) !important;
    }

    #userGreeting {
        font-size: 15px !important;
    }

    .integrated-play-section .play-button {
        padding: 10px 22px !important;
        font-size: 15px !important;
        min-width: 110px !important;
    }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
    .header-container {
        min-height: 110px !important;
    }

    .player-container {
        margin-top: calc(120px + env(safe-area-inset-top, 0px)) !important;
        padding: 3px !important;
    }

    .player-card {
        padding: 5px !important;
    }

    .integrated-play-section .play-button {
        padding: 8px 20px !important;
        font-size: 14px !important;
        min-width: 100px !important;
    }
}



/* Language Selector */
.language-selector {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.lang-btn.active {
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    color: #ffffff;
    border-color: #ff6b9d;
}

/* ========== ESTILOS BASE DEL HEADER ========== */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.95), rgba(30, 30, 30, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    min-height: 70px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 25px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4px;
    position: relative;
}

.header-main-title {
    text-align: center;
    width: 100%;
}

#userGreeting {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #f8b500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

.header-song-info {
    text-align: center;
    width: 100%;
}

.total-songs-counter {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: normal;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.header-controls {
    position: absolute;
    top: 8px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    background: linear-gradient(135deg, #333333, #444444);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.config-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
}

/* ========== NUEVA BARRA DE PROGRESO EN HEADER ========== */
.header-progress-section {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.header-progress-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
}

.header-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.progress-title {
    font-weight: 600;
    color: #ff6b9d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.progress-stats {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.header-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, rgba(60, 60, 60, 0.6), rgba(80, 80, 80, 0.4));
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #c44569, #f8b500);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 0 8px rgba(255, 107, 157, 0.4);
}

.header-progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: progressGlow 2s ease-in-out infinite;
}

.header-progress-percentage {
    position: absolute;
    top: -2px;
    right: -25px;
    background: rgba(255, 107, 157, 0.9);
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(-10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-progress-bar:hover .header-progress-percentage {
    opacity: 1;
    transform: translateY(-15px);
}

/* ========== ESTADOS ESPECIALES ========== */
.header-progress-section.loading {
    opacity: 0.7;
}

.header-progress-section.loading .header-progress-fill {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.header-progress-section.completed {
    animation: completedPulse 2s ease-in-out;
}

.header-progress-section.no-user {
    opacity: 0.4;
}

.header-progress-section.no-user .header-progress-fill {
    background: linear-gradient(90deg, #666, #888);
}

/* ========== ANIMACIONES ========== */
@keyframes progressGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes completedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-progress-container {
        padding: 6px 10px;
    }
    
    .header-progress-label {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .progress-stats {
        font-size: 9px;
    }
    
    .header-progress-bar {
        height: 5px;
    }
}

@media (max-width: 480px) {
    .header-content {
        min-height: 140px;
        padding-top: calc(15px + env(safe-area-inset-top, 0px));
        padding-bottom: 20px;
    }
    
    .header-progress-section {
        margin-top: 6px;
        margin-bottom: 2px;
    }
    
    .header-progress-container {
        padding: 5px 8px;
    }
    
    .header-progress-label {
        font-size: 9px;
        margin-bottom: 3px;
    }
    
    .progress-title {
        font-size: 9px;
    }
    
    .progress-stats {
        font-size: 8px;
    }
    
    .header-progress-bar {
        height: 4px;
    }
    
    .header-progress-percentage {
        font-size: 7px;
        padding: 1px 4px;
        right: -20px;
    }
    
    .header-controls {
        top: 6px;
        right: 15px;
        gap: 8px;
    }
    
    .config-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .header-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #userGreeting {
        font-size: 16px;
    }
    
    .total-songs-counter {
        font-size: 11px;
        padding: 3px 8px;
    }
}


@media (max-width: 480px) {
    .header-container {
        min-height: 40px !important;
        padding-bottom: 5px !important;
    }
    .header-content {
        padding: 8px 15px 12px 15px !important; /* Reducir padding vertical */
        gap: 6px !important; /* Reducir gap entre elementos */
    }
    
    .header-progress-section {
        order: 4 !important; /* Asegurar que vaya al final */
    }
}


/* =============================================
   ESTILOS PARA EMAIL AUTHENTICATION
   Agregar a style.css o en <style> de index.php
   ============================================= */

/* Contenedor de opciones de autenticación */
#authOptions {
    animation: fadeIn 0.3s ease;
}

/* Botones de selección de método */
#authOptions .btn {
    font-size: 16px;
    padding: 15px 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 25px;
    border: 2px solid transparent;
}

#authOptions .btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    border-color: #ff6b9d;
}

#authOptions .btn-primary:hover {
    background: linear-gradient(135deg, #ff8fb3, #d55579);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

#authOptions .btn-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: #ffffff;
}

#authOptions .btn-secondary:hover {
    background: linear-gradient(135deg, #7b8fee, #8b5aa2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Formularios de email */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Botones de enlace */
.btn-link {
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #ff6b9d !important;
    text-decoration: none;
}

/* Mensaje de verificación */
.verification-message {
    animation: slideDown 0.5s ease;
    border-left: 4px solid #f39c12;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.verification-message h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.verification-message p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.verification-message small {
    opacity: 0.9;
    font-style: italic;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estados de carga para botones de email */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive para email auth */
@media (max-width: 480px) {
    #authOptions .btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .verification-message {
        padding: 15px;
        margin: 15px 0;
    }
    
    .verification-message h4 {
        font-size: 14px;
    }
    
    .verification-message p {
        font-size: 12px;
    }
}

/* Indicadores de validación */
.form-group input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.form-group input.valid {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Iconos en botones */
.btn span {
    margin-left: 8px;
}

/* Pasos del modal */
#loginModal > div > div[id$="Step"] {
    animation: fadeIn 0.3s ease;
}

#loginModal > div > div[id$="Step"][style*="display: none"] {
    animation: none;
}

/* Mejoras de accesibilidad */
.btn:focus,
.form-group input:focus {
    outline: 2px solid #ff6b9d;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .btn, .form-group input, .verification-message {
        transition: none;
        animation: none;
        transform: none !important;
    }
}


/* Estilos para el botón de Google Sign-In */
.btn-google {
    background: linear-gradient(135deg, #ffffff, #f8f9fa) !important;
    border: 2px solid #dadce0 !important;
    color: #3c4043 !important;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-google:hover {
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4) !important;
    border-color: #d2d4d7 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(60, 64, 67, 0.2);
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(60, 64, 67, 0.15);
}

/* Icono de Google más auténtico */
.btn-google::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.btn-google span {
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .btn-google::before {
        left: 12px;
        width: 16px;
        height: 16px;
    }
    
    .btn-google span {
        margin-left: 8px;
    }
}

/* Estado de carga para Google */
.btn-google:disabled {
    background: linear-gradient(135deg, #f8f9fa, #e8eaed) !important;
    color: #9aa0a6 !important;
    border-color: #dadce0 !important;
}

.btn-google.loading::before {
    animation: spin 1s linear infinite;
}

/* Separador visual mejorado */
.auth-separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.auth-separator span {
    padding: 0 15px;
    white-space: nowrap;
}


/* ============================================ */
/* CONTROL DE VOLUMEN FLOTANTE */
/* ============================================ */

/* Botón de volumen integrado */
.volume-button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-right: 20px;
}

.volume-button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 157, 0.3);
}

.volume-button:active {
    transform: translateY(0);
}

/* Overlay de volumen flotante */
.volume-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.volume-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Modal del control de volumen */
.volume-modal {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 25px;
    padding: 40px 30px;
    width: 75%;
    max-width: 350px;
    min-height: 70vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: volumeModalEnter 0.3s ease-out;
}

@keyframes volumeModalEnter {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Header del modal */
.volume-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-icon {
    font-size: 28px;
}

.volume-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    flex-grow: 1;
    text-align: center;
}

.volume-percentage {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b9d;
    background: rgba(255, 107, 157, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 157, 0.3);
}

/* Contenedor del slider vertical */
.volume-slider-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.volume-track {
    position: relative;
    width: 8px;
    height: 300px;
    background: linear-gradient(180deg, rgba(60, 60, 60, 0.8), rgba(80, 80, 80, 0.6));
    border-radius: 4px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 20px;
}

.volume-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #ff6b9d, #c44569, #f8b500);
    border-radius: 4px;
    height: 70%;
    transition: height 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
}

.volume-handle {
    position: absolute;
    bottom: 70%;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 107, 157, 0.8);
    transition: bottom 0.2s ease;
    cursor: grab;
}

.volume-handle:active {
    cursor: grabbing;
    transform: translateX(-50%) translateY(50%) scale(1.1);
}

/* Etiquetas del slider */
.volume-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 0 20px;
}

.volume-min,
.volume-max {
    font-size: 24px;
    opacity: 0.7;
}

/* Botones de preset */
.volume-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.preset-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.preset-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 107, 157, 0.5);
    color: #ff6b9d;
    transform: translateY(-2px);
}

.preset-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    border-color: #ff6b9d;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
}

/* ============================================ */
/* RESPONSIVE PARA MÓVILES */
/* ============================================ */

@media (max-width: 768px) {
    .volume-modal {
        width: 80%;
        min-height: 65vh;
        padding: 35px 25px;
    }

    .volume-track {
        height: 250px;
        width: 10px;
    }

    .volume-handle {
        width: 24px;
        height: 24px;
    }

    .volume-title {
        font-size: 18px;
    }

    .volume-percentage {
        font-size: 16px;
        padding: 6px 12px;
    }

    .preset-btn {
        padding: 12px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .volume-modal {
        width: 85%;
        min-height: 60vh;
        padding: 30px 20px;
    }

    .volume-header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }

    .volume-icon {
        font-size: 24px;
    }

    .volume-title {
        font-size: 16px;
    }

    .volume-percentage {
        font-size: 14px;
        padding: 5px 10px;
    }

    .volume-track {
        height: 200px;
        width: 12px;
        margin: 0 15px;
    }

    .volume-handle {
        width: 28px;
        height: 28px;
        border-width: 4px;
    }

    .volume-labels {
        margin: 15px 0;
        padding: 0 15px;
    }

    .volume-min,
    .volume-max {
        font-size: 20px;
    }

    .preset-btn {
        padding: 10px;
        font-size: 14px;
        border-radius: 12px;
    }

    .volume-presets {
        gap: 12px;
        margin-top: 15px;
    }

    /* Botón de volumen más pequeño en móviles */
    .volume-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-right: 15px;
    }
}

@media (max-width: 360px) {
    .volume-modal {
        width: 90%;
        min-height: 55vh;
        padding: 25px 15px;
    }

    .volume-track {
        height: 180px;
    }

    .volume-handle {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }

    .volume-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-right: 12px;
    }
}

/* ============================================ */
/* LANDSCAPE MODE (HORIZONTAL) */
/* ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .volume-modal {
        min-height: 85vh;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px 25px;
    }

    .volume-track {
        height: 150px;
    }

    .volume-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .volume-labels {
        margin: 10px 0;
    }

    .volume-presets {
        margin-top: 10px;
        gap: 10px;
    }

    .preset-btn {
        padding: 8px;
        font-size: 13px;
    }
}

/* ============================================ */
/* ANIMACIONES ADICIONALES */
/* ============================================ */

@keyframes volumeSliderPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 107, 157, 0.6);
    }
}

.volume-fill.active {
    animation: volumeSliderPulse 1.5s ease-in-out infinite;
}

/* Efectos de hover mejorados */
.volume-track:hover .volume-handle {
    transform: translateX(-50%) translateY(50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

/* Estados especiales del botón de volumen */
.volume-button.muted {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
}

.volume-button.muted:hover {
    color: #ff6b6b;
    border-color: rgba(231, 76, 60, 0.5);
}

/* ============================================ */
/* ACCESIBILIDAD */
/* ============================================ */

.volume-button:focus,
.preset-btn:focus {
    outline: 2px solid #ff6b9d;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .volume-modal,
    .volume-fill,
    .volume-handle,
    .preset-btn,
    .volume-button {
        transition: none;
        animation: none;
    }
}

/* ============================================ */
/* SOPORTE PARA TEMAS OSCUROS */
/* ============================================ */

@media (prefers-color-scheme: dark) {
    .volume-modal {
        background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    }
    
    .volume-track {
        background: linear-gradient(180deg, rgba(40, 40, 40, 0.8), rgba(60, 60, 60, 0.6));
    }
}

/* ============================================ */
/* CONTROLES INTEGRADOS - VERSIÓN MEJORADA */
/* ============================================ */

.integrated-controls-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(30, 30, 30, 0.6));
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Botón Play - Desktop */
.integrated-controls-section .play-button {
    padding: 18px 40px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    letter-spacing: 1px;
    min-width: 160px;
    margin: 0;
}

/* Botón de Volumen - Mantener tamaño original */
.volume-button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 0;
}

/* Botón Favoritos - Mantener tamaño original */
.integrated-controls-section .favorite-button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 0;
}

/* Botón Lista de Canciones - Mantener tamaño original */
.song-list-button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 0;
}

/* ============================================ */
/* RESPONSIVE - MÓVILES ÚNICAMENTE */
/* ============================================ */

@media (max-width: 480px) {
    /* Contenedor - Fila horizontal compacta */
    .integrated-controls-section {
        gap: 10px;
        padding: 15px 10px;
        margin: 15px 0;
        flex-wrap: nowrap; /* Evitar que se rompan en líneas */
        overflow-x: auto; /* Por si acaso en pantallas muy pequeñas */
    }
    
    /* Botón Play - REDUCIDO 25% en ancho */
    .integrated-controls-section .play-button {
        padding: 15px 20px; /* Reducido de 40px a 20px en horizontal */
        font-size: 16px;
        min-width: 100px; /* Reducido de 160px (25% menos ≈ 120px, ajustado a 100px) */
        height: 50px; /* Altura fija igual a los demás */
        border-radius: 25px; /* Ajustado proporcionalmente */
        flex-shrink: 0; /* No permitir que se encoja más */
    }

    /* Botón Volumen - Altura igual a Play */
    .volume-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        flex-shrink: 0;
    }

    /* Botón Favoritos - Altura igual a Play */
    .integrated-controls-section .favorite-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        flex-shrink: 0;
    }

    /* Botón Lista - Altura igual a Play */
    .song-list-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        flex-shrink: 0;
    }

    /* Hovers en móvil - Mantener funcionalidad */
    .integrated-controls-section .play-button:active,
    .volume-button:active,
    .integrated-controls-section .favorite-button:active,
    .song-list-button:active {
        transform: scale(0.95);
    }
}

/* Móviles muy pequeños - Ajuste extra */
@media (max-width: 360px) {
    .integrated-controls-section {
        gap: 8px;
        padding: 12px 8px;
    }
    
    .integrated-controls-section .play-button {
        padding: 12px 16px;
        font-size: 15px;
        min-width: 90px;
        height: 45px;
    }

    .volume-button,
    .integrated-controls-section .favorite-button,
    .song-list-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Móviles extremadamente pequeños */
@media (max-width: 320px) {
    .integrated-controls-section {
        gap: 6px;
        padding: 10px 6px;
    }
    
    .integrated-controls-section .play-button {
        padding: 10px 14px;
        font-size: 14px;
        min-width: 80px;
        height: 42px;
    }

    .volume-button,
    .integrated-controls-section .favorite-button,
    .song-list-button {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* ============================================ */
/* RESPONSIVE PARA MÓVILES */
/* ============================================ */

@media (max-width: 768px) {
    .integrated-controls-section .favorite-button {
        width: 55px !important;
        height: 55px !important;
        font-size: 22px;
    }

    .header-favorite {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .integrated-controls-section .favorite-button {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px;
    }

    .header-favorite {
        width: 34px !important;
        height: 34px !important;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .integrated-controls-section .favorite-button {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px;
    }

    .header-favorite {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px;
    }
}

/* ============================================ */
/* ANIMACIÓN DE CORAZÓN MEJORADA */
/* ============================================ */

@keyframes heartBeat {
    0%, 100% { 
        transform: scale(1); 
    }
    25% { 
        transform: scale(1.15); 
    }
    50% { 
        transform: scale(1.05); 
    }
    75% { 
        transform: scale(1.2); 
    }
}

/* Estados especiales del botón favoritos */
.integrated-controls-section .favorite-button:active {
    transform: translateY(0) scale(0.95);
}

.integrated-controls-section .favorite-button.is-favorite:active {
    transform: translateY(0) scale(0.95);
}