<?php
session_start();
if (isset($_SESSION['user_id'])) {
    header("Location: desktop.php");
    exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>iDONTByTE — Create Account</title>
<link rel="stylesheet" href="assets/css/style.css">
<style>
    body {
        margin: 0;
        background: #0a0a0a;
        font-family: Arial, sans-serif;
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    .signup-container {
        background: rgba(0,0,0,0.6);
        padding: 40px;
        border-radius: 10px;
        border: 1px solid #0ff;
        width: 340px;
        text-align: center;
    }
    .signup-container h2 {
        margin-bottom: 20px;
        text-shadow: 0 0 10px #0ff;
    }
    .signup-container input {
        width: 100%;
        padding: 12px;
        margin: 10px 0;
        border-radius: 6px;
        border: none;
    }
    .signup-container button {
        width: 100%;
        padding: 12px;
        background: #0ff;
        border: none;
        border-radius: 6px;
        font-weight: bold;
        cursor: pointer;
        margin-top: 10px;
    }
    .signup-container a {
        color: #0ff;
        font-size: 14px;
        display: block;
        margin-top: 12px;
    }
</style>
</head>

<body>

<div class="signup-container">
    <h2>Create Account</h2>
    <form action="api/auth.php" method="POST">
        <input type="hidden" name="action" value="signup">
        <input type="email" name="email" placeholder="Email" required autofocus>
        <input type="password" name="password" placeholder="Password" required>
        <input type="password" name="confirm" placeholder="Confirm Password" required>
        <button type="submit">Sign Up</button>
        <a href="login.php">Back to Login</a>
    </form>
</div>

</body>
</html>