T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/gocodeme.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/gocodeme.com/public_html/index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>GoCodeMe.com - The World's Most Advanced AI Coding Platform</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
            color: #ffffff;
            overflow-x: hidden;
        }

        /* Custom Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #1a1a2e;
        }

        ::-webkit-scrollbar-thumb {
            background: #4f46e5;
            border-radius: 4px;
        }

        /* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Header */
        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background: rgba(15, 15, 35, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .nav {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, #4f46e5, #06b6d4, #3b82f6);
            background-size: 200% 200%;
            animation: gradient 3s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            align-items: center;
        }

        .nav-link {
            color: #e2e8f0;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
            position: relative;
        }

        .nav-link:hover {
            color: #4f46e5;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(135deg, #4f46e5, #06b6d4);
            transition: width 0.3s ease;
        }

        .nav-link:hover::after {
            width: 100%;
        }

        .auth-buttons {
            display: flex;
            gap: 1rem;
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
        }

        .btn-outline {
            background: transparent;
            color: #4f46e5;
            border: 2px solid #4f46e5;
        }

        .btn-outline:hover {
            background: #4f46e5;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
        }

        .btn-primary {
            background: linear-gradient(135deg, #4f46e5, #06b6d4);
            color: white;
            border: none;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
        }

        /* Hero Section */
        .hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(79,70,229,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
            opacity: 0.3;
        }

        .hero-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            text-align: center;
            position: relative;
            z-index: 2;
        }

        .hero-badge {
            display: inline-block;
            background: rgba(79, 70, 229, 0.1);
            color: #4f46e5;
            padding: 0.5rem 1rem;
            border-radius: 50px;
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 2rem;
            border: 1px solid rgba(79, 70, 229, 0.2);
            animation: pulse 2s infinite;
        }

        .hero-title {
            font-size: clamp(3rem, 8vw, 5rem);
            font-weight: 900;
            line-height: 1.1;
            margin-bottom: 1.5rem;
            background: linear-gradient(135deg, #ffffff, #e2e8f0);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: fadeInUp 1s ease;
        }

        .hero-subtitle {
            font-size: clamp(1.2rem, 3vw, 1.5rem);
            color: #94a3b8;
            margin-bottom: 3rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.6;
            animation: fadeInUp 1s ease 0.2s both;
        }

        .hero-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
            animation: fadeInUp 1s ease 0.4s both;
        }

        .btn-hero {
            padding: 1rem 2rem;
            font-size: 1.1rem;
            border-radius: 12px;
        }

        /* Features Section */
        .features {
            padding: 8rem 2rem;
            background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .section-title {
            text-align: center;
            font-size: clamp(2.5rem, 5vw, 3.5rem);
            font-weight: 800;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #ffffff, #e2e8f0);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .section-subtitle {
            text-align: center;
            font-size: 1.2rem;
            color: #94a3b8;
            margin-bottom: 4rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 2rem;
            margin-top: 4rem;
        }

        .feature-card {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 2rem;
            transition: all 0.3s ease;
            backdrop-filter: blur(20px);
        }

        .feature-card:hover {
            transform: translateY(-10px);
            border-color: rgba(79, 70, 229, 0.3);
            box-shadow: 0 20px 40px rgba(79, 70, 229, 0.1);
        }

        .feature-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #4f46e5, #06b6d4);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .feature-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: #ffffff;
        }

        .feature-description {
            color: #94a3b8;
            line-height: 1.6;
        }

        /* Pricing Section */
        .pricing {
            padding: 8rem 2rem;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        }

        .pricing-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 4rem;
        }

        .pricing-card {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 2rem;
            text-align: center;
            transition: all 0.3s ease;
            backdrop-filter: blur(20px);
            position: relative;
            overflow: hidden;
        }

        .pricing-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(135deg, #4f46e5, #06b6d4);
        }

        .pricing-card.featured {
            border-color: rgba(79, 70, 229, 0.5);
            transform: scale(1.05);
        }

        .pricing-card:hover {
            transform: translateY(-10px);
            border-color: rgba(79, 70, 229, 0.3);
        }

        .pricing-card.featured:hover {
            transform: scale(1.05) translateY(-10px);
        }

        .plan-name {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: #ffffff;
        }

        .plan-price {
            font-size: 3rem;
            font-weight: 900;
            color: #4f46e5;
            margin-bottom: 1rem;
        }

        .plan-price .currency {
            font-size: 1.5rem;
            vertical-align: top;
        }

        .plan-features {
            list-style: none;
            margin: 2rem 0;
        }

        .plan-features li {
            padding: 0.5rem 0;
            color: #94a3b8;
            position: relative;
            padding-left: 1.5rem;
        }

        .plan-features li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #4f46e5;
            font-weight: bold;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 2000;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 2rem;
            width: 90%;
            max-width: 400px;
            backdrop-filter: blur(20px);
            animation: fadeInUp 0.3s ease;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #ffffff;
        }

        .close-btn {
            background: none;
            border: none;
            color: #94a3b8;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 4px;
            transition: color 0.3s ease;
        }

        .close-btn:hover {
            color: #ffffff;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            margin-bottom: 0.5rem;
            color: #e2e8f0;
            font-weight: 500;
        }

        .form-input {
            width: 100%;
            padding: 0.75rem 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            color: #ffffff;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .form-input::placeholder {
            color: #64748b;
        }

        .btn-full {
            width: 100%;
            padding: 1rem;
            font-size: 1rem;
            margin-top: 1rem;
        }

        .form-footer {
            text-align: center;
            margin-top: 1.5rem;
            color: #94a3b8;
        }

        .form-footer a {
            color: #4f46e5;
            text-decoration: none;
            font-weight: 500;
        }

        .form-footer a:hover {
            text-decoration: underline;
        }

        /* Footer */
        .footer {
            background: #0f0f23;
            padding: 4rem 2rem 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
        }

        .footer-section h3 {
            color: #ffffff;
            margin-bottom: 1rem;
            font-weight: 600;
        }

        .footer-section p,
        .footer-section a {
            color: #94a3b8;
            text-decoration: none;
            line-height: 1.6;
        }

        .footer-section a:hover {
            color: #4f46e5;
        }

        .footer-bottom {
            text-align: center;
            margin-top: 3rem;
            padding-top: 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #64748b;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }

            .hero-buttons {
                flex-direction: column;
                align-items: center;
            }

            .features-grid {
                grid-template-columns: 1fr;
            }

            .pricing-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Loading Animation */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #4f46e5;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Success/Error Messages */
        .message {
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 1rem;
            font-weight: 500;
        }

        .message.success {
            background: rgba(34, 197, 94, 0.1);
            color: #22c55e;
            border: 1px solid rgba(34, 197, 94, 0.2);
        }

        .message.error {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.2);
        }
    </style>
