<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="PacCrypt - Secure file pickup and decryption" />
    <title>PacCrypt - Secure File Pickup</title>
    
    <!-- Favicon -->
    <link rel="icon" href="{{ url_for('static', filename='img/PacCrypt.png') }}" type="image/png" />
    
    <!-- Stylesheets -->
    <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}" />
    <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
</head>
<body class="dark">
    <!-- Header -->
    <header class="card logo-header">
        <div class="logo-container">
          <img src="{{ url_for('static', filename='img/PacCrypt.png') }}" alt="PacCrypt Logo" />
          <div class="logo-text">
            <h1>PACCRYPT</h1>
            <p>Encrypted File Pickup</p>
          </div>
        </div>
      </header>  

    <!-- Main Content -->
    <main>
        <!-- File Pickup Section -->
        <section id="pickup-section" class="card form-group">
            <h2>File Pickup</h2>
            
            <!-- Flash Messages -->
            {% with messages = get_flashed_messages() %}
            {% if messages %}
            <ul style="color: lime; list-style: none; padding-left: 0;">
                {% for message in messages %}
                <li>{{ message }}</li>
                {% endfor %}
            </ul>
            {% endif %}
            {% endwith %}

            <!-- File Info -->
            <div class="form-group">
                <p style="color: #00ff99; margin-bottom: 15px;">File ID: <code>{{ file_id }}</code></p>
            </div>

            <!-- Pickup Form -->
            <form method="POST" class="form-group">
                <div class="form-group">
                    <input type="password" 
                           name="pickup_password" 
                           placeholder="Pickup Password" 
                           required 
                           autocomplete="off" />
                </div>
                
                <div class="form-group">
                    <input type="password" 
                           name="enc_password" 
                           placeholder="Encryption Password" 
                           required 
                           autocomplete="off" />
                </div>

                <div class="button-group">
                    <button type="submit">Decrypt and Download</button>
                </div>
            </form>
        </section>

        <!-- Security Notice Section -->
        <section id="security-notice-section" class="card form-group">
            <h2>Security Notice</h2>
            <p style="color: #00ff99; text-align: center;">
                Make sure you're on the correct domain before entering any passwords.<br>
                Your file will be permanently deleted after download.
            </p>
        </section>

        <!-- Link ID Section -->
        <section id="link-id-section" class="card form-group">
            <p style="color: #00ff99; text-align: center; font-family: monospace; font-size: 1.1em;">
                Link ID: <code>{{ file_id }}</code>
            </p>
        </section>
    </main>

    <!-- Footer -->
    <footer>
        <p>&copy; 2025 UnNaturalll-Dev. All rights reserved.</p>
        <a href="https://github.com/TySP-Dev" target="_blank" id="github-link">
            <img src="\static\img\Github_logo.png" alt="GitHub Logo" width="100" />
        </a>
    </footer>
</body>
</html>
