965 lines
33 KiB
PHP
965 lines
33 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/includes/tracker.php';
|
|
track_visitor();
|
|
|
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Lili Records Radio - La mejor música en vivo.';
|
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? 'assets/pasted-20260215-164611-6d2aee42.png';
|
|
|
|
// WhatsApp info
|
|
$whatsapp_link = "https://chat.whatsapp.com/DkG96pTzAFO3hvLqmzwmTY";
|
|
$whatsapp_number = '+5359177041';
|
|
$facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
|
|
?>
|
|
<!doctype html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Lili Records Radio</title>
|
|
|
|
<!-- Meta tags SEO -->
|
|
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<meta property="og:title" content="Lili Records Radio" />
|
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
|
|
|
<style>
|
|
:root {
|
|
--accent-color: #00e676; /* WhatsApp Green */
|
|
--primary-color: #38bdf8; /* Sky Blue */
|
|
--bg-overlay: rgba(15, 23, 42, 0.5); /* More transparent overlay */
|
|
--glass-bg: rgba(15, 23, 42, 0.3); /* Transparent card background */
|
|
--glass-border: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
body, html {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
font-family: 'Inter', sans-serif;
|
|
color: #ffffff;
|
|
background-color: #000;
|
|
}
|
|
|
|
.background {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: url('assets/images/background.jpg') center/cover no-repeat;
|
|
z-index: -1;
|
|
}
|
|
|
|
.background::after {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: var(--bg-overlay);
|
|
}
|
|
|
|
/* Animated Mic Background Elements */
|
|
.bg-elements {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.floating-mic {
|
|
position: absolute;
|
|
font-size: 2rem;
|
|
opacity: 0.2;
|
|
color: var(--primary-color);
|
|
animation: float-around 20s infinite linear;
|
|
filter: drop-shadow(0 0 10px currentColor);
|
|
}
|
|
|
|
@keyframes float-around {
|
|
0% { transform: translate(0, 0) rotate(0deg); color: #38bdf8; }
|
|
25% { transform: translate(100px, 100px) rotate(90deg); color: #00e676; }
|
|
50% { transform: translate(200px, 0) rotate(180deg); color: #facc15; }
|
|
75% { transform: translate(100px, -100px) rotate(270deg); color: #f472b6; }
|
|
100% { transform: translate(0, 0) rotate(360deg); color: #38bdf8; }
|
|
}
|
|
|
|
.floating-mic:nth-child(1) { top: 10%; left: 10%; animation-duration: 25s; }
|
|
.floating-mic:nth-child(2) { top: 20%; left: 80%; animation-duration: 30s; animation-delay: -5s; }
|
|
.floating-mic:nth-child(3) { top: 70%; left: 15%; animation-duration: 22s; animation-delay: -10s; }
|
|
.floating-mic:nth-child(4) { top: 80%; left: 75%; animation-duration: 35s; animation-delay: -15s; }
|
|
.floating-mic:nth-child(5) { top: 40%; left: 40%; animation-duration: 28s; animation-delay: -2s; }
|
|
|
|
.app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
min-height: 100vh;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 4rem 2rem;
|
|
box-sizing: border-box;
|
|
gap: 3rem;
|
|
}
|
|
|
|
/* Center Section: Player */
|
|
.player-section {
|
|
width: 100%;
|
|
max-width: 850px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
z-index: 10;
|
|
}
|
|
|
|
.glass-card {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border: 2px solid transparent;
|
|
border-radius: 32px;
|
|
padding: 2.5rem;
|
|
box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4),
|
|
0 0 30px var(--dynamic-glow-dim, transparent);
|
|
position: relative;
|
|
background-clip: padding-box;
|
|
overflow: hidden;
|
|
transition: all 0.5s ease, box-shadow 0.1s ease;
|
|
}
|
|
|
|
/* Animated colorful border */
|
|
.glass-card::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: 32px;
|
|
padding: 2px; /* thickness */
|
|
background: linear-gradient(45deg, var(--dynamic-glow, #00e676), #38bdf8, var(--dynamic-glow-dim, #facc15), #f472b6, var(--dynamic-glow, #00e676));
|
|
background-size: 400% 400%;
|
|
-webkit-mask:
|
|
linear-gradient(#fff 0 0) content-box,
|
|
linear-gradient(#fff 0 0);
|
|
-webkit-mask-composite: xor;
|
|
mask-composite: exclude;
|
|
pointer-events: none;
|
|
animation: gradient-border 8s linear infinite;
|
|
transition: background 0.1s ease;
|
|
}
|
|
|
|
@keyframes gradient-border {
|
|
0% { background-position: 0% 50%; }
|
|
50% { background-position: 100% 50%; }
|
|
100% { background-position: 0% 50%; }
|
|
}
|
|
|
|
.brand h1 {
|
|
font-size: 2.8rem;
|
|
font-weight: 800;
|
|
margin: 0 0 0.5rem;
|
|
background: linear-gradient(to right, #fff, var(--primary-color), var(--accent-color));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
letter-spacing: -1px;
|
|
}
|
|
|
|
.brand-logo {
|
|
width: 130px;
|
|
height: 130px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
border: 4px solid var(--dynamic-glow, var(--primary-color));
|
|
box-shadow: 0 0 25px var(--dynamic-glow, rgba(56, 189, 248, 0.7)),
|
|
0 0 50px var(--dynamic-glow-dim, rgba(56, 189, 248, 0.4));
|
|
transition: transform 0.3s ease, border-color 0.1s ease, box-shadow 0.1s ease;
|
|
}
|
|
|
|
.logo-wrapper {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 2rem;
|
|
margin-bottom: 1.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.brand-logo:hover {
|
|
transform: scale(1.1) rotate(5deg);
|
|
}
|
|
|
|
.brand p {
|
|
font-size: 1rem;
|
|
opacity: 0.8;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
/* Radio Player UI */
|
|
.radio-player {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.now-playing {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
background: rgba(0, 0, 0, 0.3);
|
|
padding: 1rem;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.now-playing i {
|
|
font-size: 1.5rem;
|
|
color: var(--primary-color);
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.track-info {
|
|
overflow: hidden;
|
|
flex: 1;
|
|
}
|
|
|
|
.track-title {
|
|
font-weight: 800;
|
|
font-size: 1.5rem;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
transition: opacity 0.5s ease;
|
|
color: #fff;
|
|
text-shadow: 0 0 15px var(--primary-color), 0 0 30px rgba(0,0,0,0.5);
|
|
display: block;
|
|
margin-top: 0.2rem;
|
|
}
|
|
|
|
.track-label {
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 2px;
|
|
color: var(--accent-color);
|
|
margin-bottom: -5px;
|
|
display: block;
|
|
}
|
|
|
|
@keyframes marquee {
|
|
0% { transform: translateX(0); }
|
|
100% { transform: translateX(-50%); }
|
|
}
|
|
|
|
.track-title.scrolling {
|
|
text-overflow: clip;
|
|
}
|
|
|
|
.track-title.scrolling span {
|
|
display: inline-block;
|
|
animation: marquee 15s linear infinite;
|
|
padding-right: 2rem;
|
|
}
|
|
|
|
.track-status {
|
|
font-size: 0.85rem;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.play-btn {
|
|
width: 72px;
|
|
height: 72px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, var(--primary-color), #0ea5e9);
|
|
border: none;
|
|
color: #fff;
|
|
font-size: 2rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
box-shadow: 0 0 20px rgba(56, 189, 248, 0.4), inset 0 0 10px rgba(255,255,255,0.2);
|
|
position: relative;
|
|
}
|
|
|
|
.play-btn::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 50%;
|
|
border: 2px solid var(--primary-color);
|
|
opacity: 0;
|
|
transition: all 0.4s;
|
|
}
|
|
|
|
.play-btn:hover::after {
|
|
opacity: 1;
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
.play-btn.playing {
|
|
background: linear-gradient(135deg, #ff4444, #cc0000) !important;
|
|
box-shadow: 0 0 25px rgba(255, 68, 68, 0.6);
|
|
transform: scale(1.1);
|
|
animation: pulse-button 1.5s infinite;
|
|
}
|
|
|
|
@keyframes pulse-button {
|
|
0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
|
|
70% { box-shadow: 0 0 0 20px rgba(255, 68, 68, 0); }
|
|
100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
|
|
}
|
|
|
|
.now-playing {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
padding: 1.2rem;
|
|
border-radius: 16px;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
box-shadow: inset 0 0 15px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.play-btn:hover {
|
|
transform: scale(1.05);
|
|
background: #0ea5e9;
|
|
}
|
|
|
|
.visualizer-container {
|
|
width: 100%;
|
|
height: 100px;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
#visualizer {
|
|
width: 100%;
|
|
height: 100%;
|
|
filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.5));
|
|
}
|
|
|
|
/* Playing Animations */
|
|
body.is-playing .glass-card {
|
|
animation: card-pulse 4s infinite ease-in-out;
|
|
border-color: rgba(56, 189, 248, 0.5);
|
|
}
|
|
|
|
.featured-img-container {
|
|
width: 100%;
|
|
max-width: 900px;
|
|
position: relative;
|
|
border-radius: 32px;
|
|
overflow: hidden;
|
|
box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
|
|
aspect-ratio: 16 / 10;
|
|
transition: all 0.5s ease;
|
|
}
|
|
|
|
@keyframes card-pulse {
|
|
0%, 100% {
|
|
transform: translate(var(--shake-offset-x, 0), var(--shake-offset-y, 0)) scale(1);
|
|
box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), 0 0 20px var(--dynamic-glow-dim, rgba(0,0,0,0));
|
|
}
|
|
50% {
|
|
transform: translate(var(--shake-offset-x, 0), var(--shake-offset-y, 0)) scale(1.01);
|
|
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px var(--dynamic-glow, rgba(56, 189, 248, 0.4));
|
|
}
|
|
}
|
|
|
|
@keyframes float-img {
|
|
0%, 100% { transform: translateY(0) scale(1); }
|
|
50% { transform: translateY(-15px) scale(1.02); }
|
|
}
|
|
|
|
.volume-slider {
|
|
flex: 1;
|
|
height: 6px;
|
|
-webkit-appearance: none;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-radius: 3px;
|
|
outline: none;
|
|
}
|
|
|
|
.volume-slider::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
width: 16px;
|
|
height: 16px;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Interaction Form */
|
|
.interaction-form {
|
|
margin-top: 2rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
text-align: left;
|
|
}
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.8rem;
|
|
}
|
|
|
|
.interaction-form label {
|
|
font-size: 0.85rem;
|
|
font-weight: 700;
|
|
opacity: 0.9;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.interaction-form input,
|
|
.interaction-form textarea {
|
|
width: 100%;
|
|
padding: 0.8rem;
|
|
border-radius: 12px;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
|
|
color: #0f172a;
|
|
font-family: inherit;
|
|
font-size: 0.95rem;
|
|
box-sizing: border-box;
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.interaction-form textarea {
|
|
resize: none;
|
|
height: 80px;
|
|
}
|
|
|
|
.interaction-form input::placeholder,
|
|
.interaction-form textarea::placeholder {
|
|
color: #64748b;
|
|
}
|
|
|
|
.send-whatsapp-btn {
|
|
background-color: var(--accent-color);
|
|
color: #fff;
|
|
border: none;
|
|
padding: 0.8rem;
|
|
border-radius: 12px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
transition: transform 0.2s, background 0.2s;
|
|
}
|
|
|
|
.send-whatsapp-btn:hover {
|
|
transform: translateY(-2px);
|
|
background-color: #00c853;
|
|
}
|
|
|
|
/* Center Section: Featured Image */
|
|
.image-section {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 5;
|
|
}
|
|
|
|
.featured-img-container {
|
|
width: 100%;
|
|
max-width: 900px;
|
|
position: relative;
|
|
border-radius: 32px;
|
|
overflow: hidden;
|
|
box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
|
|
aspect-ratio: 16 / 10;
|
|
}
|
|
|
|
.featured-img-container img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
background: rgba(0,0,0,0.2);
|
|
transition: transform 0.5s;
|
|
}
|
|
|
|
.featured-img-container:hover img {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* Transfermovil QR Section */
|
|
.payment-section {
|
|
margin-top: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.qr-placeholder {
|
|
width: 180px;
|
|
height: 180px;
|
|
margin: 1rem auto;
|
|
background: rgba(255, 255, 255, 0.85);
|
|
border-radius: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #333;
|
|
padding: 10px;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.qr-placeholder i {
|
|
font-size: 3rem;
|
|
margin-bottom: 10px;
|
|
color: #000;
|
|
}
|
|
|
|
.qr-placeholder span {
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* Floating Social Buttons */
|
|
.social-float-container {
|
|
position: fixed;
|
|
bottom: 2rem;
|
|
right: 2rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
z-index: 100;
|
|
}
|
|
|
|
.social-float {
|
|
width: 60px;
|
|
height: 60px;
|
|
color: #FFF;
|
|
border-radius: 50%;
|
|
text-align: center;
|
|
font-size: 28px;
|
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-decoration: none;
|
|
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
position: relative;
|
|
}
|
|
|
|
.social-float::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: 50%;
|
|
padding: 3px;
|
|
background: linear-gradient(45deg, #00e676, #38bdf8, #facc15, #f472b6, #00e676);
|
|
background-size: 400% 400%;
|
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
-webkit-mask-composite: xor;
|
|
mask-composite: exclude;
|
|
pointer-events: none;
|
|
animation: gradient-border 6s linear infinite;
|
|
}
|
|
|
|
.social-float:hover {
|
|
transform: scale(1.1) rotate(8deg);
|
|
color: #fff;
|
|
}
|
|
|
|
.social-float.whatsapp {
|
|
background-color: var(--accent-color);
|
|
box-shadow: 0 0 20px rgba(0, 230, 118, 0.5);
|
|
}
|
|
|
|
.social-float.youtube {
|
|
background-color: #ff0000;
|
|
box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
|
|
}
|
|
|
|
.social-float.facebook {
|
|
background-color: #1877F2;
|
|
box-shadow: 0 0 20px rgba(24, 119, 242, 0.5);
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% { transform: scale(1); opacity: 1; }
|
|
50% { transform: scale(1.1); opacity: 0.7; }
|
|
100% { transform: scale(1); opacity: 1; }
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 992px) {
|
|
.app-container {
|
|
flex-direction: column;
|
|
height: auto;
|
|
overflow-y: auto;
|
|
padding-top: 4rem;
|
|
}
|
|
.player-section {
|
|
max-width: 100%;
|
|
margin-bottom: 2rem;
|
|
}
|
|
.image-section {
|
|
padding-left: 0;
|
|
width: 100%;
|
|
}
|
|
.featured-img-container {
|
|
aspect-ratio: 1 / 1;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
.glass-card {
|
|
padding: 1.5rem;
|
|
}
|
|
.brand h1 {
|
|
font-size: 2rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="background"></div>
|
|
<div class="bg-elements">
|
|
<i class="bi bi-mic-fill floating-mic"></i>
|
|
<i class="bi bi-mic-fill floating-mic"></i>
|
|
<i class="bi bi-mic-fill floating-mic"></i>
|
|
<i class="bi bi-mic-fill floating-mic"></i>
|
|
<i class="bi bi-mic-fill floating-mic"></i>
|
|
</div>
|
|
|
|
<div class="app-container">
|
|
<!-- Left Section: Player -->
|
|
<section class="player-section">
|
|
<div class="glass-card">
|
|
<header class="brand">
|
|
<div class="logo-wrapper">
|
|
<img src="./assets/pasted-20260215-163754-def41f49.png" alt="Lili Records Logo" class="brand-logo">
|
|
<img src="./assets/pasted-20260215-171328-d90df4ce.jpg" alt="Logo Secundario" class="brand-logo">
|
|
</div>
|
|
<h1>Lili Records</h1>
|
|
<p>Siente la música, vive el ritmo.</p>
|
|
</header>
|
|
|
|
<div class="radio-player">
|
|
<div class="visualizer-container">
|
|
<canvas id="visualizer"></canvas>
|
|
</div>
|
|
<div class="now-playing">
|
|
<i class="bi bi-broadcast"></i>
|
|
<div class="track-info">
|
|
<span class="track-label">ESTÁS ESCUCHANDO:</span>
|
|
<div id="track-title" class="track-title">Cargando stream...</div>
|
|
<div class="track-status">EN VIVO</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="controls">
|
|
<button id="play-pause" class="play-btn" onclick="togglePlay()">
|
|
<i id="play-icon" class="bi bi-play-fill"></i>
|
|
</button>
|
|
<i class="bi bi-volume-up"></i>
|
|
<input type="range" class="volume-slider" min="0" max="1" step="0.01" value="1" oninput="changeVolume(this.value)">
|
|
</div>
|
|
|
|
<div class="interaction-form">
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="user-name">NOMBRE</label>
|
|
<input type="text" id="user-name" placeholder="Tu nombre...">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="user-phone">MOVIL</label>
|
|
<input type="tel" id="user-phone" placeholder="Tu número..." onchange="savePhone(this.value)">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="user-message">MENSAJE</label>
|
|
<textarea id="user-message" placeholder="¿Qué quieres escuchar?"></textarea>
|
|
</div>
|
|
|
|
<button class="send-whatsapp-btn" onclick="sendToWhatsApp()">
|
|
<i class="bi bi-whatsapp"></i> WHATSAPP
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Espacio para Código QR -->
|
|
<div class="payment-section">
|
|
<div class="qr-placeholder">
|
|
<i class="bi bi-qr-code-scan"></i>
|
|
<span>TU CÓDIGO QR AQUÍ</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (isset($_GET['admin']) && $_GET['admin'] === '1'): ?>
|
|
<!-- Admin Real-Time Stats (Only visible with ?admin=1) -->
|
|
<div class="glass-card mt-4" style="margin-top: 2rem;">
|
|
<h3 style="font-size: 1.2rem; margin-bottom: 1rem; color: var(--accent-color);">
|
|
<i class="bi bi-shield-lock"></i> Panel Admin Real-Time
|
|
</h3>
|
|
<iframe src="admin.php?token=lili_admin_2026" style="width: 100%; height: 400px; border: none; border-radius: 12px; background: rgba(0,0,0,0.2);"></iframe>
|
|
</div>
|
|
<?php endif; ?>
|
|
</section>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- Floating Social Links -->
|
|
<div class="social-float-container">
|
|
<a href="<?= $facebook_link ?>" class="social-float facebook" target="_blank" title="Facebook">
|
|
<i class="bi bi-facebook"></i>
|
|
</a>
|
|
<a href="https://www.youtube.com/@lilirecords" class="social-float youtube" target="_blank" title="YouTube">
|
|
<i class="bi bi-youtube"></i>
|
|
</a>
|
|
<a href="<?= $whatsapp_link ?>" class="social-float whatsapp" target="_blank" title="WhatsApp">
|
|
<i class="bi bi-whatsapp"></i>
|
|
</a>
|
|
</div>
|
|
|
|
<audio id="radio-audio" src="https://listen.radioking.com/radio/828046/stream/897251" preload="none" crossorigin="anonymous"></audio>
|
|
|
|
<script>
|
|
const audio = document.getElementById('radio-audio');
|
|
const playBtn = document.getElementById('play-pause');
|
|
const playIcon = document.getElementById('play-icon');
|
|
const trackTitle = document.getElementById('track-title');
|
|
const canvas = document.getElementById('visualizer');
|
|
const ctx = canvas.getContext('2d');
|
|
|
|
let audioCtx;
|
|
let analyzer;
|
|
let source;
|
|
let animationId;
|
|
|
|
function initVisualizer() {
|
|
if (audioCtx) return;
|
|
|
|
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
|
analyzer = audioCtx.createAnalyser();
|
|
source = audioCtx.createMediaElementSource(audio);
|
|
source.connect(analyzer);
|
|
analyzer.connect(audioCtx.destination);
|
|
|
|
analyzer.fftSize = 256;
|
|
const bufferLength = analyzer.frequencyBinCount;
|
|
const dataArray = new Uint8Array(bufferLength);
|
|
|
|
function resizeCanvas() {
|
|
canvas.width = canvas.offsetWidth * window.devicePixelRatio;
|
|
canvas.height = canvas.offsetHeight * window.devicePixelRatio;
|
|
ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
|
|
}
|
|
resizeCanvas();
|
|
window.addEventListener('resize', resizeCanvas);
|
|
|
|
let colorOffset = 0;
|
|
function draw() {
|
|
if (audio.paused) {
|
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
document.documentElement.style.setProperty('--dynamic-glow', 'rgba(56, 189, 248, 0.7)');
|
|
document.documentElement.style.setProperty('--dynamic-glow-dim', 'rgba(56, 189, 248, 0.4)');
|
|
return;
|
|
}
|
|
animationId = requestAnimationFrame(draw);
|
|
analyzer.getByteFrequencyData(dataArray);
|
|
|
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
|
|
const barCount = bufferLength / 1.5;
|
|
const logicalWidth = canvas.width / window.devicePixelRatio;
|
|
const logicalHeight = canvas.height / window.devicePixelRatio;
|
|
const barWidth = (logicalWidth / barCount) * 0.7;
|
|
let x = logicalWidth / 2;
|
|
let xLeft = logicalWidth / 2;
|
|
|
|
let sum = 0;
|
|
for(let i=0; i<bufferLength; i++) sum += dataArray[i];
|
|
const average = sum / bufferLength;
|
|
|
|
colorOffset += 0.5;
|
|
|
|
for (let i = 0; i < barCount; i++) {
|
|
const barHeight = (dataArray[i] / 255) * logicalHeight * 0.9;
|
|
|
|
// Rainbow spectrum with flow
|
|
const barHue = (colorOffset + (i / barCount) * 360) % 360;
|
|
const saturation = 90;
|
|
const lightness = 50 + (dataArray[i] / 255) * 20;
|
|
|
|
const gradient = ctx.createLinearGradient(0, logicalHeight, 0, logicalHeight - barHeight);
|
|
gradient.addColorStop(0, `hsla(${barHue}, ${saturation}%, ${lightness}%, 0.3)`);
|
|
gradient.addColorStop(0.5, `hsla(${barHue}, ${saturation}%, ${lightness}%, 0.9)`);
|
|
gradient.addColorStop(1, `hsla(${(barHue + 30) % 360}, ${saturation}%, ${lightness + 10}%, 1)`);
|
|
|
|
ctx.fillStyle = gradient;
|
|
|
|
// Draw mirror bars
|
|
ctx.beginPath();
|
|
ctx.roundRect(x, logicalHeight - barHeight, barWidth, barHeight, 4);
|
|
ctx.fill();
|
|
|
|
ctx.beginPath();
|
|
ctx.roundRect(xLeft - barWidth, logicalHeight - barHeight, barWidth, barHeight, 4);
|
|
ctx.fill();
|
|
|
|
x += barWidth + 3;
|
|
xLeft -= barWidth + 3;
|
|
}
|
|
|
|
// Update dynamic glow colors based on music intensity
|
|
const dominantHue = (average * 2) % 360;
|
|
document.documentElement.style.setProperty('--dynamic-glow', `hsla(${dominantHue}, 100%, 60%, 0.8)`);
|
|
document.documentElement.style.setProperty('--dynamic-glow-dim', `hsla(${dominantHue}, 100%, 60%, 0.3)`);
|
|
}
|
|
draw();
|
|
}
|
|
|
|
function togglePlay() {
|
|
if (audioCtx && audioCtx.state === 'suspended') {
|
|
audioCtx.resume();
|
|
}
|
|
|
|
if (audio.paused) {
|
|
initVisualizer();
|
|
audio.play();
|
|
playIcon.classList.remove('bi-play-fill');
|
|
playIcon.classList.add('bi-pause-fill');
|
|
playBtn.classList.add('playing');
|
|
document.body.classList.add('is-playing');
|
|
} else {
|
|
audio.pause();
|
|
playIcon.classList.remove('bi-pause-fill');
|
|
playIcon.classList.add('bi-play-fill');
|
|
playBtn.classList.remove('playing');
|
|
document.body.classList.remove('is-playing');
|
|
}
|
|
}
|
|
|
|
function changeVolume(val) {
|
|
audio.volume = val;
|
|
}
|
|
|
|
function savePhone(phone) {
|
|
const formData = new FormData();
|
|
formData.append('phone', phone);
|
|
fetch('api/save_phone.php', {
|
|
method: 'POST',
|
|
body: formData
|
|
});
|
|
}
|
|
|
|
function sendToWhatsApp() {
|
|
window.open('<?= $whatsapp_link ?>', '_blank');
|
|
}
|
|
|
|
// Fetch Now Playing Metadata from RadioKing
|
|
async function updateMetadata() {
|
|
try {
|
|
// RadioKing Public API for current track
|
|
const response = await fetch('https://api.radioking.io/widget/radio/828046/track/current');
|
|
const data = await response.json();
|
|
|
|
if (data && data.title) {
|
|
const title = data.title;
|
|
const artist = data.artist || 'Lili Records';
|
|
// Clean up title if it contains artist
|
|
let fullDisplay = title.includes(artist) ? title : `${artist} - ${title}`;
|
|
|
|
if (trackTitle.textContent !== fullDisplay) {
|
|
trackTitle.style.opacity = '0';
|
|
|
|
trackTitle.classList.remove('scrolling');
|
|
setTimeout(() => {
|
|
trackTitle.textContent = fullDisplay;
|
|
trackTitle.style.opacity = '1';
|
|
|
|
// Check if scrolling is needed
|
|
if (trackTitle.scrollWidth > trackTitle.clientWidth) {
|
|
trackTitle.classList.add('scrolling');
|
|
// Double the text for seamless loop
|
|
trackTitle.innerHTML = `<span>${fullDisplay} ${fullDisplay} </span>`;
|
|
}
|
|
}, 500);
|
|
}
|
|
|
|
document.title = `▶ ${fullDisplay} | Lili Records Radio`;
|
|
|
|
// Media Session API for System Controls
|
|
if ('mediaSession' in navigator) {
|
|
navigator.mediaSession.metadata = new MediaMetadata({
|
|
title: title,
|
|
artist: artist,
|
|
album: 'Lili Records Radio',
|
|
artwork: [
|
|
{ src: data.cover || './assets/pasted-20260215-163754-def41f49.png', sizes: '512x512', type: 'image/png' },
|
|
{ src: data.cover || './assets/pasted-20260215-163754-def41f49.png', sizes: '256x256', type: 'image/png' }
|
|
]
|
|
});
|
|
}
|
|
} else {
|
|
trackTitle.textContent = "Lili Records Radio - En Vivo";
|
|
}
|
|
} catch (error) {
|
|
console.error('Error fetching metadata:', error);
|
|
if (trackTitle.textContent === "Cargando stream...") {
|
|
trackTitle.textContent = "Lili Records Radio - En Vivo";
|
|
}
|
|
}
|
|
}
|
|
|
|
// Update every 30 seconds
|
|
updateMetadata();
|
|
setInterval(updateMetadata, 30000);
|
|
|
|
// Handle possible audio interruptions
|
|
audio.addEventListener('error', function(e) {
|
|
console.error('Audio error:', e);
|
|
trackTitle.textContent = "Error de conexión. Reintentando...";
|
|
setTimeout(() => {
|
|
audio.load();
|
|
if (!audio.paused) audio.play();
|
|
}, 5000);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|