</head>
<body>
    <!-- Header -->
    <header class="header">
        <nav class="nav">
            <div class="logo">🤖 GoCodeMe.com</div>
            <div class="nav-links">
                <a href="#features" class="nav-link">Features</a>
                <a href="#pricing" class="nav-link">Pricing</a>
                <a href="#about" class="nav-link">About</a>
                <div class="auth-buttons">
                    <button class="btn btn-outline" onclick="openModal('login')">Login</button>
                    <button class="btn btn-primary" onclick="openModal('signup')">Get Started</button>
                </div>
            </div>
        </nav>
    </header>

    <!-- Hero Section -->
    <section class="hero">
        <div class="hero-content">
            <div class="hero-badge">🚀 The Future of AI-Powered Coding</div>
            <h1 class="hero-title">Code Like a Genius</h1>
            <p class="hero-subtitle">
                Experience the world's most advanced AI coding platform. Build, debug, and deploy faster than ever with Claude-powered assistance.
            </p>
            <div class="hero-buttons">
                <button class="btn btn-primary btn-hero" onclick="openModal('signup')">Start Coding Now</button>
                <button class="btn btn-outline btn-hero" onclick="openModal('login')">Login</button>
            </div>
        </div>
    </section>

    <!-- Features Section -->
    <section class="features" id="features">
        <div class="container">
            <h2 class="section-title">Why Choose GoCodeMe?</h2>
            <p class="section-subtitle">
                Built by the world's best developers, for the world's best developers
            </p>
            <div class="features-grid">
                <div class="feature-card">
                    <div class="feature-icon">🤖</div>
                    <h3 class="feature-title">Claude AI Integration</h3>
                    <p class="feature-description">
                        Powered by Anthropic's Claude, the most advanced AI coding assistant. Get intelligent code suggestions, debugging help, and automated solutions.
                    </p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">⚡</div>
                    <h3 class="feature-title">Lightning Fast</h3>
                    <p class="feature-description">
                        Built on cutting-edge technology with instant response times. Code, compile, and deploy in real-time with zero latency.
                    </p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">🔒</div>
                    <h3 class="feature-title">Enterprise Security</h3>
                    <p class="feature-description">
                        Bank-level security with end-to-end encryption, secure authentication, and compliance with industry standards.
                    </p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">🌐</div>
                    <h3 class="feature-title">Cloud-Native</h3>
                    <p class="feature-description">
                        Access your projects from anywhere. Full cloud integration with automatic backups and seamless collaboration.
                    </p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">🎯</div>
                    <h3 class="feature-title">Smart Debugging</h3>
                    <p class="feature-description">
                        AI-powered error detection and resolution. Get instant fixes and optimization suggestions for your code.
                    </p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">🚀</div>
                    <h3 class="feature-title">One-Click Deploy</h3>
                    <p class="feature-description">
                        Deploy your applications with a single click. Support for all major platforms and cloud providers.
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Pricing Section -->
    <section class="pricing" id="pricing">
        <div class="container">
            <h2 class="section-title">Choose Your Plan</h2>
            <p class="section-subtitle">
                Start free and scale as you grow. No hidden fees, cancel anytime.
            </p>
            <div class="pricing-grid">
                <div class="pricing-card">
                    <h3 class="plan-name">Free</h3>
                    <div class="plan-price">
                        <span class="currency">$</span>0
                    </div>
                    <ul class="plan-features">
                        <li>5 AI requests per day</li>
                        <li>Basic code editor</li>
                        <li>Community support</li>
                        <li>1 project</li>
                    </ul>
                    <button class="btn btn-outline btn-full" onclick="openModal('signup')">Get Started</button>
                </div>
                <div class="pricing-card featured">
                    <h3 class="plan-name">Pro</h3>
                    <div class="plan-price">
                        <span class="currency">$</span>29
                    </div>
                    <ul class="plan-features">
                        <li>Unlimited AI requests</li>
                        <li>Advanced code editor</li>
                        <li>Priority support</li>
                        <li>Unlimited projects</li>
                        <li>Team collaboration</li>
                        <li>Custom integrations</li>
                    </ul>
                    <button class="btn btn-primary btn-full" onclick="openModal('signup')">Start Pro Trial</button>
                </div>
                <div class="pricing-card">
                    <h3 class="plan-name">Enterprise</h3>
                    <div class="plan-price">
                        <span class="currency">$</span>99
                    </div>
                    <ul class="plan-features">
                        <li>Everything in Pro</li>
                        <li>Dedicated support</li>
                        <li>Custom AI training</li>
                        <li>Advanced analytics</li>
                        <li>White-label solution</li>
                        <li>SLA guarantee</li>
                    </ul>
                    <button class="btn btn-outline btn-full" onclick="openModal('signup')">Contact Sales</button>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="footer">
        <div class="footer-content">
            <div class="footer-section">
                <h3>GoCodeMe.com</h3>
                <p>The world's most advanced AI-powered coding platform. Built by developers, for developers.</p>
            </div>
            <div class="footer-section">
                <h3>Product</h3>
                <a href="#features">Features</a><br>
                <a href="#pricing">Pricing</a><br>
                <a href="/editor">Try Editor</a><br>
                <a href="/docs">Documentation</a>
            </div>
            <div class="footer-section">
                <h3>Company</h3>
                <a href="/about">About</a><br>
                <a href="/blog">Blog</a><br>
                <a href="/careers">Careers</a><br>
                <a href="/contact">Contact</a>
            </div>
            <div class="footer-section">
                <h3>Support</h3>
                <a href="/help">Help Center</a><br>
                <a href="/community">Community</a><br>
                <a href="/status">Status</a><br>
                <a href="/security">Security</a>
            </div>
        </div>
        <div class="footer-bottom">
            <p>&copy; 2024 GoCodeMe.com. All rights reserved. Built with ❤️ by the world's best developers.</p>
        </div>
    </footer>

    <!-- Login Modal -->
    <div id="loginModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title">Welcome Back</h3>
                <button class="close-btn" onclick="closeModal('login')">&times;</button>
            </div>
            <form id="loginForm" onsubmit="handleLogin(event)">
                <div id="loginMessage"></div>
                <div class="form-group">
                    <label class="form-label">Email</label>
                    <input type="email" class="form-input" name="email" required placeholder="your@email.com">
                </div>
                <div class="form-group">
                    <label class="form-label">Password</label>
                    <input type="password" class="form-input" name="password" required placeholder="Enter your password">
                </div>
                <button type="submit" class="btn btn-primary btn-full">
                    <span id="loginBtnText">Login</span>
                    <span id="loginBtnLoading" class="loading" style="display: none;"></span>
                </button>
            </form>
            <div class="form-footer">
                Don't have an account? <a href="#" onclick="switchModal('login', 'signup')">Sign up</a>
            </div>
        </div>
    </div>

    <!-- Signup Modal -->
    <div id="signupModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title">Join GoCodeMe</h3>
                <button class="close-btn" onclick="closeModal('signup')">&times;</button>
            </div>
            <form id="signupForm" onsubmit="handleSignup(event)">
                <div id="signupMessage"></div>
                <div class="form-group">
                    <label class="form-label">Full Name</label>
                    <input type="text" class="form-input" name="name" required placeholder="Your full name">
                </div>
                <div class="form-group">
                    <label class="form-label">Email</label>
                    <input type="email" class="form-input" name="email" required placeholder="your@email.com">
                </div>
                <div class="form-group">
                    <label class="form-label">Password</label>
                    <input type="password" class="form-input" name="password" required placeholder="Create a strong password">
                </div>
                <div class="form-group">
                    <label class="form-label">Plan</label>
                    <select class="form-input" name="plan">
                        <option value="FREE">Free</option>
                        <option value="PRO">Pro ($29/month)</option>
                        <option value="ENTERPRISE">Enterprise ($99/month)</option>
                    </select>
                </div>
                <button type="submit" class="btn btn-primary btn-full">
                    <span id="signupBtnText">Create Account</span>
                    <span id="signupBtnLoading" class="loading" style="display: none;"></span>
                </button>
            </form>
            <div class="form-footer">
                Already have an account? <a href="#" onclick="switchModal('signup', 'login')">Login</a>
            </div>
        </div>
    </div>

    <script>
        // Authentication state
        let currentUser = null;

        // Check if user is already logged in
        function checkAuth() {
            const token = localStorage.getItem('token');
            const user = JSON.parse(localStorage.getItem('user') || 'null');
            
            if (token && user) {
                currentUser = user;
                updateAuthUI();
            }
        }

        // Update UI based on authentication
        function updateAuthUI() {
            const authButtons = document.querySelector('.auth-buttons');
            if (currentUser) {
                authButtons.innerHTML = `
                    <span style="color: #94a3b8; margin-right: 1rem;">Welcome, ${currentUser.name || currentUser.email}</span>
                    <button class="btn btn-outline" onclick="logout()">Logout</button>
                    <button class="btn btn-primary" onclick="goToEditor()">Open Editor</button>
                `;
            } else {
                authButtons.innerHTML = `
                    <button class="btn btn-outline" onclick="openModal('login')">Login</button>
                    <button class="btn btn-primary" onclick="openModal('signup')">Get Started</button>
                `;
            }
        }

        // Modal functions
        function openModal(type) {
            document.getElementById(type + 'Modal').style.display = 'block';
            document.body.style.overflow = 'hidden';
        }

        function closeModal(type) {
            document.getElementById(type + 'Modal').style.display = 'none';
            document.body.style.overflow = 'auto';
            clearMessages();
        }

        function switchModal(from, to) {
            closeModal(from);
            openModal(to);
        }

        function clearMessages() {
            document.getElementById('loginMessage').innerHTML = '';
            document.getElementById('signupMessage').innerHTML = '';
        }

        // Login handler
        async function handleLogin(event) {
            event.preventDefault();
            
            const form = event.target;
            const email = form.email.value;
            const password = form.password.value;

            // Show loading
            const btnText = document.getElementById('loginBtnText');
            const btnLoading = document.getElementById('loginBtnLoading');
            btnText.style.display = 'none';
            btnLoading.style.display = 'inline-block';

            try {
                const response = await fetch('/api/auth/login', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                        'Accept': 'application/json'
                    },
                    body: JSON.stringify({ email, password })
                });

                if (!response.ok) {
                    throw new Error(`HTTP error! status: ${response.status}`);
                }

                const result = await response.json();

                if (result.success) {
                    localStorage.setItem('token', result.token);
                    localStorage.setItem('user', JSON.stringify(result.user));
                    currentUser = result.user;
                    
                    showMessage('login', 'success', 'Login successful! Redirecting...');
                    setTimeout(() => {
                        closeModal('login');
                        updateAuthUI();
                        goToEditor();
                    }, 1000);
                } else {
                    showMessage('login', 'error', result.error || 'Login failed');
                }
            } catch (error) {
                console.error('Login error:', error);
                showMessage('login', 'error', `Error: ${error.message}`);
            } finally {
                btnText.style.display = 'inline';
                btnLoading.style.display = 'none';
            }
        }

        // Signup handler
        async function handleSignup(event) {
            event.preventDefault();
            
            const form = event.target;
            const name = form.name.value;
            const email = form.email.value;
            const password = form.password.value;
            const plan = form.plan.value;

            // Show loading
            const btnText = document.getElementById('signupBtnText');
            const btnLoading = document.getElementById('signupBtnLoading');
            btnText.style.display = 'none';
            btnLoading.style.display = 'inline-block';

            try {
                const response = await fetch('/api/auth/register', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                        'Accept': 'application/json'
                    },
                    body: JSON.stringify({ name, email, password, plan })
                });

                if (!response.ok) {
                    throw new Error(`HTTP error! status: ${response.status}`);
                }

                const result = await response.json();

                if (result.success) {
                    localStorage.setItem('token', result.token);
                    localStorage.setItem('user', JSON.stringify(result.user));
                    currentUser = result.user;
                    
                    showMessage('signup', 'success', 'Account created successfully! Welcome to GoCodeMe!');
                    setTimeout(() => {
                        closeModal('signup');
                        updateAuthUI();
                        goToEditor();
                    }, 1500);
                } else {
                    showMessage('signup', 'error', result.error || 'Registration failed');
                }
            } catch (error) {
                console.error('Signup error:', error);
                showMessage('signup', 'error', `Error: ${error.message}`);
            } finally {
                btnText.style.display = 'inline';
                btnLoading.style.display = 'none';
            }
        }

        // Show message
        function showMessage(modal, type, message) {
            const messageDiv = document.getElementById(modal + 'Message');
            messageDiv.innerHTML = `<div class="message ${type}">${message}</div>`;
        }

        // Logout
        function logout() {
            localStorage.removeItem('token');
            localStorage.removeItem('user');
            currentUser = null;
            updateAuthUI();
            window.location.href = '/';
        }

        // Go to editor
        function goToEditor() {
            window.location.href = '/editor';
        }

        // Close modal when clicking outside
        window.onclick = function(event) {
            if (event.target.classList.contains('modal')) {
                event.target.style.display = 'none';
                document.body.style.overflow = 'auto';
                clearMessages();
            }
        }

        // Smooth scrolling for anchor links
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    target.scrollIntoView({
                        behavior: 'smooth',
                        block: 'start'
                    });
                }
            });
        });

        // Initialize
        checkAuth();
        updateAuthUI();

        // Header scroll effect
        window.addEventListener('scroll', function() {
            const header = document.querySelector('.header');
            if (window.scrollY > 100) {
                header.style.background = 'rgba(15, 15, 35, 0.98)';
            } else {
                header.style.background = 'rgba(15, 15, 35, 0.95)';
            }
        });
    </script>
</body>
</html>

CasperSecurity Mini