<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Student Registration</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f9;
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .register-container {
            background: white;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
            width: 550px;
            text-align: center;
        }

        h2 {
            color: #333;
            margin-bottom: 20px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px 30px; /* Increased column gap */
            text-align: left;
        }

        label {
            font-weight: bold;
            display: block;
            margin-bottom: 5px;
        }

        input, select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            font-size: 14px;
        }

        .full-width {
            grid-column: span 2; /* Makes element take full width */
        }

        button {
            width: 100%;
            padding: 12px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 5px;
            margin-top: 20px;
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            transition: background 0.3s;
        }

        button:hover {
            background-color: #0056b3;
        }

        .login-container {
            margin-top: 20px;
            font-size: 14px;
        }

        .login-container a {
            color: #007BFF;
            font-weight: bold;
            text-decoration: none;
            transition: color 0.3s;
        }

        .login-container a:hover {
            text-decoration: underline;
            color: #0056b3;
        }
    </style>
</head>

<body>
<div class="register-container">
    <h2>Student Registration</h2>

    <form th:action="@{/register}" method="post">
        <div class="form-grid">
            <div>
                <label for="firstName">First Name:</label>
                <input type="text" id="firstName" name="firstName" required>
            </div>

            <div>
                <label for="lastName">Last Name:</label>
                <input type="text" id="lastName" name="lastName" required>
            </div>

            <div>
                <label for="email">Email:</label>
                <input type="email" id="email" name="email" required>
            </div>

            <div>
                <label for="password">Password:</label>
                <input type="password" id="password" name="password" required>
            </div>

            <div>
                <label for="phoneNumber">Phone Number:</label>
                <input type="text" id="phoneNumber" name="phoneNumber" required>
            </div>

            <div>
                <label for="facultyName">Faculty Name:</label>
                <input type="text" id="facultyName" name="facultyName" required>
            </div>

            <div>
                <label for="yearOfStudies">Year of Studies:</label>
                <input type="number" id="yearOfStudies" name="yearOfStudies" required>
            </div>

            <div>
                <label for="gender">Gender:</label>
                <select id="gender" name="gender" required>
                    <option value="Male">Male</option>
                    <option value="Female">Female</option>
                </select>
            </div>

            <div class="full-width">
                <button type="submit">Register</button>
            </div>
        </div>
    </form>

    <div class="login-container">
        <p>Already have an account? <a th:href="@{/}">Log in here</a></p>
    </div>
</div>
</body>
</html>
