<script setup lang="ts">
import { Head, Link } from '@inertiajs/vue3';
import Button from '@/components/ui/button.vue';
import SupportChat from '@/components/support/SupportChat.vue';

defineProps<{
    canLogin?: boolean;
    canRegister?: boolean;
}>();
</script>

<template>
    <Head title="Welcome" />

    <div class="welcome-container">
        <!-- Background -->
        <div class="bg-grid"></div>
        <div class="glow-orb orb-1"></div>
        <div class="glow-orb orb-2"></div>

        <div class="content">
            <h1 class="title">BETI<span class="highlight">X</span></h1>
            <p class="subtitle">THE ULTIMATE CRYPTO PROTOCOL</p>
            <p> pimmel</p>
            <div class="actions">
                <Link href="/login" v-if="canLogin">
                    <Button class="w-40 h-12 text-base font-bold neon-button">LOG IN</Button>
                </Link>
                <Link href="/register" v-if="canRegister">
                    <Button variant="secondary" class="w-40 h-12 text-base font-bold">SIGN UP</Button>
                </Link>
            </div>
        </div>
    </div>
  <SupportChat />
</template>

<style scoped>
.welcome-container {
    min-height: 100vh;
    background: #020202;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.content {
    text-align: center;
    z-index: 10;
}

.title {
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: 10px;
    margin: 0;
    line-height: 1;
}

.highlight {
    color: #ff007a;
    text-shadow: 0 0 40px rgba(255, 0, 122, 0.6);
}

.subtitle {
    font-size: 1.2rem;
    color: #888;
    letter-spacing: 4px;
    margin-top: 10px;
    margin-bottom: 50px;
}

.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Background Effects */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #ff007a;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #00f2ff;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* Neon Button */
.neon-button {
    background: linear-gradient(90deg, #ff007a, #be005b);
    border: none;
    box-shadow: 0 0 20px rgba(255, 0, 122, 0.4);
    transition: all 0.3s ease;
}
.neon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 0, 122, 0.7);
}
</style>
