<?php
session_start();

// ★ 在這裡設定您專屬的超級管理員帳號與密碼
$super_admin_user = "godadmin";
$super_admin_pass = "god9admin9"; // 請務必改成複雜的密碼

$error_msg = '';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $username = trim($_POST['username']);
    $password = $_POST['password'];

    if ($username === $super_admin_user && $password === $super_admin_pass) {
        $_SESSION['super_admin_logged_in'] = true;
        header("Location: index.php");
        exit;
    } else {
        $error_msg = "帳號或密碼錯誤！";
    }
}
?>
<!DOCTYPE html>
<html lang="zh-TW">
<head>
    <meta charset="UTF-8">
    <title>世界政府 - 登入驗證</title>
    <style>
        body { font-family: 'Segoe UI', sans-serif; background-color: #1a1a2e; color: #e9ecef; margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; }
        .login-box { background: #16213e; padding: 40px; border-radius: 15px; border: 1px solid #e94560; box-shadow: 0 10px 30px rgba(233, 69, 96, 0.2); width: 100%; max-width: 350px; text-align: center; }
        h1 { color: #f1c40f; margin-top: 0; font-size: 1.5rem; }
        input { width: 100%; padding: 12px; margin-bottom: 20px; background: #1a1a2e; border: 1px solid #0f3460; color: #fff; border-radius: 8px; box-sizing: border-box;}
        button { background: #e94560; color: white; border: none; padding: 12px; width: 100%; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; }
        button:hover { background: #ff4d6d; }
        .error { color: #ff4d6d; margin-bottom: 15px; font-weight: bold; }
    </style>
</head>
<body>
    <div class="login-box">
        <h1>👁️ 世界政府存取點</h1>
        <?php if ($error_msg): ?><div class="error"><?php echo $error_msg; ?></div><?php endif; ?>
        <form method="POST">
            <input type="text" name="username" required placeholder="系統最高權限帳號">
            <input type="password" name="password" required placeholder="存取密碼">
            <button type="submit">確認授權登入</button>
        </form>
    </div>
</body>
</html>