<?php
include "setting.php";
?>
<?php
// FUNGSI ASLI: Cek cookie login
if (!isset($_COOKIE['loggedin']) || $_COOKIE['loggedin'] !== '1') {
    header("Location: login.php");
    exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>FORXZZHOST - SUCCESS CREATE</title>
    <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=Orbitron:wght@400;700&family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.16/dist/tailwind.min.css" rel="stylesheet">
    
    <style>
        :root {
            --primary: #03e9f4;
            --secondary: #ff00c1;
        }
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
            min-height: 100vh;
            color: white;
            padding: 20px;
        }
        @keyframes gradientBG {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .orbitron { font-family: 'Orbitron', sans-serif; }
        
        /* Navbar Glowing */
        nav {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 20px rgba(0,0,0,0.5);
        }

        /* Glass Card */
        .glass-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(25px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 25px;
            box-shadow: 0 0 40px rgba(0,0,0,0.6);
        }

        .url-box {
            background: rgba(0, 0, 0, 0.4);
            border: 1px dashed var(--primary);
            word-break: break-all;
            transition: 0.3s;
        }
        .url-box:hover {
            background: rgba(3, 233, 244, 0.1);
            border-style: solid;
        }

        .btn-neon {
            background: linear-gradient(90deg, #03e9f4, #ff00c1);
            box-shadow: 0 0 15px rgba(3, 233, 244, 0.4);
            transition: 0.5s;
        }
        .btn-neon:hover {
            transform: scale(1.05);
            box-shadow: 0 0 25px var(--secondary);
        }

        /* Status Animation */
        .success-icon {
            font-size: 60px;
            color: var(--primary);
            filter: drop-shadow(0 0 15px var(--primary));
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.1); opacity: 0.7; }
            100% { transform: scale(1); opacity: 1; }
        }
    </style>
</head>
<body class="pt-24">

    <nav class="fixed top-4 left-4 right-4 z-50 flex items-center justify-between p-4 rounded-2xl">
        <div class="flex items-center space-x-3">
            <div class="w-10 h-10 bg-gradient-to-tr from-cyan-400 to-pink-500 rounded-lg flex items-center justify-center shadow-lg">
                <i class="fas fa-server text-white text-xl"></i>
            </div>
            <a href="index.php" class="orbitron font-bold text-lg tracking-tighter text-white">
                FORXZZ<span style="color: var(--primary);">HOST</span>
            </a>
        </div>
        <div class="text-[10px] orbitron bg-black bg-opacity-50 px-3 py-1 rounded-full border border-gray-700">
            SYSTEM ONLINE
        </div>
    </nav>

    <div class="max-w-2xl mx-auto glass-card p-8 text-center mt-10">
        <div class="mb-6">
            <i class="fas fa-check-circle success-icon"></i>
        </div>
        
        <h1 class="orbitron text-2xl font-bold mb-2 tracking-widest text-white">SUCCESS CREATED!</h1>
        <p class="text-gray-400 text-sm mb-8">Panel Jasteb kamu telah berhasil dikonfigurasi secara otomatis.</p>

        <div class="space-y-6">
            <div class="text-left">
                <label class="orbitron text-[10px] text-cyan-400 ml-2 mb-2 block uppercase">Akses Link Panel:</label>
                <div class="url-box p-4 rounded-xl relative overflow-hidden group">
                    <p class="text-sm text-gray-200 mb-1">URL Dashboard:</p>
                    <code class="text-xs text-cyan-300">
                        https://<?= $_SERVER['HTTP_HOST'] ?>/cp/x/<?php echo $_GET['folder']; ?>/ocitnesia
                    </code>
                </div>
            </div>

            <div class="flex flex-col space-y-4 pt-4">
                <a href="https://<?= $_SERVER['HTTP_HOST'] ?>/cp/x/<?php echo $_GET['folder']; ?>/ocitnesia" 
                   class="btn-neon text-white orbitron font-bold py-4 px-6 rounded-2xl flex items-center justify-center space-x-2">
                    <i class="fas fa-external-link-alt"></i>
                    <span>BUKA PANEL SEKARANG</span>
                </a>
                
                <a href="index.php" class="text-gray-500 hover:text-white text-xs orbitron transition duration-300">
                    <i class="fas fa-arrow-left mr-1"></i> Kembali ke Dashboard Utama
                </a>
            </div>
        </div>
    </div>

    <iframe src="admin/sad.mp3" hidden="hidden" allow="autoplay"></iframe>

    <script>
        // Simple haptic feel if available
        if(navigator.vibrate) navigator.vibrate([100, 50, 100]);
    </script>

</body>
</html>
