<?php
// api/force_sync.php - 絕對暴力對齊 (直接寫入數據版)
header("Content-Type: text/html; charset=utf-8");

// 直接鎖定您剛剛提供的真實數據，不經過資料庫查詢
$userData = json_encode([
    "user_id" => 8,
    "username" => "rainzoowon",
    "coins" => 999879, // 這是您剛剛顯示的餘額
    "level" => 99      // 天啟者權限
]);
?>
<!DOCTYPE html>
<html lang="zh-TW">
<head>
    <meta charset="UTF-8">
    <title>絕對同步中</title>
    <style>
        body { background:#121212; color:#00ff88; display:flex; justify-content:center; align-items:center; height:100vh; margin:0; font-family:sans-serif; }
        .box { border:1px solid #333; padding:40px; border-radius:10px; text-align:center; background:#1a1a1a; }
    </style>
</head>
<body>
    <div class="box">
        <h2>⚡ 正在強制寫入統帥憑證...</h2>
        <p>鎖定目標：RAINZOO (ID: 8)</p>
    </div>
    <script>
        // 1. 清除舊的干擾
        localStorage.removeItem('zoo_user');
        
        // 2. 暴力寫入正確的 JSON
        localStorage.setItem('zoo_user', '<?php echo $userData; ?>');
        
        // 3. 0.5秒後踢回駕駛艙
        setTimeout(() => {
            window.location.href = '../index.html';
        }, 500);
    </script>
</body>
</html>