* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;    
    backdrop-filter: blur(8px);
    background: #00000050;
}

/* Nuevo: Overlay con pattern.png */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('pattern.png');
    background-repeat: repeat;
    background-size: 200px;
    opacity: 0.15;
    
    z-index: 0;
    pointer-events: none;
}

/* Estas propiedades están duplicadas */
.player-container {
    background: rgba(255, 255, 255, 0.089);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%; 
    max-width: 450px; 
    text-align: center;
    position: relative;
    overflow: hidden;
}

.player-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.header {
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.album-cover {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}



/* Añadir media queries para mejorar la responsividad */
@media (max-width: 480px) {
    .player-container {
        width: 95%;
        padding: 20px;
        border-radius: 20px;
    }
    
    .album-cover {
        width: 100px;
        height: 100px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .metadata-container {
        padding: 15px;
        min-height: 70px;
    }
    
    .song-title {
        font-size: 16px;
    }
    
    .artist-name {
        font-size: 13px;
    }
}

@media (max-width: 350px) {
    .player-container {
        padding: 15px;
    }
    
    .album-cover {
        width: 90px;
        height: 90px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .volume-label {
        font-size: 12px;
    }
    
    .status-text {
        font-size: 12px;
    }
}

/* Mejorar la visualización en dispositivos más grandes */
@media (min-width: 768px) {
    .album-cover {
        width: 140px;
        height: 140px;
        border-radius: 18px;
    }
    
    .player-container {
        max-width: 500px;
    }
    
    .song-title {
        font-size: 20px;
    }
    
    .artist-name {
        font-size: 16px;
    }
}
.album-cover:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.clock {
    font-size: 18px;
    color: #fff;
    opacity: 0.9;
    font-weight: 300;
}

.status-indicator {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 8px 16px;
    margin: 20px 0;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-text {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.wakelock-indicator {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.status-connecting { background: #f97316; }
.status-playing { background: #10b981; }
.status-paused { background: #fbbf24; }
.status-stopped { background: #dc2626; }
.status-error { background: #dc2626; animation: blink 0.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.metadata-container {
    background: rgba(0, 0, 0, 0.041);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.song-title {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.artist-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    position: relative;
    z-index: 2;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #dc2626, #991b1b);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.5);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(145deg, #8a8a8a, #5a5a5a);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: none;
}

.control-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-btn:disabled::before {
    display: none;
}

.volume-container {
    margin: 20px 0;
    position: relative;
    z-index: 2;
}

.volume-label {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.volume-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #dc2626, #991b1b);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #dc2626, #991b1b);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: none;
}

.circular-animated-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 80px;
    background-color: #dc2626;
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}

.circular-animated-button:hover {
    background-color: #991b1b;
    transform: scale(1.1);
}

.circular-animated-button:active {
    transform: scale(0.95);
}

/* Animación de pulso opcional */
@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.circular-animated-button.pulse {
    animation: pulse-animation 2s infinite;
    
}