<body>
    <div class="container">
    <h1 id="form-heading">Login to Access</h1>
    <h4 id="welcome-heading">Welcome to AdultZone</h4>
    <form id="login-form" method="POST">
        <label for="username">Email:</label>
        <input type="text" name="username" id="username" required>
        <label for="password">Password:</label>
        <input type="password" name="password" id="password" required>
        <?php if (isset($error)) echo "<p class='error'>$error</p>"; ?>
        <?php if (isset($success)) echo "<p class='success'>$success</p>"; ?>
        <button type="submit" name="login">Login</button>
    </form>

    <div id="create-account-form" style="display: none;">
        <form method="POST" onsubmit="return validateEmail()">
            <label for="first_name">First Name:</label>
            <input type="text" name="first_name" id="first_name" required>
            <label for="last_name">Last Name:</label>
            <input type="text" name="last_name" id="last_name" required>
            <label for="email">Email:</label>
            <input type="email" name="email" id="email" required>
            <div id="email-error" class="error-message" style="display: none; color: red;"></div>
            <label for="password">Password:</label>
            <input type="password" name="password" id="password" required>
            <button type="submit" name="create_account">Create Account</button>
        </form>
    </div>

    <p class="toggle" onclick="toggleForms()">↪ Create an Account</p>
</div>