{% extends 'base.html' %}
{% load static %}

{% block content %}
<div class="hero-section position-relative py-5 overflow-hidden">
    <!-- Background Decoration -->
    <div class="position-absolute top-50 start-50 translate-middle w-100 h-100" style="background: radial-gradient(circle at center, rgba(255, 215, 0, 0.05) 0%, rgba(0, 0, 0, 0) 70%); z-index: -1;"></div>
    
    <div class="container py-5">
        <div class="row align-items-center">
            <div class="col-lg-7 text-center text-lg-start">
                <span class="badge bg-warning text-black fw-bold mb-3 px-3 py-2">NEW ENGINE v2.0</span>
                <h1 class="display-1 fw-bold text-white mb-3 tracking-tighter" style="font-family: 'Oswald', sans-serif;">LEGENDARY <span class="text-warning">TONES</span></h1>
                <p class="lead text-secondary mb-5 pe-lg-5">
                    The most powerful multi-effects suite for guitarists. 70+ Signature presets from 14 icons. 
                    Optimized for <span class="text-white">ASIO/WASAPI</span> with a native <span class="text-white">64-bit architecture</span>.
                </p>
                <div class="d-flex flex-wrap gap-3 justify-content-center justify-content-lg-start">
                    <a href="{% url 'standalone_download' %}" class="btn btn-warning btn-lg px-5 fw-bold rounded-pill">GET STANDALONE</a>
                    <a href="#artists" class="btn btn-outline-light btn-lg px-5 fw-bold rounded-pill">EXPLORE ARTISTS</a>
                </div>
            </div>
            <div class="col-lg-5 d-none d-lg-block">
                <div class="engine-preview bg-dark p-4 rounded-4 border border-secondary shadow-lg rotate-3">
                    <div class="d-flex justify-content-between align-items-center mb-3">
                        <div class="d-flex gap-2">
                            <div class="bg-danger rounded-circle" style="width: 10px; height: 10px;"></div>
                            <div class="bg-warning rounded-circle" style="width: 10px; height: 10px;"></div>
                            <div class="bg-success rounded-circle" style="width: 10px; height: 10px;"></div>
                        </div>
                        <small class="text-secondary fw-bold">MASTER_ENGINE_X64</small>
                    </div>
                    <div class="p-3 bg-black rounded border border-secondary mb-3">
                        <div class="d-flex justify-content-between mb-2">
                            <span class="small text-secondary">LATENCY</span>
                            <span class="small text-info">2.9ms</span>
                        </div>
                        <div class="progress bg-dark" style="height: 4px;">
                            <div class="progress-bar bg-info" style="width: 15%"></div>
                        </div>
                    </div>
                    <div class="p-3 bg-black rounded border border-secondary">
                        <div class="d-flex justify-content-between mb-2">
                            <span class="small text-secondary">DSP LOAD</span>
                            <span class="small text-warning">0.03%</span>
                        </div>
                        <div class="progress bg-dark" style="height: 4px;">
                            <div class="progress-bar bg-warning" style="width: 5%"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<section id="artists" class="py-5 bg-black">
    <div class="container">
        <div class="d-flex justify-content-between align-items-end mb-5">
            <div>
                <h2 class="display-5 fw-bold text-white mb-0">THE <span class="text-warning">ROSTER</span></h2>
                <p class="text-secondary mb-0">Explore the signature chains of guitar legends.</p>
            </div>
            <div class="text-end">
                <span class="h4 text-warning mb-0">14</span>
                <p class="text-secondary small text-uppercase fw-bold mb-0">Icons</p>
            </div>
        </div>

        <div class="row g-4">
            {% for artist in artists %}
            <div class="col-6 col-md-4 col-lg-3">
                <a href="{% url 'artist_detail' artist.slug %}" class="text-decoration-none">
                    <div class="artist-card bg-dark border border-secondary p-4 text-center h-100 transition-all hover-glow">
                        <div class="mb-3 position-relative d-inline-block">
                            <div class="rounded-circle overflow-hidden border border-secondary" style="width: 100px; height: 100px; margin: 0 auto;">
                                {% if artist.image_url %}
                                <img src="{{ artist.image_url }}" alt="{{ artist.name }}" class="img-fluid h-100 w-100 object-fit-cover">
                                {% else %}
                                <div class="h-100 w-100 bg-black d-flex align-items-center justify-content-center">
                                    <i class="bi bi-person-fill display-4 text-secondary"></i>
                                </div>
                                {% endif %}
                            </div>
                            <span class="position-absolute bottom-0 end-0 badge rounded-pill bg-warning text-black fw-bold" style="transform: translate(25%, 25%); border: 2px solid #000;">5+</span>
                        </div>
                        <h5 class="text-white mb-1">{{ artist.name }}</h5>
                        <p class="small text-secondary mb-0">{{ artist.style }}</p>
                    </div>
                </a>
            </div>
            {% endfor %}
        </div>
    </div>
</section>

<section class="py-5 bg-dark border-top border-secondary">
    <div class="container">
        <div class="row align-items-center">
            <div class="col-lg-6">
                <h2 class="display-5 fw-bold text-white mb-4">64-BIT <span class="text-info">ACCELERATION</span></h2>
                <p class="text-secondary lead">
                    Our proprietary engine leverages native 64-bit processing for maximum dynamic range and zero audible distortion. 
                    Whether you use <span class="text-white">ASIO</span> on Windows or <span class="text-white">Core Audio</span> on macOS, 
                    the latency remains imperceptible.
                </p>
            </div>
            <div class="col-lg-6">
                <div class="row g-3">
                    <div class="col-6">
                        <div class="p-4 bg-black border border-secondary rounded">
                            <i class="bi bi-lightning-fill text-warning fs-3 mb-2 d-block"></i>
                            <h6 class="text-white">Ultra Low Latency</h6>
                            <p class="small text-secondary mb-0">Sub 3ms processing with WASAPI/ASIO.</p>
                        </div>
                    </div>
                    <div class="col-6">
                        <div class="p-4 bg-black border border-secondary rounded">
                            <i class="bi bi-layers-fill text-info fs-3 mb-2 d-block"></i>
                            <h6 class="text-white">Dual IR Loader</h6>
                            <p class="small text-secondary mb-0">Blend two impulses for massive space.</p>
                        </div>
                    </div>
                    <div class="col-6">
                        <div class="p-4 bg-black border border-secondary rounded">
                            <i class="bi bi-shield-check text-success fs-3 mb-2 d-block"></i>
                            <h6 class="text-white">Noise Gate</h6>
                            <p class="small text-secondary mb-0">Advanced algorithms for dead silence.</p>
                        </div>
                    </div>
                    <div class="col-6">
                        <div class="p-4 bg-black border border-secondary rounded">
                            <i class="bi bi-cpu text-danger fs-3 mb-2 d-block"></i>
                            <h6 class="text-white">64-Bit Core</h6>
                            <p class="small text-secondary mb-0">Optimized for high-performance DSP.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
.hover-glow:hover {
    border-color: #FFD700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translateY(-5px);
}
.rotate-3 {
    transform: perspective(1000px) rotateY(-10deg) rotateX(10deg);
}
.transition-all {
    transition: all 0.3s ease;
}
</style>
{% endblock %}