<?php
$logoVersion = @filemtime(__DIR__ . '/mainpp.png') ?: time();
?>
<!DOCTYPE html>
<html lang="ms">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard Audit Mainpp</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
    <link rel="stylesheet" href="styles.css">
    <style>
        body {
            background: #f8fafc;
        }
        .landing-shell {
            min-height: 100vh;
            display: grid;
            grid-template-columns: minmax(360px, 1fr) minmax(420px, 1fr);
            background: #fff;
        }
        .landing-visual {
            position: relative;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background:
                radial-gradient(circle at 54% 76%, rgba(255, 230, 0, 0.28) 0, rgba(255, 230, 0, 0.08) 12%, transparent 29%),
                radial-gradient(circle at 20% 18%, rgba(0, 218, 67, 0.32) 0, transparent 32%),
                linear-gradient(145deg, #031512 0%, #06241f 42%, #0b5138 100%);
        }
        .landing-visual::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
                linear-gradient(0deg, rgba(255,255,255,0.035) 1px, transparent 1px);
            background-size: 54px 54px;
            opacity: 0.28;
        }
        .landing-visual::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 16%;
            width: 220px;
            height: 34px;
            border-radius: 999px;
            background: rgba(1, 8, 7, 0.42);
            filter: blur(18px);
            transform: translateX(-50%);
            animation: shadowPulse 4.8s ease-in-out infinite;
        }
        .visual-logo-wrap {
            position: relative;
            width: min(340px, 56vw);
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
        }
        .visual-logo-glow {
            position: absolute;
            inset: 8%;
            border-radius: 50%;
            background:
                radial-gradient(circle, rgba(255, 230, 0, 0.22) 0, transparent 56%),
                radial-gradient(circle, rgba(0, 218, 67, 0.18) 0, transparent 68%);
            filter: blur(10px);
            animation: logoGlow 5.2s ease-in-out infinite;
        }
        .visual-logo-card {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 34px;
            animation: logoFloat 4.8s ease-in-out infinite;
            transform-origin: center;
        }
        .visual-logo-card img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.32));
        }

        .visual-company-name {
            position: absolute;
            left: 50%;
            top: calc(50% + min(170px, 28vw));
            width: min(440px, 78%);
            transform: translateX(-50%);
            z-index: 2;
            color: rgba(255, 255, 255, 0.94);
            text-align: center;
            font-size: 22px;
            line-height: 1.32;
            font-weight: 900;
            letter-spacing: 0;
            text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
        }
        .visual-company-name::after {
            content: "";
            display: block;
            width: 96px;
            height: 3px;
            margin: 12px auto 0;
            border-radius: 999px;
            background: linear-gradient(90deg, transparent, #ffe600, #00da43, transparent);
            opacity: 0.9;
        }
        @keyframes logoFloat {
            0%, 100% {
                transform: translateY(0) rotate(0deg) scale(1);
            }
            35% {
                transform: translateY(-14px) rotate(-1.2deg) scale(1.02);
            }
            70% {
                transform: translateY(6px) rotate(1deg) scale(0.995);
            }
        }
        @keyframes logoGlow {
            0%, 100% {
                opacity: 0.72;
                transform: scale(0.96);
            }
            50% {
                opacity: 1;
                transform: scale(1.08);
            }
        }
        @keyframes shadowPulse {
            0%, 100% {
                opacity: 0.52;
                transform: translateX(-50%) scaleX(0.88);
            }
            45% {
                opacity: 0.32;
                transform: translateX(-50%) scaleX(1.16);
            }
            70% {
                opacity: 0.46;
                transform: translateX(-50%) scaleX(0.98);
            }
        }
        .landing-panel {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 48px 32px;
            background: #fbfcfd;
        }
        .landing-content {
            width: 100%;
            max-width: 460px;
            text-align: center;
        }
        .landing-logo {
            width: 76px;
            height: 76px;
            margin: 0 auto 20px;
            border-radius: 50%;
            background: #f1f5f9;
            padding: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .landing-logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
        }
        .landing-title {
            color: #090d12;
            font-size: 42px;
            line-height: 1.08;
            margin-bottom: 12px;
            letter-spacing: 0;
        }
        .landing-subtitle {
            color: #5f6b7a;
            line-height: 1.65;
            font-size: 15px;
            margin-bottom: 32px;
        }
        .landing-actions {
            display: grid;
            gap: 14px;
        }
        .landing-btn {
            width: 100%;
            border-radius: 999px;
            padding: 14px 18px;
            background: linear-gradient(180deg, #1c1c1c 0%, #050505 100%);
            color: #fff;
            text-decoration: none;
            font-size: 14px;
            font-weight: 800;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
            transition: transform 0.2s ease, background 0.2s ease;
        }
        .landing-btn:hover {
            background: linear-gradient(180deg, #0f3d2c 0%, #061c16 100%);
            transform: translateY(-2px);
        }
        .landing-link {
            color: #0b7f3a;
            text-decoration: none;
            font-weight: 800;
            font-size: 14px;
        }
        .landing-link:hover {
            text-decoration: underline;
        }
        .landing-divider {
            display: flex;
            align-items: center;
            gap: 16px;
            margin: 18px 0 2px;
            color: #9aa4b2;
            font-size: 13px;
            font-weight: 700;
        }
        .landing-divider::before,
        .landing-divider::after {
            content: "";
            height: 1px;
            flex: 1;
            background: #d9dee7;
        }
        .landing-footer {
            margin-top: 34px;
            color: #7a8696;
            font-size: 12px;
            line-height: 1.7;
        }
        @media (max-width: 860px) {
            .landing-shell {
                grid-template-columns: 1fr;
            }
            .landing-visual {
                min-height: 280px;
            }
            .visual-logo-wrap {
                width: min(240px, 68vw);
            }
            .visual-company-name {
                top: calc(50% + 105px);
                font-size: 16px;
                width: min(350px, 88%);
            }

            .landing-panel {
                min-height: auto;
                padding: 34px 22px 42px;
            }
            .landing-title {
                font-size: 34px;
            }
        }
    </style>
</head>
<body>
<div class="landing-shell">
    <div class="landing-visual" aria-hidden="true">
        <div class="visual-logo-wrap">
            <div class="visual-logo-glow"></div>
            <div class="visual-logo-card">
                <img src="mainpp.png?v=<?= urlencode((string) $logoVersion) ?>" alt="">
            </div>
            <div class="visual-company-name">Majlis Agama Islam Negeri Pulau Pinang</div>
        </div>
    </div>

    <main class="landing-panel">
        <div class="landing-content">
            <div class="landing-logo">
                <img src="mainpp.png?v=<?= urlencode((string) $logoVersion) ?>" alt="Logo MAINPP">
            </div>

            <h1 class="landing-title">Dashboard Audit</h1>

            <p class="landing-subtitle">
                Portal Rasmi Untuk Mengurus Pendaftaran Pengguna, Maklumat Audit, Maklum Balas Audit, dan Rekod Berkaitan.
            </p>

            <div class="landing-actions">
                <a href="login.php" class="landing-btn">
                    Log Masuk Sistem <i class="fa-solid fa-right-to-bracket"></i>
                </a>
                <div class="landing-divider">Atau</div>
                <a href="register.php" class="landing-link">Daftar Akaun Baru</a>
            </div>

            <div class="landing-footer">
                Hakcipta Terpelihara <br> &copy; <b>2026</b>
                <b>Majlis Agama Islam Negeri Pulau Pinang.</b><br>
                Praktikal Aizam
            </div>
        </div>
    </main>
</div>
</body>
</html>
