<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="JaguarTV Server - Sistema de Streaming IPTV">
    <title>JaguarTV Server - Server</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            padding: 20px;
        }
        
        .container {
            max-width: 900px;
            width: 100%;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 50px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }
        
        h1 {
            font-size: 48px;
            margin-bottom: 10px;
            text-align: center;
        }
        
        .subtitle {
            text-align: center;
            font-size: 18px;
            opacity: 0.9;
            margin-bottom: 40px;
        }
        
        .status {
            display: inline-block;
            padding: 8px 20px;
            background: #10b981;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 30px;
        }
        
        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .info-card {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }
        
        .info-card h3 {
            font-size: 14px;
            opacity: 0.8;
            margin-bottom: 10px;
        }
        
        .info-card .value {
            font-size: 24px;
            font-weight: bold;
        }
        
        .endpoints {
            background: rgba(255, 255, 255, 0.1);
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        
        .endpoints h2 {
            margin-bottom: 20px;
            font-size: 24px;
        }
        
        .endpoint {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 5px;
            margin-bottom: 10px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            word-break: break-all;
        }
        
        .endpoint strong {
            color: #fbbf24;
        }
        
        .btn {
            display: inline-block;
            padding: 15px 40px;
            background: #fff;
            color: #667eea;
            text-decoration: none;
            border-radius: 10px;
            font-weight: 600;
            transition: all 0.3s;
            margin: 10px;
            cursor: pointer;
            border: none;
            font-size: 16px;
        }
        
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        
        .footer {
            text-align: center;
            margin-top: 30px;
            opacity: 0.8;
            font-size: 14px;
        }
        
        .json-viewer {
            background: rgba(0, 0, 0, 0.3);
            padding: 20px;
            border-radius: 10px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            max-height: 400px;
            overflow-y: auto;
            margin-top: 20px;
            display: none;
        }
        
        .json-viewer pre {
            margin: 0;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        .docs-box {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 10px;
            margin-top: 20px;
        }
        
        .docs-box h3 {
            margin-bottom: 15px;
        }
        
        .docs-box p {
            margin-bottom: 10px;
            opacity: 0.9;
        }
        
        .docs-box code {
            background: rgba(0, 0, 0, 0.3);
            padding: 2px 8px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
        }
        
        @media (max-width: 768px) {
            .container {
                padding: 30px 20px;
            }
            
            h1 {
                font-size: 32px;
            }
            
            .btn {
                padding: 12px 30px;
                font-size: 14px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🐆 JaguarTV Server</h1>
        <p class="subtitle">Sistema de Streaming IPTV com Criptografia RSA</p>
        
        <div style="text-align: center;">
            <span class="status">● ONLINE</span>
        </div>

        <div class="info-grid">
            <div class="info-card">
                <h3>Versão</h3>
                <div class="value">1.0.14</div>
            </div>
            <div class="info-card">
                <h3>Ambiente</h3>
                <div class="value">PROD</div>
            </div>
            <div class="info-card">
                <h3>PHP</h3>
                <div class="value">7.4.33</div>
            </div>
            <div class="info-card">
                <h3>Database</h3>
                <div class="value">SQLite</div>
            </div>
        </div>

        <div class="endpoints">
            <h2>📡 Endpoints Disponíveis</h2>
            <div class="endpoint"><strong>User API:</strong> https://zeus.oneplayapp.shop/api/v1/user</div>
            <div class="endpoint"><strong>Admin API:</strong> https://zeus.oneplayapp.shop/api/v1/admin</div>
            <div class="endpoint"><strong>Meta API:</strong> https://zeus.oneplayapp.shop/api/v1/meta</div>
            <div class="endpoint"><strong>Sports API:</strong> https://zeus.oneplayapp.shop/api/v1/sports</div>
            <div class="endpoint"><strong>EPG API:</strong> https://zeus.oneplayapp.shop/api/v1/epg</div>
            <div class="endpoint"><strong>Favorites API:</strong> https://zeus.oneplayapp.shop/api/v1/favorites</div>
            <div class="endpoint"><strong>Share Codes API:</strong> https://zeus.oneplayapp.shop/api/v1/share</div>
            <div class="endpoint"><strong>Metrics API:</strong> https://zeus.oneplayapp.shop/api/v1/metrics</div>
            <div class="endpoint"><strong>Config API:</strong> https://zeus.oneplayapp.shop/api/v1/config</div>
        </div>

        <div style="text-align: center;">
            <a href="admin" class="btn">🔐 Painel Admin</a>
            <a href="test_api.php" class="btn">🧪 Testar APIs</a>
            <a href="popular_banco.php?senha=jaguar2026" class="btn">🌱 Popular Banco</a>
            <button onclick="toggleJSON()" class="btn">📄 Ver JSON</button>
        </div>
        
        <div style="text-align: center; margin-top: 10px;">
            <a href="diagnostico_seed.php" class="btn" style="background: rgba(255,255,255,0.2); font-size: 14px; padding: 10px 25px;">🔍 Diagnóstico Seed</a>
            <a href="seed_database_safe.php" class="btn" style="background: rgba(255,255,255,0.2); font-size: 14px; padding: 10px 25px;">🛡️ Seed Seguro</a>
        </div>

        <div id="jsonViewer" class="json-viewer">
            <pre>{
    &quot;app_name&quot;: &quot;JaguarTV Server&quot;,
    &quot;version&quot;: &quot;1.0.14&quot;,
    &quot;environment&quot;: &quot;prod&quot;,
    &quot;status&quot;: &quot;online&quot;,
    &quot;timestamp&quot;: 1783329269,
    &quot;server_time&quot;: &quot;2026-07-06 06:14:29&quot;,
    &quot;endpoints&quot;: {
        &quot;user_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/user&quot;,
        &quot;admin_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/admin&quot;,
        &quot;meta_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/meta&quot;,
        &quot;sports_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/sports&quot;,
        &quot;epg_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/epg&quot;,
        &quot;favorites_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/favorites&quot;,
        &quot;share_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/share&quot;,
        &quot;metrics_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/metrics&quot;,
        &quot;config_api&quot;: &quot;https://zeus.oneplayapp.shop/api/v1/config&quot;,
        &quot;admin_panel&quot;: &quot;https://zeus.oneplayapp.shop/admin&quot;
    },
    &quot;features&quot;: {
        &quot;rsa_encryption&quot;: true,
        &quot;aes_encryption&quot;: true,
        &quot;jwt_auth&quot;: true,
        &quot;sqlite_database&quot;: true,
        &quot;trial_system&quot;: true,
        &quot;multi_device&quot;: true,
        &quot;epg_support&quot;: true,
        &quot;catchup_support&quot;: true,
        &quot;sports_matches&quot;: true,
        &quot;favorites_system&quot;: true,
        &quot;share_codes&quot;: true,
        &quot;admin_panel&quot;: true
    }
}</pre>
        </div>

        <div class="docs-box">
            <h3>📚 Documentação Rápida</h3>
            <p>
                <strong>Credenciais Admin:</strong> admin / admin123<br>
                <strong>Usuário Teste:</strong> usuario_teste / test123<br>
                <strong>Device ID Teste:</strong> test-device-001
            </p>
            <p style="opacity: 0.8; font-size: 14px;">
                <strong>⚠️ IMPORTANTE:</strong> Se o seed entrar em loop, use:<br>
                • <code><a href="diagnostico_seed.php" style="color: #fbbf24;">diagnostico_seed.php</a></code> - Identificar problema<br>
                • <code><a href="seed_database_safe.php" style="color: #fbbf24;">seed_database_safe.php</a></code> - Versão com proteção contra loops<br>
                • <code><a href="popular_banco.php?senha=jaguar2026" style="color: #fbbf24;">popular_banco.php</a></code> - Interface web amigável
            </p>
        </div>

        <div class="footer">
            <p>&copy; 2024 JaguarTV. Todos os direitos reservados.</p>
            <p>Server Time: 2026-07-06 06:14:29</p>
        </div>
    </div>

    <script>
        function toggleJSON() {
            var viewer = document.getElementById('jsonViewer');
            if (viewer.style.display === 'none' || viewer.style.display === '') {
                viewer.style.display = 'block';
            } else {
                viewer.style.display = 'none';
            }
        }
    </script>
</body>
</html>
