<x-app-layout>
    <div class="px-8 py-12 lg:px-16 min-h-screen">
        <div class="max-w-7xl mx-auto space-y-16">
            <!-- Elite Search Hero (Dark Edition) -->
            <div class="relative bg-white/5 border border-white/5 rounded-[64px] p-8 md:p-24 overflow-hidden shadow-[0_40px_100px_-20px_rgba(0,0,0,0.6)] group">
                <!-- Advanced Background Visuals -->
                <div class="absolute inset-0 opacity-40 pointer-events-none">
                    <div class="absolute top-[-20%] left-[-10%] w-[600px] h-[600px] bg-indigo-600/20 rounded-full blur-[140px] animate-pulse"></div>
                    <div class="absolute bottom-[-20%] right-[-10%] w-[600px] h-[600px] bg-primary-600/10 rounded-full blur-[140px]"></div>
                </div>

                <div class="relative z-10 space-y-16">
                    <div class="text-center space-y-6 max-w-3xl mx-auto">
                        <div class="inline-flex items-center gap-3 px-6 py-2 bg-white/5 border border-white/10 rounded-full backdrop-blur-md mb-4 transform hover:scale-105 transition-transform duration-500 cursor-default">
                            <span class="w-1.5 h-1.5 bg-indigo-500 rounded-full animate-ping"></span>
                            <span class="text-[9px] font-black uppercase tracking-[0.4em] text-slate-400 italic">Mesin Intelijen Data v4.0</span>
                        </div>
                        <h1 class="text-3xl md:text-8xl font-display font-black text-white tracking-tighter leading-[0.9] italic uppercase transform transition-all duration-700 group-hover:tracking-tight">
                            Pencarian <span class="text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-indigo-600">Nasional</span>
                        </h1>
                        <p class="text-slate-500 text-[11px] font-black uppercase tracking-[0.5em] italic">Akses Terenkripsi ke Database Aset Terpadu Indonesia</p>
                    </div>

                    <!-- Elite Search Input -->
                    <div class="max-w-3xl mx-auto">
                        <form action="{{ route('member.search.index') }}" method="GET" class="relative group">
                            <div class="absolute inset-y-0 left-0 pl-10 flex items-center pointer-events-none text-slate-500 group-focus-within:text-indigo-400 transition-colors duration-500">
                                <svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
                            </div>
                            <input type="text" name="search" placeholder="Cari Nopol..." 
                                class="w-full h-20 md:h-28 bg-white/5 border-2 border-white/10 backdrop-blur-3xl rounded-[40px] pl-20 pr-12 text-xl md:text-2xl font-black text-white placeholder:text-slate-800 focus:bg-white/10 focus:border-indigo-500/50 focus:ring-4 focus:ring-indigo-500/10 transition-all duration-700 shadow-2xl">
                            <button type="submit" class="absolute right-4 top-4 bottom-4 px-6 md:px-12 bg-white text-slate-950 rounded-[32px] font-black uppercase tracking-widest text-[11px] hover:bg-indigo-600 hover:text-white transition-all transform hover:scale-105 active:scale-95 shadow-xl italic">
                                Analisis Data →
                            </button>
                        </form>
                        
                        <div class="mt-10 flex flex-wrap justify-center gap-6 opacity-40 hover:opacity-100 transition-opacity duration-700 italic">
                            @foreach(['Plat Nomor', 'Nomor Rangka', 'Nomor Mesin'] as $tag)
                                <div class="flex items-center gap-3 px-5 py-2 border border-white/10 rounded-full text-[9px] font-black uppercase tracking-widest text-slate-400">
                                    <div class="w-1.5 h-1.5 bg-indigo-500/50 rounded-full"></div>
                                    {{ $tag }}
                                </div>
                            @endforeach
                        </div>
                    </div>
                </div>
            </div>

            <!-- Dashboard Insights Grid -->
            <div class="grid lg:grid-cols-12 gap-12">
                <!-- Premium Status Column -->
                <div class="lg:col-span-4 space-y-10">
                    <div class="space-y-2 border-l-4 border-white/20 pl-6">
                        <h3 class="text-3xl font-display font-black text-white uppercase italic tracking-tighter">Status Akun</h3>
                        <p class="text-[10px] font-black text-slate-500 uppercase tracking-widest italic leading-none">Matriks Keamanan & Berlangganan</p>
                    </div>

                    <div class="bg-white/5 rounded-[48px] p-8 md:p-12 border border-white/5 shadow-2xl space-y-12 relative overflow-hidden group transition-all duration-700">
                        <div class="flex items-center justify-between relative z-10">
                            <div class="w-16 h-16 bg-white/5 rounded-3xl flex items-center justify-center text-slate-500 group-hover:bg-indigo-500 group-hover:text-white transition-all duration-500 shadow-xl">
                                <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path></svg>
                            </div>
                            <div class="px-5 py-2 bg-white/5 rounded-full text-[9px] font-black uppercase tracking-widest text-slate-500 italic border border-white/5">V2.5 Encrypted</div>
                        </div>

                        @if($subscription)
                            <div class="space-y-6 relative z-10">
                                <div class="space-y-2">
                                    <p class="text-[10px] font-black text-indigo-400 uppercase tracking-widest italic leading-none">Penyandian Aktif</p>
                                    <h4 class="text-3xl md:text-5xl font-display font-black text-white tracking-tighter italic uppercase leading-none">{{ $subscription->plan->name }}</h4>
                                </div>
                                <div class="p-6 bg-emerald-500/10 rounded-[28px] border border-emerald-500/20 flex items-center gap-4 group-hover:bg-emerald-600 transition-all duration-500">
                                    <div class="w-3 h-3 bg-emerald-500 rounded-full animate-pulse group-hover:bg-white"></div>
                                    <span class="text-[10px] font-black uppercase tracking-widest italic text-emerald-400 group-hover:text-white">Akses Terbuka s/d {{ $subscription->end_date->format('d M Y') }}</span>
                                </div>
                            </div>
                        @else
                            <div class="space-y-8 relative z-10">
                                <h4 class="text-4xl font-display font-black text-slate-700 tracking-tighter italic uppercase leading-none">Layanan<br>Terbatas</h4>
                                <a href="{{ route('member.plans.index') }}" class="flex items-center justify-between w-full h-20 px-8 bg-white text-slate-950 rounded-[28px] text-[11px] font-black uppercase tracking-widest italic hover:bg-indigo-600 hover:text-white transition-all transform hover:scale-[1.02] active:scale-95 shadow-2xl">
                                    <span>Aktifkan Akses Penuh</span>
                                    <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M14 5l7 7m0 0l-7 7m7-7H3"></path></svg>
                                </a>
                            </div>
                        @endif

                        <!-- Watermark -->
                        <div class="absolute -right-8 -bottom-8 opacity-[0.02] pointer-events-none group-hover:scale-125 transition-transform duration-1000">
                            <svg class="w-56 h-56" fill="currentColor" viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"></path></svg>
                        </div>
                    </div>
                </div>

                <!-- Strategic Guidelines -->
                <div class="lg:col-span-8 space-y-10">
                    <div class="space-y-2 border-l-4 border-white/20 pl-6">
                        <h3 class="text-3xl font-display font-black text-white uppercase italic tracking-tighter">Pusat Informasi</h3>
                        <p class="text-[10px] font-black text-slate-500 uppercase tracking-widest italic leading-none">Panduan Operasional Pencarian</p>
                    </div>

                    <div class="grid md:grid-cols-2 gap-8">
                        @foreach([
                            ['title' => 'Input Plat Nomor', 'desc' => 'Gunakan standar format nasional (cth: B 1234 ABC). Mesin kami mendukung normalisasi otomatis.', 'color' => 'indigo'],
                            ['title' => 'Serial Engine Analisis', 'desc' => 'Gunakan 5-8 digit terakhir nomor rangka atau mesin untuk scanning tingkat lanjut.', 'color' => 'slate']
                        ] as $tip)
                        <div class="bg-white/5 rounded-[40px] p-10 border border-white/5 shadow-2xl relative overflow-hidden group hover:border-indigo-500/20 transition-all duration-700">
                            <div class="w-12 h-1 bg-indigo-600 rounded-full mb-8 group-hover:w-24 transition-all duration-700 shadow-[0_0_10px_rgba(79,70,229,0.5)]"></div>
                            <h4 class="text-xl font-display font-black text-white uppercase italic tracking-tight mb-4">{{ $tip['title'] }}</h4>
                            <p class="text-slate-500 text-[13px] font-medium leading-relaxed italic">{{ $tip['desc'] }}</p>
                        </div>
                        @endforeach
                    </div>

                    <!-- Elite Premium Support -->
                    <div class="relative bg-white/5 rounded-[48px] p-12 border border-white/5 overflow-hidden flex flex-col md:flex-row justify-between items-center gap-10 group hover:bg-white/10 transition-all duration-700 shadow-2xl">
                        <div class="absolute inset-0 bg-gradient-to-r from-indigo-500/0 to-indigo-500/5 opacity-0 group-hover:opacity-100 transition-opacity duration-700"></div>
                        
                        <div class="relative z-10 space-y-4 text-center md:text-left">
                            <h4 class="text-3xl font-display font-black italic uppercase text-white tracking-tighter leading-none">Verifikasi Data?</h4>
                            <p class="text-[10px] font-black text-slate-500 uppercase tracking-[0.3em] italic">Butuh bantuan validasi data eksklusif? Layanan Expert kami siaga.</p>
                        </div>
                        
                        <a href="https://wa.me/XXXXXXXXXX" target="_blank" 
                            class="relative z-10 px-12 h-20 bg-white text-slate-950 rounded-[28px] text-[11px] font-black uppercase tracking-widest italic flex items-center gap-4 hover:bg-indigo-600 hover:text-white transition-all shadow-2xl active:scale-95">
                            <span>Hubungi Pusat Bantuan</span>
                            <div class="w-6 h-6 bg-slate-900/20 rounded-full flex items-center justify-center">
                                <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M14 5l7 7m0 0l-7 7m7-7H3"></path></svg>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</x-app-layout>
