<x-guest-layout>
    <div class="mb-7">
        <span class="inline-flex items-center gap-2 rounded-lg bg-emerald-50 px-3 py-1.5 text-xs font-black uppercase text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300">
            <span class="material-symbols-outlined text-base">rocket_launch</span>
            Start free
        </span>
        <h1 class="mt-4 text-3xl font-black leading-tight text-slate-950 dark:text-white" style="font-family: Manrope, Inter, sans-serif;">Create your urless account</h1>
        <p class="urless-auth-muted mt-3 text-sm font-semibold leading-6 text-slate-600 dark:text-zinc-300">Unlock custom interstitials, link analytics, campaign management, and QR-ready workflows.</p>
    </div>

    <form method="POST" action="{{ route('register') }}" class="space-y-5">
        @csrf

        <div>
            <x-input-label for="name" :value="__('Name')" />
            <div class="relative mt-2">
                <span class="material-symbols-outlined pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-xl text-slate-400">person</span>
                <x-text-input id="name" class="block w-full pl-12" type="text" name="name" :value="old('name')" required autofocus autocomplete="name" placeholder="Your name" />
            </div>
            <x-input-error :messages="$errors->get('name')" class="mt-2" />
        </div>

        <div>
            <x-input-label for="email" :value="__('Email')" />
            <div class="relative mt-2">
                <span class="material-symbols-outlined pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-xl text-slate-400">mail</span>
                <x-text-input id="email" class="block w-full pl-12" type="email" name="email" :value="old('email')" required autocomplete="username" placeholder="you@example.com" />
            </div>
            <x-input-error :messages="$errors->get('email')" class="mt-2" />
        </div>

        <div>
            <x-input-label for="password" :value="__('Password')" />

            <div x-data="{ showPassword: false }" class="relative mt-2">
                <span class="material-symbols-outlined pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-xl text-slate-400">key</span>
                <x-text-input id="password" class="block w-full pl-12 pr-14"
                                x-bind:type="showPassword ? 'text' : 'password'"
                                name="password"
                                placeholder="Create a password"
                                required autocomplete="new-password" />
                <button type="button" class="absolute right-3 top-1/2 inline-flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-lg text-slate-500 transition-colors hover:bg-slate-100 hover:text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-white" x-on:click="showPassword = ! showPassword" x-bind:aria-label="showPassword ? 'Hide password' : 'Show password'">
                    <span class="sr-only" x-text="showPassword ? 'Hide password' : 'Show password'">Show password</span>
                    <span class="material-symbols-outlined text-xl" x-text="showPassword ? 'visibility_off' : 'visibility'">visibility</span>
                </button>
            </div>

            <x-input-error :messages="$errors->get('password')" class="mt-2" />
        </div>

        <div>
            <x-input-label for="password_confirmation" :value="__('Confirm Password')" />

            <div x-data="{ showPassword: false }" class="relative mt-2">
                <span class="material-symbols-outlined pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-xl text-slate-400">verified_user</span>
                <x-text-input id="password_confirmation" class="block w-full pl-12 pr-14"
                                x-bind:type="showPassword ? 'text' : 'password'"
                                name="password_confirmation" required autocomplete="new-password" placeholder="Confirm password" />
                <button type="button" class="absolute right-3 top-1/2 inline-flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-lg text-slate-500 transition-colors hover:bg-slate-100 hover:text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-white" x-on:click="showPassword = ! showPassword" x-bind:aria-label="showPassword ? 'Hide password confirmation' : 'Show password confirmation'">
                    <span class="sr-only" x-text="showPassword ? 'Hide password confirmation' : 'Show password confirmation'">Show password confirmation</span>
                    <span class="material-symbols-outlined text-xl" x-text="showPassword ? 'visibility_off' : 'visibility'">visibility</span>
                </button>
            </div>

            <x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
        </div>

        <div class="grid grid-cols-3 gap-2 rounded-lg border border-slate-200 bg-slate-50 p-3 text-center dark:border-zinc-800 dark:bg-zinc-950">
            <div>
                <p class="text-sm font-black text-slate-950 dark:text-white">Ads</p>
                <p class="text-[11px] font-bold text-slate-500">Interstitial</p>
            </div>
            <div>
                <p class="text-sm font-black text-slate-950 dark:text-white">Geo</p>
                <p class="text-[11px] font-bold text-slate-500">Analytics</p>
            </div>
            <div>
                <p class="text-sm font-black text-slate-950 dark:text-white">QR</p>
                <p class="text-[11px] font-bold text-slate-500">Ready</p>
            </div>
        </div>

        <x-primary-button class="w-full rounded-lg bg-indigo-600 py-4 text-base shadow-lg shadow-indigo-600/20 hover:bg-indigo-700">
            {{ __('Create account') }}
        </x-primary-button>
    </form>

    <p class="urless-auth-muted mt-7 text-center text-sm font-semibold text-slate-600 dark:text-zinc-300">
        Already registered?
        <a class="font-extrabold text-indigo-600 hover:text-indigo-800 dark:text-indigo-300" href="{{ route('login') }}">
            Log in
        </a>
    </p>
</x-guest-layout>
