<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>People Counter</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container">
        <header>
            <h1>People Counter</h1>
            <p class="subtitle">Real-time occupancy tracking</p>
        </header>

        <main>
            <div class="video-section">
                <div class="video-container">
                    <img id="videoStream" src="{{ url_for('video_feed') }}" alt="Video Stream">
                    <div id="statusIndicator" class="status-indicator"></div>
                </div>
            </div>

            <div class="stats-section">
                <div class="stat-card" id="occupancyCard">
                    <div class="stat-label">Current Occupancy</div>
                    <div class="stat-value" id="occupancyValue">0</div>
                    <div class="stat-subtitle" id="occupancyStatus">Normal</div>
                </div>

                <div class="stat-card">
                    <div class="stat-label">Total Entered</div>
                    <div class="stat-value stat-entered" id="enteredValue">0</div>
                </div>

                <div class="stat-card">
                    <div class="stat-label">Total Exited</div>
                    <div class="stat-value stat-exited" id="exitedValue">0</div>
                </div>
            </div>

            <div class="controls-section">
                <button id="resetButton" class="reset-btn">Reset Counts</button>
            </div>
        </main>

        <footer>
            <p>People Counter System - Real-time face detection and tracking</p>
        </footer>
    </div>

    <script src="https://cdn.socket.io/4.5.4/socket.io.min.js"></script>
    <script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>
