:root {
    --primary-red: #E6192B;
    --text-main: #ffffff;
    --text-muted: #8b9298;
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Elimina completamente cualquier posibilidad de scroll */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: url('img/fondo.webp') center/cover fixed no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-background {
    display: none;
}

/* Reproductor a Pantalla Completa estricta */
.player-card {
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    width: 100vw;
    height: 100vh;
    /* Obliga a usar exactamente el alto de la ventana */
    padding: 4vmin;
    /* Padding relativo al lado más pequeño de la pantalla */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    /* Distribuye el espacio sobrante sin márgenes forzados */
    position: relative;
    z-index: 1;
}

/* Reducción de margins explícitos, usar flexbox para el espacio */
.brand-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.brand-icon {
    font-size: clamp(2.5rem, 6vmin, 4rem);
    /* Se adapta según el alto o ancho (el menor) */
    color: var(--text-main);
    background: linear-gradient(135deg, #ffffff, #666666);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    margin-bottom: 1vmin;
}

.pre-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 2vmin, 1rem);
    letter-spacing: 5px;
    color: var(--text-muted);
    margin-bottom: 1.5vmin;
    /* <- AUMENTADO PARA DAR ESPACIO A LA TILDE DE "Á" */
}

.main-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(3.5rem, 12vmin, 8rem);
    /* Vmin garantiza que nunca desborde pantallas anchas y bajitas */
    letter-spacing: -2px;
    background: linear-gradient(180deg, #ffffff 0%, #cccccc 60%, #555555 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.8));
    line-height: 1.1;
    /* AUMENTADO LIGERAMENTE para que la tilde no corte o monte */
}

.main-title::after {
    content: '.';
    color: var(--primary-red);
    -webkit-text-fill-color: var(--primary-red);
}

.tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: clamp(0.7rem, 2vmin, 1rem);
    letter-spacing: 4px;
    color: var(--primary-red);
    text-transform: uppercase;
    margin-top: 1vmin;
}

/* Status & Visualizer */
.status-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.7rem, 1.8vmin, 0.9rem);
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 3vmin;
    background: rgba(230, 25, 43, 0.15);
    border: 1px solid rgba(230, 25, 43, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    box-shadow: 0 0 20px rgba(230, 25, 43, 0.2);
}

.pulsing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-red);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(230, 25, 43, 0.8);
    }

    70% {
        transform: scale(1.3);
        box-shadow: 0 0 0 10px rgba(230, 25, 43, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(230, 25, 43, 0);
    }
}

.visualizer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(35px, 8vmin, 60px);
    gap: clamp(2px, 0.5vmin, 4px);
    width: 100%;
}

.bar {
    width: clamp(2px, 0.6vmin, 5px);
    background-color: var(--primary-red);
    border-radius: 4px;
    height: 3px;
    transition: height 0.15s ease-out;
    opacity: 0.9;
    box-shadow: 0 0 10px rgba(230, 25, 43, 0.5);
}

/* Controles */
.controls-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin: 0;
}

.play-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Botón central estrictamente adaptativo */
.play-btn.premium-play {
    position: relative;
    width: clamp(90px, 20vmin, 140px);
    height: clamp(90px, 20vmin, 140px);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(31, 32, 36, 0.95), rgba(10, 11, 13, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: clamp(2rem, 5vmin, 3.5rem);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.8),
        inset 0 4px 10px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    z-index: 2;
    padding-left: 6px;
}

.play-btn-bg {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), #ff4d4d);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(15px);
}

.play-btn.premium-play:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.95);
    border-color: rgba(230, 25, 43, 0.7);
    color: #fff;
}

.play-btn.premium-play:hover .play-btn-bg {
    opacity: 0.8;
}

.play-btn.premium-play.playing {
    padding-left: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(224, 224, 224, 0.9));
    color: #000;
    box-shadow: 0 15px 50px rgba(255, 255, 255, 0.25);
}

.play-btn.premium-play.playing .play-btn-bg {
    opacity: 0;
}

.play-btn.premium-play:active {
    transform: scale(0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), inset 0 10px 25px rgba(0, 0, 0, 0.9);
}

/* Redes Sociales */
.social-footer {
    width: 100%;
    max-width: 600px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 3vmin;
    margin: 0;
}

.social-footer p {
    font-size: clamp(0.65rem, 1.5vmin, 0.85rem);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-muted);
    margin-bottom: 2vmin;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: clamp(12px, 3vmin, 20px);
}

.social-link {
    width: clamp(40px, 8vmin, 55px);
    height: clamp(40px, 8vmin, 55px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: clamp(1.1rem, 2.5vmin, 1.5rem);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-4px);
    background: #fff;
    color: #000;
}

.social-link.fb:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: #fff;
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.5);
}

.social-link.tt:hover {
    background: #000;
    border-color: #FE2C55;
    color: #fff;
    box-shadow: 0 10px 25px rgba(254, 44, 85, 0.5);
}

.social-link.wa:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}

@media (max-width: 600px) {
    .player-card {
        padding: 4vmin;
    }
}

/* =========================================
   NUEVO: Estilos PWA Popup
   ========================================= */
.pwa-popup {
    position: fixed;
    bottom: clamp(10px, 3vmin, 30px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: clamp(15px, 3vmin, 20px);
    width: 90%;
    max-width: 400px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.pwa-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pwa-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-icon {
    font-size: 2rem;
    color: var(--primary-red);
    background: rgba(230, 25, 43, 0.1);
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 5px;
    color: #fff;
}

.pwa-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.pwa-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pwa-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.pwa-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pwa-install {
    background: var(--primary-red);
    color: #fff;
}

.pwa-install:hover {
    background: #ff3344;
    transform: scale(1.05);
}