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

{% block title %}Home - Packs Site{% endblock %}

{% block content %}
<div class="home-hero">
    <div class="home-hero-inner">
        <h1>Packs Site</h1>
        <p>Hosted datapacks for Needs Of Nature &amp; Animation Director.</p>
        <p class="home-hero-sub">Browse and download packs shared by the community. Upload your own once you have a creator account.</p>
        <div class="home-hero-actions">
            <a href="#" class="btn btn-primary"><i class="fas fa-download"></i> Browse packs</a>
            <a href="#" class="btn btn-secondary"><i class="fas fa-upload"></i> Upload a pack</a>
        </div>
    </div>
</div>

<div class="home-stats">
    <div class="stat-card">
        <i class="fas fa-users"></i>
        <span class="stat-value">0</span>
        <span class="stat-label">Creators</span>
    </div>
    <div class="stat-card">
        <i class="fas fa-box-open"></i>
        <span class="stat-value">0</span>
        <span class="stat-label">Packs</span>
    </div>
    <div class="stat-card">
        <i class="fas fa-download"></i>
        <span class="stat-value">0</span>
        <span class="stat-label">Downloads</span>
    </div>
    <div class="stat-card">
        <i class="fas fa-tag"></i>
        <span class="stat-value">0</span>
        <span class="stat-label">Versions</span>
    </div>
</div>

<div class="home-section">
    <div class="home-section-header">
        <h2>Latest packs</h2>
        <a href="#" class="home-section-link">View all <i class="fas fa-arrow-right"></i></a>
    </div>

    <div class="pack-grid">
        {% comment %} Example cards — replace with real Pack objects when the library model lands. {% endcomment %}
        <a href="#" class="pack-card">
            <div class="pack-card-thumb">
                <img src="{% static 'Logo.png' %}" alt="">
            </div>
            <div class="pack-card-body">
                <h3>Example Pack</h3>
                <p class="pack-card-author"><i class="fas fa-user"></i> a_creator</p>
                <p class="pack-card-desc">Placeholder description for a datapack.</p>
                <div class="pack-card-meta">
                    <span class="pack-card-version"><i class="fas fa-tag"></i> v1.0.0</span>
                    <span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
                </div>
            </div>
        </a>

        <a href="#" class="pack-card">
            <div class="pack-card-thumb">
                <img src="{% static 'Logo.png' %}" alt="">
            </div>
            <div class="pack-card-body">
                <h3>Another Pack</h3>
                <p class="pack-card-author"><i class="fas fa-user"></i> someone</p>
                <p class="pack-card-desc">This card shows what the library grid will look like.</p>
                <div class="pack-card-meta">
                    <span class="pack-card-version"><i class="fas fa-tag"></i> v0.9.2</span>
                    <span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
                </div>
            </div>
        </a>

        <a href="#" class="pack-card">
            <div class="pack-card-thumb">
                <img src="{% static 'Logo.png' %}" alt="">
            </div>
            <div class="pack-card-body">
                <h3>Third Example</h3>
                <p class="pack-card-author"><i class="fas fa-user"></i> dev</p>
                <p class="pack-card-desc">Static assets, profile pictures and zip downloads land under /media/&lt;user&gt;/&lt;pack&gt;/.</p>
                <div class="pack-card-meta">
                    <span class="pack-card-version"><i class="fas fa-tag"></i> v1.1.0</span>
                    <span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
                </div>
            </div>
        </a>

        <a href="#" class="pack-card">
            <div class="pack-card-thumb">
                <img src="{% static 'Logo.png' %}" alt="">
            </div>
            <div class="pack-card-body">
                <h3>And Another</h3>
                <p class="pack-card-author"><i class="fas fa-user"></i> tester</p>
                <p class="pack-card-desc">Responsive grid, Catppuccin-styled, ready for real data.</p>
                <div class="pack-card-meta">
                    <span class="pack-card-version"><i class="fas fa-tag"></i> v0.1.0</span>
                    <span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
                </div>
            </div>
        </a>
    </div>
</div>

<div class="home-section">
    <div class="home-section-header">
        <h2>How it works</h2>
    </div>
    <div class="how-grid">
        <div class="how-card">
            <i class="fas fa-key"></i>
            <h3>Enter the site</h3>
            <p>Use the master password to get in. It only grants access to browse and download.</p>
        </div>
        <div class="how-card">
            <i class="fas fa-user-plus"></i>
            <h3>Create an account</h3>
            <p>Creators register to get their own profile, upload packs and manage their content.</p>
        </div>
        <div class="how-card">
            <i class="fas fa-upload"></i>
            <h3>Share packs</h3>
            <p>Upload a .zip plus page assets. Everything is stored under your own folder.</p>
        </div>
        <div class="how-card">
            <i class="fas fa-robot"></i>
            <h3>Keep mods updated</h3>
            <p>The Fabric mod checks the API with your personal token and downloads new versions automatically.</p>
        </div>
    </div>
</div>

<div class="home-section">
    <div class="home-gate-note">
        <i class="fas fa-shield-halved"></i>
        <p>This is a private site. All content is gated and only reachable by authorized users. Unauthorized API or media requests are rejected with <code>401 Unauthorized</code>.</p>
    </div>
</div>
{% endblock %}
