<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>GPS Multi-Session Tracking</title>
   
    <script src="https://cdn.socket.io/4.5.0/socket.io.min.js"></script>
    <!-- <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCauv80CxhP1ZUvXkbQcbstbdQDChQxLqU&callback=initMap" async defer></script> -->
</head>
<body>
<style>

/* ✅ General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
    text-align: center;
}

/* ✅ Main Container */
.container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* ✅ Title */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #444;
}

/* ✅ Tracking Controls */
.tracking-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* ✅ Buttons */
button {
    font-size: 16px;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.start-btn {
    background: #28a745;
    color: white;
}

.stop-btn {
    background: #dc3545;
    color: white;
}

button:hover {
    opacity: 0.8;
}

/* ✅ Status Text */
#status {
    font-size: 16px;
    margin-bottom: 20px;
    padding: 10px;
    background: #ffffcc;
    border-radius: 5px;
}

/* ✅ Map Display */
#map {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}


</style>
    <div class="container">
        <h1>📍 GPS  Tracking System</h1>

        <div class="tracking-controls">
            <button class="start-btn" onclick="startTracking()">▶ Start Tracking</button>
            <button class="stop-btn" onclick="stopTracking()">⏹ Stop Tracking</button>
        </div>

        <p id="status">⏳ Waiting for action...</p>
 

<div style="display: flex;">   <h2>📌 Live Tracking Map</h2> 
        <button class="save-btn" onclick="sendLocation()" style="width: 70px;">Save</button> </div>
        <div id="map2"></div>
    </div>

    <script src="./js/gpsUser.js"></script>

</body>
</html>
