<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Domain Configuration Required</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: white;
        }
        
        .container {
            text-align: center;
            max-width: 600px;
            padding: 40px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }
        
        .icon {
            font-size: 4rem;
            margin-bottom: 20px;
        }
        
        h1 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            font-weight: 300;
        }
        
        p {
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 15px;
            opacity: 0.9;
        }
        
        .domain {
            background: rgba(255, 255, 255, 0.2);
            padding: 10px 20px;
            border-radius: 10px;
            font-family: 'Courier New', monospace;
            font-weight: bold;
            margin: 20px 0;
            display: inline-block;
        }
        
        .steps {
            text-align: left;
            margin: 30px 0;
            background: rgba(0, 0, 0, 0.2);
            padding: 20px;
            border-radius: 10px;
        }
        
        .steps ol {
            padding-left: 20px;
        }
        
        .steps li {
            margin: 10px 0;
        }
        
        .footer {
            margin-top: 30px;
            font-size: 0.9rem;
            opacity: 0.7;
        }
        
        @media (max-width: 768px) {
            .container {
                margin: 20px;
                padding: 30px 20px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .icon {
                font-size: 3rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="icon">🌐</div>
        <h1>Domain Configuration Required</h1>
        
        <p>This domain is pointing to our server but hasn't been configured yet.</p>
        
        <div class="domain" id="currentDomain">
            Loading domain...
        </div>
        
        <div class="steps">
            <h3>🔧 To configure this domain:</h3>
            <ol>
                <li>Add the domain to your nginx configuration</li>
                <li>Create the appropriate server block</li>
                <li>Set up SSL certificates if needed</li>
                <li>Upload your website content</li>
                <li>Test the configuration and reload nginx</li>
            </ol>
        </div>
        
        <p>If you're the server administrator, check your nginx configuration files in <strong>/etc/nginx/sites-available/</strong></p>
        
        <div class="footer">
            <p>This is a default page served by nginx for unconfigured domains.</p>
            <p>Server IP: <span id="serverInfo">Checking...</span></p>
        </div>
    </div>

    <script>
        // Display current domain
        document.getElementById('currentDomain').textContent = window.location.hostname;
        
        // Get server info
        fetch('/server-info', {method: 'GET'})
            .then(response => response.text())
            .then(data => {
                document.getElementById('serverInfo').textContent = data;
            })
            .catch(() => {
                document.getElementById('serverInfo').textContent = 'Information not available';
            });
    </script>
</body>
</html>
