<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secure Camera Capture System</title>

<!-- Bootstrap 5 CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">

<style>
body{
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height:100vh;
    color:white;
}
.hero{
    padding:100px 20px;
    text-align:center;
}
.hero h1{
    font-size:48px;
    font-weight:700;
}
.hero p{
    font-size:20px;
    opacity:0.9;
}
.btn-custom{
    padding:12px 30px;
    font-size:18px;
    border-radius:30px;
}
.features{
    background:white;
    color:#333;
    padding:60px 20px;
    border-radius:20px 20px 0 0;
}
.feature-box{
    padding:20px;
    text-align:center;
}
.footer{
    text-align:center;
    padding:20px;
    font-size:14px;
    opacity:0.8;
}
</style>

</head>
<body>

<!-- HERO SECTION -->
<div class="hero">
    <h1>Secure Camera Capture System</h1>
    <p>Send Secure Link → Capture Photo → Auto Upload with Location & Time</p>

    <div class="mt-4">
        <?php if(isset($_SESSION['admin'])){ ?>
            <a href="dashboard.php" class="btn btn-light btn-custom me-3">Go to Dashboard</a>
        <?php } else { ?>
            <a href="login.php" class="btn btn-light btn-custom me-3">Admin Login</a>
        <?php } ?>
        <a href="generate_link.php" class="btn btn-outline-light btn-custom">Generate Link</a>
    </div>
</div>

<!-- FEATURES SECTION -->
<div class="features">
    <div class="container">
        <div class="row text-center mb-5">
            <h2 class="fw-bold">System Features</h2>
        </div>

        <div class="row">

            <div class="col-md-4 feature-box">
                <h4>🔐 Secure Token Links</h4>
                <p>Each capture link is encrypted and expires automatically.</p>
            </div>

            <div class="col-md-4 feature-box">
                <h4>📍 GPS Location Capture</h4>
                <p>Latitude & Longitude stored with every photo.</p>
            </div>

            <div class="col-md-4 feature-box">
                <h4>📅 Date & Time Stamp</h4>
                <p>Every image contains real-time timestamp overlay.</p>
            </div>

            <div class="col-md-4 feature-box">
                <h4>📂 Organized Storage</h4>
                <p>Photos saved in token-based folders automatically.</p>
            </div>

            <div class="col-md-4 feature-box">
                <h4>📊 Admin Panel</h4>
                <p>View, manage and download captured images easily.</p>
            </div>

            <div class="col-md-4 feature-box">
                <h4>📱 Mobile Optimized</h4>
                <p>Rear camera auto opens on mobile devices.</p>
            </div>

        </div>
    </div>
</div>

<!-- FOOTER -->
<div class="footer bg-dark text-white">
    © <?php echo date("Y"); ?> Secure Capture System | All Rights Reserved
</div>

</body>
</html>