:root {
    --bg-dark: #09090b;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent: #ef4444; /* Rojo de Radio Renuevo */
    --accent-glow: rgba(239, 68, 68, 0.4);
    --card-bg: rgba(24, 24, 27, 0.6);
    --border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-dark);
    background-image: url('Imagenes/Fondo_Radio3.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Ambient Background Lights */
.ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.9;
    z-index: 0;
    transition: transform 0.5s;
    animation: drift 15s infinite alternate ease-in-out;
}
.light-1 {
    width: 60vw; height: 60vh;
    background: radial-gradient(circle, rgba(239, 40, 40, 0.7), transparent 70%);
    top: -10%; left: -10%;
}
.light-2 {
    width: 70vw; height: 70vh;
    background: radial-gradient(circle, rgba(200, 20, 20, 0.7), transparent 70%);
    bottom: -20%; right: -10%;
    animation-delay: -5s;
}
.light-3 {
    width: 50vw; height: 50vh;
    background: radial-gradient(circle, rgba(250, 50, 50, 0.6), transparent 70%);
    top: 30%; left: 50%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5vw, -5vh) scale(1.1); }
    66% { transform: translate(-3vw, 4vh) scale(0.9); }
    100% { transform: translate(-6vw, -3vh) scale(1.05); }
}

.overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(9, 9, 11, 0.5) 100%);
    z-index: 1;
}

.app-container {
    position: relative;
    z-index: 2;
    width: 100%; max-width: 420px;
    padding: 2rem;
    display: flex; flex-direction: column; gap: 2rem;
}

.top-nav {
    display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { height: 35px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }

.live-badge {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 20px;
    display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.online { background: #ef4444; animation: pulse 1.5s infinite; }
.dot.offline { background: #52525b; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.player-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; gap: 1.5rem;
}

.album-art-container {
    width: 100%; aspect-ratio: 1/1;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    background: #111; position: relative;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s;
}
.album-art-container.playing {
    transform: scale(1.03);
    box-shadow: 0 0 45px var(--accent-glow);
}
.album-art { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s ease; }
.default-art { object-fit: contain; padding: 2rem; background: #000; }

.equalizer {
    position: absolute; bottom: 0; left: 0; right: 0; height: 35%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex; align-items: flex-end; justify-content: center; gap: 3px;
    padding-bottom: 20px; z-index: 2; opacity: 0; transition: opacity 0.3s;
}
.album-art-container.playing .equalizer { opacity: 1; }
.eq-wave {
    width: 4px; background: var(--accent); border-radius: 4px 4px 0 0;
    box-shadow: 0 0 12px var(--accent-glow); height: 5px;
    transition: height 0.05s ease;
}

.track-info { display: flex; flex-direction: column; gap: 6px; overflow: hidden; text-align: center; width: 100%; }
.track-info-title-wrapper { width: 100%; overflow: hidden; position: relative; }
.track-info h2 { 
    font-size: 1.5rem; font-weight: 800; white-space: nowrap; 
    display: inline-block; padding: 0 5px;
}
.track-info h2.scrolling {
    animation: scroll-text 8s linear infinite alternate;
}
@keyframes scroll-text {
    0%, 10% { transform: translateX(0); }
    90%, 100% { transform: translateX(var(--scroll-dist)); }
}

.track-info h3 { font-size: 1.1rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

/* Progress */
.progress-container { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.progress-bar-bg {
    flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; position: relative; overflow: hidden;
}
.progress-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--accent); transition: width 1s linear; }

/* Controls */
.controls-wrapper { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; width: 100%; }

/* Volume */
.volume-container { display: flex; align-items: center; gap: 8px; width: 30%; }
.secondary-btn { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; transition: color 0.2s; display: flex; align-items: center; justify-content: center; }
.secondary-btn:hover { color: var(--text-primary); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; transition: transform 0.1s; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Play Button */
.main-controls { display: flex; justify-content: center; flex: 1; }
.play-btn-wrapper { position: relative; display: flex; justify-content: center; align-items: center; width: 80px; height: 80px; }

.pulse-ring {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    background: var(--accent-glow); z-index: 0; opacity: 0;
}
.pulse-ring.active {
    animation: pulsate 2s infinite ease-out;
}
@keyframes pulsate {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.play-btn {
    position: relative; z-index: 1;
    width: 65px; height: 65px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--accent), #0284c7); color: #fff;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; box-shadow: 0 8px 20px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}
.play-btn:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(6, 182, 212, 0.6); }
.play-btn:active { transform: scale(0.95); }

.btn-share { width: 30%; justify-content: flex-end; }

/* Footer */
.app-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 10px;
}
.app-footer p { margin-bottom: 2px; }
.app-footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}
.app-footer a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--accent-glow);
}
