<?php
// account_expired.php
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

// Verifica se veio de uma conta expirada
if (!isset($_SESSION['expired_user'])) {
    header("Location: index.php");
    exit;
}

$username = $_SESSION['expired_user'];
?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Conta Expiresda - ESSO4KTV</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
        }
        
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #131419;
        }
        
        .expired-box {
            position: relative;
            width: 400px;
            padding: 40px;
            background: #131419;
            border-radius: 10px;
            text-align: center;
            box-shadow: -5px -5px 10px rgba(255, 255, 255, 0.05),
                5px 5px 15px rgba(0,0,0,0.5);
            border: 2px solid #ff0047;
        }
        
        .expired-box h2 {
            color: #ff0047;
            font-weight: 500;
            margin-bottom: 20px;
            text-transform: uppercase;
            letter-spacing: 2px;
        }
        
        .expired-box p {
            color: #c7c7c7;
            margin-bottom: 15px;
            line-height: 1.5;
        }
        
        .user-info {
            background: rgba(255, 0, 71, 0.1);
            padding: 15px;
            border-radius: 5px;
            margin: 20px 0;
        }
        
        .support-info {
            background: rgba(255, 255, 255, 0.05);
            padding: 15px;
            border-radius: 5px;
            margin: 20px 0;
        }
        
        .support-info h4 {
            color: #fff;
            margin-bottom: 10px;
        }
        
        .btn-login {
            display: inline-block;
            margin-top: 20px;
            padding: 12px 30px;
            background: #ff0047;
            color: white;
            text-decoration: none;
            border-radius: 40px;
            font-weight: 500;
            transition: 0.3s;
        }
        
        .btn-login:hover {
            background: #cc0038;
        }
        
        .icon {
            font-size: 50px;
            color: #ff0047;
            margin-bottom: 20px;
        }
    </style>
</head>
<body>
    <div class="expired-box">
        <div class="icon">⚠️</div>
        <h2>CONTA VENCIDA</h2>
        
        <p>Seus créditos acabaram!</p>
        
        <div class="user-info">
            <p><strong>Usuário:</strong> <?=htmlspecialchars($username)?></p>
            <p><strong>Status:</strong> <span style="color: #ff0047;">SEM CRÉDITOS</span></p>
            <p><strong>Data:</strong> <?=date('d/m/Y')?></p>
        </div>
        
        <div class="support-info">
            <h4>📞 Entre em contato:</h4>
            <p><strong>WhatsApp:</strong> +55 (11) 99999-9999</p>
            <p><strong>Telegram:</strong> @suportesso4k</p>
            <p><strong>Email:</strong> suporte@esso4k-tv.com</p>
        </div>
        
        <p style="color: #888; font-size: 14px; margin-top: 20px;">
            Após a renovação, faça login novamente.
        </p>
        
        <a href="index.php" class="btn-login">Voltar para Entrar</a>
    </div>
</body>
</html>