﻿body {
    margin: 0;
    font-family: Montserrat;
    background: #000;
    color: #fff;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

body, .player, #playBtn {
    transition: all 0.6s ease;
}


#preScreen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #111 0%, #000 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    color: #fff;
}

    /* Glow animado */
    #preScreen::before {
        content: "";
        position: absolute;
        width: 300px;
        height: 300px;
        background: rgba(0, 194, 194, 0.25);
        filter: blur(120px);
        border-radius: 50%;
        animation: moveGlow 8s ease-in-out infinite alternate;
    }

@keyframes moveGlow {
    0% {
        transform: translate(-50px, -50px);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.preContent {
    text-align: center;
    width: 100%;
}

.preLogo {
    width: 60%;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.preMessage {
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 30px;
    text-align: center;
}

#prePlayBtn {
    margin-left: auto;
    margin-right: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #00c2c2;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseSoft 2s infinite;
}

@keyframes pulseSoft {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 194, 194, 0.5);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(0, 194, 194, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 194, 194, 0);
    }
}

.player {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .player::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.5) );
        z-index: 0;
    }

#bg {
    z-index: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #222, #000);
    background-size: cover;
    background-position: center;
    filter: blur(40px);
    /*opacity: 0.6;
    transition: background-image 1s ease-in-out, transform 1s ease-in-out;*/
}

#bg {
    opacity: 0.1; /* fondo precargado */
    transition: opacity 0.5s ease;
}

.content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 90%;
    max-width: 400px;
}



.cover-container {
    width: 250px;
    height: 250px;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,194,194,0.3);
    transition: opacity 1s ease-in-out;
    animation: glowPulse 2s infinite alternate;
    
}

    .cover-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 20px;
        opacity: 1;
    }

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px rgba(0,194,194,0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(0,194,194,0.6);
    }

    100% {
        box-shadow: 0 0 10px rgba(0,194,194,0.3);
    }
}

.info {
    margin-top: 30px;
}

#song {
    font-size: 1.4em;
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 15px;
}

#artist {
    font-size: 1em;
    opacity: 0.7;
}

.controls {
    margin-top: 20px;
}

#playBtn {
    margin-left: auto;
    margin-right: auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5em;
    background: #00c2c2;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none; /* evita estilo nativo en Safari iOS */
    -moz-appearance: none; /* Firefox */
    appearance: none;
}

    #playBtn:focus {
        outline: none;
        box-shadow: none;
    }

#playBtn {
    opacity: 0;
    pointer-events: none; /* no se pueda clickear mientras está oculto */
    transition: opacity 0.5s ease;
}

    #playBtn.visible {
        opacity: 1;
        pointer-events: auto;
    }

button {
    cursor: pointer;
}

.hidden {
    display: none;
}

:root {
    --accent: #00c2c2;
}

/* botón */
#playBtn {
    background: var(--accent);
}

/* glow dinámico */
.cover {
    transition: 0.3s;
}

#song, #artist {
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.progress {
    width: 80%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    margin: 15px auto 0;
    border-radius: 3px;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: #00c2c2;
    border-radius: 3px;
    transition: width 0.1s linear;
}

#loader {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.7;
    letter-spacing: 1px;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

.social-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
}

    .social-bar a {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.3em;
        transition: all 0.3s ease;
        text-decoration: none;
    }

        .social-bar a:hover {
            transform: scale(1.1);
            background: rgba(255,255,255,0.2);
        }

/* 📱 Mobile */
@media (max-width: 768px) {

    body {
        overflow: auto;
    }

    .player-ui {
        justify-content: flex-start;
        padding-top: 80px;
    }


    .cover {
        width: 160px;
        height: 160px;
    }
}
