<x-layout title="Registrarse - Lauck">

    <div class="flex flex-col items-center space-y-6 w-full max-w-lg">
        <!-- Título -->
        <h1 class="text-4xl font-bold text-white text-center drop-shadow-lg" > Bicicletería<span class="text-neon-lime"> Lauck</span> </h1>

        <!-- Formulario -->
        <div class="bg-zinc-900 p-8 rounded-xl shadow-lg w-full max-w-md border-2 border-gray-500">
            <h2 class="text-2xl font-bold mb-2 text-center">Registrarse</h2>
            <p class="mb-6 text-center text-gray-500">Por favor completá el formulario para crear una cuenta.</p>

            <form action="{{ route('register.store') }}" method="post" class="space-y-5">
                @csrf
                @if ($errors->any())
                    <div>
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li class="text-red-600">{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif
                <div>
                    <label class="block text-sm font-bold text-gray-600 mb-1">Nombre completo</label>
                    <input type="text" name="name" required
                        class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
                </div>

                <div>
                    <label class="block text-sm font-bold text-gray-600 mb-1">Correo electrónico</label>
                    <input type="email" name="email" required
                        class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
                </div>

                <div>
                    <label class="block text-sm font-bold text-gray-600 mb-1">Contraseña</label>
                    <input type="password" name="password" required
                        class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
                </div>

                <div>
                    <label class="block text-sm font-bold text-gray-600 mb-1">Confirmar contraseña</label>
                    <input type="password" name="password_confirmation" required
                        class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
                </div>

                <div>
                    <input type="submit" name="submit" value="Registrarse"
                        class="w-full bg-lime-500 font-bold text-white py-2 rounded-md hover:bg-lime-600 transition-colors">
                </div>

                <p class="text-center text-sm text-gray-600">
                    ¿Ya tenés una cuenta? <a href="login" class="text-blue-600 hover:underline">Iniciá sesión acá</a>.
                </p>
            </form>
        </div>
    </div>

</x-layout>