<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Lili Records Radio{% endblock %}</title>
    
    <!-- Google Fonts -->
    <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=Poppins:wght@300;400;600;800&display=swap" rel="stylesheet">
    
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
    
    {% block head %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark sticky-top">
        <div class="container">
            <a class="navbar-brand d-flex align-items-center" href="{% url 'home' %}">
                <img src="{% static 'images/logo.png' %}" alt="Logo" height="40" class="me-2">
                LILI RECORDS
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link fw-bold text-cyan" href="{{ radio_url }}" target="_blank">
                            <i class="fas fa-play-circle me-1"></i> Escuchar Música
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#schedule">Horario</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#request">Pedir Canción</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/admin/">Administración</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <main>
        {% if messages %}
            <div class="container mt-3">
                {% for message in messages %}
                    <div class="alert alert-{{ message.tags }} alert-dismissible fade show bg-card text-white border-0" role="alert">
                        {{ message }}
                        <button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Cerrar"></button>
                    </div>
                {% endfor %}
            </div>
        {% endif %}

        {% block content %}{% endblock %}
    </main>

    <!-- WhatsApp Widget -->
    <div class="whatsapp-widget">
        <div class="whatsapp-tooltip">¡Envía tu mensaje de voz aquí!</div>
        <a href="https://wa.me/{{ whatsapp_number|cut:'+'|cut:' ' }}?text=Hola,%20quiero%20enviar%20un%20mensaje%20de%20voz%20para%20la%20radio" class="whatsapp-button" target="_blank">
            <i class="fab fa-whatsapp"></i>
        </a>
    </div>

    <footer class="footer">
        <div class="container">
            <p>&copy; 2026 Lili Records Radio. Todos los derechos reservados.</p>
            <p class="small">Desarrollado por Flatlogic AI</p>
        </div>
    </footer>

    <!-- Bootstrap 5 JS Bundle -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    {% block scripts %}{% endblock %}
</body>
</html>