<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Formulir Permintaan Website</title>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #eef2f6;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            color: #333;
        }
        .container {
            background-color: #ffffff;
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 700px;
            box-sizing: border-box;
            margin-bottom: 30px;
            border: 1px solid #e0e6ed;
        }
        h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 2.5em;
            font-weight: 700;
            line-height: 1.2;
        }
        .subtitle {
            text-align: center;
            color: #6c757d;
            margin-bottom: 30px;
            font-size: 1.1em;
            line-height: 1.5;
        }
        .form-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            margin-bottom: 8px;
            color: #495057;
            font-weight: 500;
            font-size: 0.95em;
        }
        input[type="text"],
        textarea {
            width: 100%;
            padding: 12px 18px;
            border: 1px solid #ced4da;
            border-radius: 8px;
            box-sizing: border-box;
            font-size: 1em;
            color: #495057;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        input[type="text"]::placeholder,
        textarea::placeholder {
            color: #adb5bd;
        }
        input[type="text"]:focus,
        textarea:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
            outline: none;
        }
        textarea {
            resize: vertical;
            min-height: 150px;
        }
        button {
            background-color: #28a745;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.15em;
            font-weight: 600;
            width: 100%;
            transition: background-color 0.3s ease, transform 0.2s ease;
            letter-spacing: 0.5px;
        }
        button:hover {
            background-color: #218838;
            transform: translateY(-2px);
        }
        button:active {
            transform: translateY(0);
        }
        .message {
            margin-top: 25px;
            margin-bottom: 20px;
            padding: 18px;
            border-radius: 10px;
            text-align: center;
            font-size: 1.05em;
            font-weight: 500;
            animation: fadeIn 0.5s ease-out;
        }
        .success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        .footer {
            margin-top: 30px;
            font-size: 0.8em;
            color: #9a9a9a;
            text-align: center;
            padding: 10px;
        }
        .back-button {
            display: inline-block;
            margin-top: 20px;
            padding: 10px 20px;
            background-color: #f0f2f6;
            color: #6c757d;
            text-decoration: none;
            border-radius: 8px;
            font-size: 0.9em;
            transition: background-color 0.3s ease;
        }
        .back-button:hover {
            background-color: #e2e6ea;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🌐 Ajukan Permintaan Website</h1>
        <p class="subtitle">Jelaskan kebutuhan website impian Anda di sini.</p>
        
        <% if (message) { %>
            <div class="message <%= type %>">
                <%= message %>
            </div>
        <% } %>

        <form action="/submit-request-web" method="POST">
            <div class="form-group">
                <label for="nama">Nama Anda (Opsional):</label>
                <input type="text" id="nama" name="nama" placeholder="Kosongkan untuk anonim" autocomplete="off">
            </div>

            <div class="form-group">
                <label for="projectType">Jenis Website (Opsional):</label>
                <input type="text" id="projectType" name="projectType" placeholder="Cth: E-commerce, Portofolio, Blog, Landing Page">
            </div>

            <div class="form-group">
                <label for="requestWebDetail">Detail Permintaan Website (Wajib diisi):</label>
                <textarea id="requestWebDetail" name="requestWebDetail" rows="10" placeholder="Jelaskan secara rinci website yang anda inginkan"></textarea>
            </div>
            
            <button type="submit">Kirim Permintaan Website 🎉</button>
        </form>
        <a href="/" class="back-button">← Kembali ke Pilihan Utama</a>
    </div>

    <footer class="footer">
        Dibuat dengan ❤️ oleh AP
    </footer>
</body>
</html>