<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Main Portal Asama</title>
    <link rel="icon" type="image/x-icon" href="{{ asset('images/logo.png') }}">
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
        body {
            font-family: 'Inter', sans-serif;
            background: url('{{ asset('images/fotoasama.jpg') }}') no-repeat center center fixed;
            background-size: cover;
        }
        .app-button {
            transition: all 0.3s ease;
        }
        .app-button:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        }
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        .modal-content {
            animation: fadeInScale 0.3s ease-out forwards;
        }
        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
    </style>
</head>
<body class="relative min-h-screen flex flex-col items-center justify-center p-6 text-gray-100">

    <!-- Overlay agar teks lebih jelas -->
    <div class="absolute inset-0 bg-black/70"></div>

    <!-- Konten utama -->
    <div class="relative z-10 flex flex-col items-center justify-center w-full max-w-xl">
        <!-- Logo -->
        <img src="{{ asset('images/logo.png') }}" alt="Logo Asama" class="w-28 h-24 mb-6 shadow-lg">
        <!-- Judul -->
        <h1 class="text-4xl font-extrabold text-emerald-500 mb-10 text-center drop-shadow-lg">
            APLIKASI ASAMA
        </h1>

        <div class="grid grid-cols-1 md:grid-cols-2 gap-6 w-full">
            <!-- Aplikasi Booking Room -->
            <a href="{{ url('/calendar') }}" target="_blank"
               class="app-button bg-gradient-to-r from-emerald-500 to-teal-600 text-white font-semibold py-4 px-6 rounded-2xl text-center shadow-md">
               BOOKING ROOM
            </a>

            <!-- Aplikasi Guest -->
            <a href="{{ url('/izin_tamu') }}" target="_blank"
               class="app-button bg-gradient-to-r from-yellow-500 to-orange-600 text-white font-semibold py-4 px-6 rounded-2xl text-center shadow-md">
               GUEST
            </a>

            <!-- Aplikasi HRIS -->
            <a href="http://192.168.0.122" target="_blank"
               class="app-button bg-gradient-to-r from-blue-500 to-indigo-600 text-white font-semibold py-4 px-6 rounded-2xl text-center shadow-md">
               HRIS
            </a>

            <!-- Aplikasi Warehousing -->
            <a href="http://192.168.0.30:3000" target="_blank"
               class="app-button bg-gradient-to-r from-purple-500 to-pink-600 text-white font-semibold py-4 px-6 rounded-2xl text-center shadow-md">
               WAREHOUSING
            </a>
        </div>
        
        <!-- Tombol untuk membuka panduan -->
        <button id="openModalBtn" class="mt-8 bg-gray-200 text-gray-700 font-semibold py-3 px-6 rounded-xl shadow-sm hover:bg-gray-300 transition-colors duration-200">
            Information
        </button>
    </div>

    <!-- Modal (Pop-up) -->
    <div id="modal" class="modal-overlay">
        <div class="modal-content bg-white rounded-lg shadow-2xl p-6 md:p-8 w-full max-w-md mx-4">
            <div class="flex justify-between items-center mb-4">
                <h3 class="font-bold text-xl text-gray-800">Panduan Akses Aplikasi</h3>
                <button id="closeModalBtn" class="text-gray-400 hover:text-gray-700 transition-colors duration-200 focus:outline-none">
                    <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
                </button>
            </div>

            <!-- Isi Panduan -->
            <div class="space-y-4 text-gray-700 text-sm">
                <!-- Booking Room -->
                <div class="p-4 bg-gray-50 rounded-lg border border-gray-200">
                    <div class="flex items-center justify-between mb-1">
                        <span class="font-semibold text-emerald-600">BOOKING ROOM</span>
                        <span class="px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-100 text-emerald-800">Online</span>
                    </div>
                    <p class="text-sm">Aplikasi ini memerlukan koneksi internet dan dapat diakses dari mana saja.</p>
                </div>

                <!-- Guest -->
                <div class="p-4 bg-gray-50 rounded-lg border border-gray-200">
                    <div class="flex items-center justify-between mb-1">
                        <span class="font-semibold text-orange-600">GUEST</span>
                        <span class="px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-100 text-emerald-800">Online</span>
                    </div>
                    <p class="text-sm">Aplikasi ini memerlukan koneksi internet dan dapat diakses dari mana saja.</p>
                </div>



                <!-- HRIS -->
                <div class="p-4 bg-gray-50 rounded-lg border border-gray-200">
                    <div class="flex items-center justify-between mb-1">
                        <span class="font-semibold text-blue-600">HRIS</span>
                        <span class="px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">Offline</span>
                    </div>
                    <p class="text-sm">Hanya dapat diakses melalui jaringan internal perusahaan.</p>
                </div>

                <!-- Warehousing -->
                <div class="p-4 bg-gray-50 rounded-lg border border-gray-200">
                    <div class="flex items-center justify-between mb-1">
                        <span class="font-semibold text-pink-600">WAREHOUSING</span>
                        <span class="px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">Offline</span>
                    </div>
                    <p class="text-sm">Hanya dapat diakses melalui jaringan internal perusahaan.</p>
                </div>
            </div>
        </div>
    </div>

    <script>
        const modal = document.getElementById('modal');
        const openModalBtn = document.getElementById('openModalBtn');
        const closeModalBtn = document.getElementById('closeModalBtn');

        openModalBtn.addEventListener('click', () => {
            modal.style.display = 'flex';
        });

        closeModalBtn.addEventListener('click', () => {
            modal.style.display = 'none';
        });

        // Menutup modal jika klik di luar area modal
        window.addEventListener('click', (event) => {
            if (event.target === modal) {
                modal.style.display = 'none';
            }
        });
    </script>

</body>
</html>
