<!DOCTYPE html>
<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    {{-- ── Primary SEO ── --}}
    <title>{{ View::hasSection('title') ? $__env->yieldContent('title').' — TrollMasters.AI' : "TrollMasters.AI — The Internet's Most Vicious Troll Service" }}</title>
    <meta name="description"  content="@yield('meta_description', 'TrollMasters.AI — The #1 internet troll service. Spoof socials, employment exposure, honeytrap operations, meme campaigns & more. 100% anonymous. Order online.')">
    <meta name="keywords"     content="@yield('meta_keywords', 'internet troll service, hire a troll, online harassment service, troll for hire, revenge service, troll masters, spoof social media')">
    <meta name="robots"       content="@yield('meta_robots', 'index, follow')">
    <link rel="canonical"     href="{{ url()->current() }}">

    {{-- ── Open Graph ── --}}
    <meta property="og:type"        content="website">
    <meta property="og:url"         content="{{ url()->current() }}">
    <meta property="og:site_name"   content="TrollMasters.AI">
    <meta property="og:title"       content="@yield('og_title', 'TrollMasters.AI — The Internet\'s Most Vicious Troll Service')">
    <meta property="og:description" content="@yield('og_description', 'Bad karma working too slow? We fix that. The world\'s most relentless internet troll service. 100% anonymous. Crypto payments.')">
    <meta property="og:image"       content="@yield('og_image', asset('images/og-default.jpg'))">
    <meta property="og:locale"      content="en_US">

    {{-- ── Twitter Card ── --}}
    <meta name="twitter:card"        content="summary_large_image">
    <meta name="twitter:title"       content="@yield('og_title', 'TrollMasters.AI — The Internet\'s Most Vicious Troll Service')">
    <meta name="twitter:description" content="@yield('og_description', 'Bad karma working too slow? We fix that.')">
    <meta name="twitter:image"       content="@yield('og_image', asset('images/og-default.jpg'))">

    {{-- ── Schema.org JSON-LD ── --}}
    @php
    $__orgSchema = json_encode([
        '@context'     => 'https://schema.org',
        '@type'        => 'Organization',
        'name'         => 'TrollMasters.AI',
        'url'          => url('/'),
        'description'  => "The world's most vicious internet troll service — spoof socials, employment exposure, honeytrap operations, meme campaigns.",
        'logo'         => asset('images/logo.png'),
        'contactPoint' => ['@type'=>'ContactPoint','contactType'=>'customer service','url'=>route('contact.index')],
        'sameAs'       => [],
    ], JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
    @endphp
    <script type="application/ld+json">{!! $__orgSchema !!}</script>
    @stack('schema')

    {{-- ── Fonts ── --}}
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

    {{-- ── Tailwind ── --}}
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        'tm-red':    '#dc2626',
                        'tm-dark':   '#080808',
                        'tm-grey':   '#111111',
                        'tm-mid':    '#1c1c1c',
                        'tm-border': '#2a2a2a',
                    },
                    fontFamily: {
                        'display': ['"Bebas Neue"', 'Impact', 'sans-serif'],
                        'mono':    ['"JetBrains Mono"', 'monospace'],
                    }
                }
            }
        }
    </script>

    <style>
        /* ── Base ── */
        *, *::before, *::after { box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body { font-family: 'Inter', sans-serif; background: #080808; color: #e5e5e5; margin: 0; }
        .font-display { font-family: 'Bebas Neue', Impact, sans-serif; }
        .font-mono    { font-family: 'JetBrains Mono', monospace; }

        /* ── Glows ── */
        .troll-glow   { text-shadow: 0 0 30px rgba(220,38,38,0.55), 0 0 60px rgba(220,38,38,0.2); }
        .troll-glow-sm{ text-shadow: 0 0 16px rgba(220,38,38,0.4); }
        .red-border-glow { box-shadow: 0 0 0 1px rgba(220,38,38,0.4), 0 0 20px rgba(220,38,38,0.1); }

        /* ── Buttons ── */
        .btn-troll {
            background: linear-gradient(135deg, #dc2626, #991b1b);
            transition: all 0.25s cubic-bezier(.4,0,.2,1);
            position: relative; overflow: hidden;
        }
        .btn-troll::after {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
            opacity: 0; transition: opacity 0.2s;
        }
        .btn-troll:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(220,38,38,0.45); }
        .btn-troll:hover::after { opacity: 1; }
        .btn-troll:active { transform: translateY(0); }

        .btn-outline {
            border: 1px solid #2a2a2a; color: #d1d5db;
            transition: all 0.2s;
            background: transparent;
        }
        .btn-outline:hover { border-color: #dc2626; color: #dc2626; box-shadow: 0 0 14px rgba(220,38,38,0.15); }

        /* ── Cards ── */
        .card-dark {
            background: #111111;
            border: 1px solid #1e1e1e;
            transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
        }
        .card-dark:hover {
            border-color: rgba(220,38,38,0.5);
            transform: translateY(-4px);
            box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(220,38,38,0.15);
        }

        /* ── Nav ── */
        .nav-glass {
            background: rgba(8,8,8,0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(42,42,42,0.8);
        }
        .nav-link {
            position: relative; color: #9ca3af;
            transition: color 0.2s; font-weight: 500; font-size: 14px;
        }
        .nav-link::after {
            content: '';
            position: absolute; bottom: -4px; left: 0; right: 0;
            height: 1px; background: #dc2626;
            transform: scaleX(0); transform-origin: center;
            transition: transform 0.2s;
        }
        .nav-link:hover { color: #f9fafb; }
        .nav-link:hover::after { transform: scaleX(1); }
        .nav-link.active { color: #ef4444; }
        .nav-link.active::after { transform: scaleX(1); }

        /* ── Gradient border ── */
        .grad-border {
            position: relative;
            background: #111111;
            border-radius: 16px;
        }
        .grad-border::before {
            content: '';
            position: absolute; inset: 0;
            border-radius: inherit;
            padding: 1px;
            background: linear-gradient(135deg, rgba(220,38,38,0.5), rgba(220,38,38,0.05), rgba(220,38,38,0.3));
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor; mask-composite: exclude;
            pointer-events: none;
        }

        /* ── Scroll reveal ── */
        .reveal {
            opacity: 0;
            transform: translateY(32px);
            transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
        }
        .reveal.visible { opacity: 1; transform: translateY(0); }
        .reveal-left  { opacity: 0; transform: translateX(-32px); transition: opacity 0.7s ease, transform 0.7s ease; }
        .reveal-left.visible  { opacity: 1; transform: translateX(0); }
        .reveal-right { opacity: 0; transform: translateX(32px); transition: opacity 0.7s ease, transform 0.7s ease; }
        .reveal-right.visible { opacity: 1; transform: translateX(0); }
        .reveal-delay-1 { transition-delay: 0.1s; }
        .reveal-delay-2 { transition-delay: 0.2s; }
        .reveal-delay-3 { transition-delay: 0.3s; }
        .reveal-delay-4 { transition-delay: 0.4s; }
        .reveal-delay-5 { transition-delay: 0.5s; }

        /* ── Animated grid bg ── */
        .grid-bg {
            background-image:
                linear-gradient(rgba(220,38,38,0.04) 1px, transparent 1px),
                linear-gradient(90deg, rgba(220,38,38,0.04) 1px, transparent 1px);
            background-size: 44px 44px;
        }

        /* ── Section divider ── */
        .section-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 11px; letter-spacing: 4px;
            text-transform: uppercase; color: #dc2626;
        }

        /* ── Ticker ── */
        @@keyframes ticker { 0%{ transform:translateX(0) } 100%{ transform:translateX(-50%) } }
        .ticker-track { animation: ticker 28s linear infinite; display: flex; width: max-content; }
        .ticker-track:hover { animation-play-state: paused; }

        /* ── Number counter ── */
        @@keyframes countUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        .count-up { animation: countUp 0.6s ease forwards; }

        /* ── Flash msgs ── */
        .flash-success { background: rgba(20,83,45,0.5); border: 1px solid rgba(34,197,94,0.3); }
        .flash-error   { background: rgba(127,29,29,0.5); border: 1px solid rgba(220,38,38,0.3); }

        /* ── Scrollbar ── */
        ::-webkit-scrollbar { width: 5px; }
        ::-webkit-scrollbar-track { background: #080808; }
        ::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: #dc2626; }

        /* ── Form inputs ── */
        .tm-input {
            background: #111; border: 1px solid #2a2a2a; border-radius: 10px;
            padding: 12px 16px; color: #e5e5e5; width: 100%;
            font-family: 'Inter', sans-serif; font-size: 14px;
            outline: none; transition: border-color 0.2s, box-shadow 0.2s;
        }
        .tm-input:focus { border-color: rgba(220,38,38,0.5); box-shadow: 0 0 0 3px rgba(220,38,38,0.08); }
        .tm-input::placeholder { color: #4b5563; }
        .tm-label {
            display: block; font-size: 11px; letter-spacing: 2px;
            text-transform: uppercase; color: #6b7280;
            font-family: 'JetBrains Mono', monospace; margin-bottom: 7px;
        }
    </style>
    @stack('styles')
</head>
<body class="min-h-screen flex flex-col">

    {{-- ── Navigation ── --}}
    <nav class="nav-glass sticky top-0 z-50">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex items-center justify-between h-16">

                {{-- Logo --}}
                <a href="{{ route('home') }}" class="flex items-center gap-1 group">
                    <span class="font-display text-[22px] sm:text-[28px] leading-none text-tm-red troll-glow-sm tracking-wider transition-all duration-200 group-hover:troll-glow">TROLL MASTERS</span>
                    <span class="text-[10px] sm:text-[11px] text-gray-600 font-mono tracking-widest">.AI</span>
                </a>

                {{-- Desktop nav --}}
                <div class="hidden md:flex items-center gap-7">
                    <a href="{{ route('about') }}"          class="nav-link {{ request()->routeIs('about') ? 'active' : '' }}">About Us</a>
                    <a href="{{ route('services.index') }}" class="nav-link {{ request()->routeIs('services.*') ? 'active' : '' }}">Services</a>
                    <a href="{{ route('faq') }}"            class="nav-link {{ request()->routeIs('faq') ? 'active' : '' }}">FAQ</a>
                    <a href="{{ route('contact.index') }}"  class="nav-link {{ request()->routeIs('contact.*') ? 'active' : '' }}">Contact</a>
                </div>

                <div class="flex items-center gap-3">
                    {{-- Cart --}}
                    <a href="{{ route('cart.index') }}" class="relative flex items-center justify-center w-10 h-10 rounded-lg border border-transparent hover:border-red-800 hover:bg-red-950/30 transition-all">
                        <svg class="w-5 h-5 text-gray-400 hover:text-red-400 transition-colors" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z" />
                        </svg>
                        @php $cartCount = count(session('cart', [])); @endphp
                        @if($cartCount > 0)
                        <span class="absolute -top-1 -right-1 bg-tm-red text-white text-[10px] rounded-full w-4 h-4 flex items-center justify-center font-bold leading-none">{{ $cartCount }}</span>
                        @endif
                    </a>

                    <a href="{{ route('services.index') }}" class="btn-troll hidden md:inline-flex items-center gap-2 text-white px-5 py-2 rounded-lg font-bold text-sm tracking-wide">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>
                        UNLEASH
                    </a>

                    {{-- Mobile hamburger --}}
                    <button id="mobile-menu-btn" class="md:hidden w-10 h-10 flex items-center justify-center rounded-lg border border-transparent hover:border-red-800 transition-all text-gray-400">
                        <svg id="menu-icon-open" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
                        <svg id="menu-icon-close" class="w-5 h-5 hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
                    </button>
                </div>
            </div>

            {{-- Mobile menu --}}
            <div id="mobile-menu" class="hidden md:hidden pb-4 pt-2 space-y-1">
                <a href="{{ route('about') }}"          class="flex items-center gap-3 py-3 px-3 rounded-lg text-gray-300 hover:text-white hover:bg-white/5 transition-all text-sm font-medium">About Us</a>
                <a href="{{ route('services.index') }}" class="flex items-center gap-3 py-3 px-3 rounded-lg text-gray-300 hover:text-white hover:bg-white/5 transition-all text-sm font-medium">Services</a>
                <a href="{{ route('faq') }}"            class="flex items-center gap-3 py-3 px-3 rounded-lg text-gray-300 hover:text-white hover:bg-white/5 transition-all text-sm font-medium">FAQ</a>
                <a href="{{ route('contact.index') }}"  class="flex items-center gap-3 py-3 px-3 rounded-lg text-gray-300 hover:text-white hover:bg-white/5 transition-all text-sm font-medium">Contact</a>
                <div class="pt-2">
                    <a href="{{ route('services.index') }}" class="btn-troll block text-center text-white py-3 rounded-lg font-bold text-sm tracking-wide">🔥 UNLEASH THE TROLLS</a>
                </div>
            </div>
        </div>
    </nav>

    {{-- ── Flash messages ── --}}
    @if(session('success'))
    <div class="flash-success text-green-300 px-4 py-3 text-center text-sm font-medium flex items-center justify-center gap-2">
        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
        {{ session('success') }}
    </div>
    @endif
    @if(session('error'))
    <div class="flash-error text-red-300 px-4 py-3 text-center text-sm font-medium flex items-center justify-center gap-2">
        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
        {{ session('error') }}
    </div>
    @endif

    {{-- ── Main ── --}}
    <main class="flex-1">
        @yield('content')
    </main>

    {{-- ── Footer ── --}}
    <footer class="border-t border-white/5 mt-20" style="background:#0d0d0d;">
        {{-- Ticker --}}
        <div class="border-b border-white/5 py-3 overflow-hidden bg-red-950/20">
            <div class="ticker-track text-xs font-mono text-red-700 tracking-widest uppercase select-none whitespace-nowrap">
                @for($i=0;$i<2;$i++)
                <span class="mx-10">⚡ 100% ANONYMOUS</span>
                <span class="mx-10">🔥 CRYPTO PAYMENTS ONLY</span>
                <span class="mx-10">☠️ NO REFUNDS</span>
                <span class="mx-10">🌍 GLOBALLY OPERATED</span>
                <span class="mx-10">👹 RELENTLESS CAMPAIGNS</span>
                <span class="mx-10">💀 THEY WILL KNOW</span>
                <span class="mx-10">🎯 10 TIERS OF PAIN</span>
                <span class="mx-10">🚫 ZERO MERCY</span>
                @endfor
            </div>
        </div>

        <div class="max-w-7xl mx-auto px-4 py-14">
            <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-8 mb-12">
                {{-- Brand --}}
                <div class="sm:col-span-2">
                    <div class="font-display text-3xl text-tm-red troll-glow-sm mb-3">TROLL MASTERS.AI</div>
                    <p class="text-gray-500 text-sm leading-relaxed max-w-sm">The world's most relentless internet troll service. Bad karma working too slow? We accelerate consequences.</p>
                    <div class="flex gap-3 mt-5">
                        <div class="flex items-center gap-2 bg-white/3 border border-white/8 rounded-lg px-3 py-2 text-xs text-gray-500 font-mono">
                            <div class="w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"></div> ONLINE
                        </div>
                        <div class="flex items-center gap-2 bg-white/3 border border-white/8 rounded-lg px-3 py-2 text-xs text-gray-500 font-mono">
                            <svg class="w-3 h-3 text-yellow-500" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
                            CRYPTO ONLY
                        </div>
                    </div>
                </div>

                {{-- Quick links --}}
                <div>
                    <h4 class="text-white font-semibold text-sm mb-4 tracking-wide">QUICK LINKS</h4>
                    <ul class="space-y-2.5 text-sm">
                        @foreach([['About Us', 'about'], ['Services', 'services.index'], ['FAQ', 'faq'], ['Contact', 'contact.index'], ['Custom Package', 'custom-quote.index'], ['Privacy Policy', 'privacy'], ['Terms & Conditions', 'terms']] as [$label, $rt])
                        <li><a href="{{ route($rt) }}" class="text-gray-500 hover:text-red-400 transition-colors flex items-center gap-2 group">
                            <span class="w-1 h-1 rounded-full bg-red-800 group-hover:bg-red-500 transition-colors"></span>{{ $label }}
                        </a></li>
                        @endforeach
                    </ul>
                </div>

                {{-- Services --}}
                <div>
                    <h4 class="text-white font-semibold text-sm mb-4 tracking-wide">OUR TIERS</h4>
                    <ul class="space-y-2.5 text-sm">
                        @foreach([['T1 — The Nudge','the-nudge'],['T2 — The Poke','the-poke'],['T3 — The Sting','the-sting'],['T7 — Wrecking Ball','the-wrecking-ball'],['T10 — Nuclear Option','the-nuclear-option']] as [$label, $slug])
                        <li><a href="{{ route('services.show', $slug) }}" class="text-gray-500 hover:text-red-400 transition-colors flex items-center gap-2 group">
                            <span class="w-1 h-1 rounded-full bg-red-800 group-hover:bg-red-500 transition-colors"></span>{{ $label }}
                        </a></li>
                        @endforeach
                    </ul>
                </div>
            </div>

            {{-- Legal --}}
            <div class="border-t border-white/5 pt-8">
                <p class="text-gray-600 text-[11px] leading-relaxed max-w-4xl mx-auto text-center mb-4">
                    ALL SERVICES ARE PERFORMED ONLINE. EVERYTHING WE DO IS LEGAL. WE ARE NOT BASED IN THE USA AND ARE NOT SUBJECT TO LOCAL JURISDICTIONS. YOU PURCHASE OUR SERVICES AT YOUR OWN RISK. WE ACCEPT ZERO LIABILITY FOR ANY CONSEQUENCES RESULTING FROM OUR SERVICES.
                </p>
                <div class="flex items-center justify-center gap-6 mb-3">
                    <a href="{{ route('privacy') }}" class="text-gray-600 hover:text-red-500 text-xs font-mono transition-colors">PRIVACY POLICY</a>
                    <span class="text-gray-800">·</span>
                    <a href="{{ route('terms') }}" class="text-gray-600 hover:text-red-500 text-xs font-mono transition-colors">TERMS & CONDITIONS</a>
                </div>
                <div class="text-center text-gray-700 text-xs font-mono">&copy; {{ date('Y') }} TrollMasters.AI — All rights reserved.</div>
            </div>
        </div>
    </footer>

    {{-- ── Scripts ── --}}
    <script>
        // Mobile menu
        const btn  = document.getElementById('mobile-menu-btn');
        const menu = document.getElementById('mobile-menu');
        const ico1 = document.getElementById('menu-icon-open');
        const ico2 = document.getElementById('menu-icon-close');
        btn?.addEventListener('click', () => {
            const isHidden = menu.classList.toggle('hidden');
            ico1.classList.toggle('hidden', !isHidden);
            ico2.classList.toggle('hidden', isHidden);
        });

        // Scroll-reveal
        const observer = new IntersectionObserver((entries) => {
            entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('visible'); } });
        }, { threshold: 0.12, rootMargin: '0px 0px -40px 0px' });
        document.querySelectorAll('.reveal, .reveal-left, .reveal-right').forEach(el => observer.observe(el));

        // Animated counters
        function animateCounter(el) {
            const target = parseFloat(el.dataset.target);
            const prefix = el.dataset.prefix || '';
            const suffix = el.dataset.suffix || '';
            const isDecimal = el.dataset.decimal === '1';
            const duration = 1600;
            const start = performance.now();
            function update(now) {
                const progress = Math.min((now - start) / duration, 1);
                const ease = 1 - Math.pow(1 - progress, 3);
                const val = target * ease;
                el.textContent = prefix + (isDecimal ? val.toFixed(1) : Math.floor(val).toLocaleString()) + suffix;
                if (progress < 1) requestAnimationFrame(update);
            }
            requestAnimationFrame(update);
        }
        const counterObserver = new IntersectionObserver((entries) => {
            entries.forEach(e => {
                if (e.isIntersecting && !e.target.dataset.animated) {
                    e.target.dataset.animated = '1';
                    animateCounter(e.target);
                }
            });
        }, { threshold: 0.5 });
        document.querySelectorAll('[data-target]').forEach(el => counterObserver.observe(el));
    </script>
    @stack('scripts')
</body>
</html>
