<x-guest-layout>
    @if ($errors->any())
        <div class="alert alert-error">
            Lütfen formu kontrol edin ve hataları düzeltin.
        </div>
    @endif

    <form method="POST" action="{{ route('register') }}">
        @csrf

        <!-- Name -->
        <div class="input-group">
            <label for="name">👤 Ad Soyad</label>
            <input id="name" type="text" name="name"
                   value="{{ old('name') }}" required autofocus autocomplete="name"
                   placeholder="Adınız Soyadınız">
            @error('name')
                <p class="text-error">{{ $message }}</p>
            @enderror
        </div>

        <!-- Email -->
        <div class="input-group">
            <label for="email">📧 E-posta Adresi</label>
            <input id="email" type="email" name="email"
                   value="{{ old('email') }}" required autocomplete="username"
                   placeholder="ornek@email.com">
            @error('email')
                <p class="text-error">{{ $message }}</p>
            @enderror
        </div>

        <!-- Password -->
        <div class="input-group">
            <label for="password">🔒 Şifre</label>
            <input id="password" type="password" name="password"
                   required autocomplete="new-password"
                   placeholder="En az 8 karakter">
            @error('password')
                <p class="text-error">{{ $message }}</p>
            @enderror
        </div>

        <!-- Confirm Password -->
        <div class="input-group">
            <label for="password_confirmation">🔒 Şifre Tekrar</label>
            <input id="password_confirmation" type="password" name="password_confirmation"
                   required autocomplete="new-password"
                   placeholder="Şifrenizi tekrar girin">
        </div>

        <!-- Terms -->
        <div class="checkbox-group">
            <input type="checkbox" name="terms" id="terms" required>
            <label for="terms">
                <a href="#">Kullanım koşullarını</a> kabul ediyorum
            </label>
        </div>

        <!-- Submit -->
        <button type="submit" class="btn-primary">
            🚀 Kayıt Ol
        </button>

        <!-- Login Link -->
        <div class="auth-switch">
            Zaten hesabınız var mı?<a href="{{ route('login') }}">Giriş Yap →</a>
        </div>
    </form>
</x-guest-layout>
