/* ========================================= */
/* Global Styles (From Initial <style> block) */
/* ========================================= */

body { 
    font-family: sans-serif; 
    background: #f4f4f9; 
    margin: 0; 
    padding: 0; 
}

/* --- NEW: Navigation Bar Styles --- */
/* This styles the <nav class="navbar"> element */
.navbar {
    background-color: #333;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.navbar h1 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}
.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: inline-block;
    transition: background-color 0.3s;
}
.navbar a:hover {
    background-color: #555;
}
/* --------------------------------------- */

/* --- General Layout Structure --- */
header { 
    padding: 40px 20px; 
    text-align: center; 
    background: white; 
    border-bottom: 1px solid #ddd; 
}
.container { 
    /* The base container width remains 1000px for main content */
    max-width: 1000px; 
    margin: 20px auto; 
    padding: 20px; 
}
.gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 20px; 
}
.video-card { 
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    cursor: pointer; 
    transition: 0.2s; 
}
.video-card:hover { 
    transform: translateY(-5px); 
}
.video-card img { 
    width: 100%; 
    height: 150px; 
    object-fit: cover; 
    object-position: top; 
    display: block; 
}
.video-info { 
    padding: 15px; 
}
.video-info strong { 
    display: block; 
    color: #007bff; 
    font-size: 1.2rem; 
}

/* --- Pagination Styles --- */
.pagination-controls {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.pagination-controls button {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background 0.3s, opacity 0.3s;
}
.pagination-controls button:hover:not(:disabled) {
    background-color: #0056b3;
}
.pagination-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}
#pageIndicator {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}
/* ------------------------ */

/* Modal Styles */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.9); 
    justify-content: center; 
    align-items: center; 
}
.modal-content { 
    width: 80%; 
    max-width: 800px; 
    position: relative; 
}
video { 
    width: 100%; 
    border-radius: 5px; 
}
.close-btn { 
    /* Adjusted top value for better placement */
    position: absolute; 
    top: -20px; 
    right: 0; 
    color: white; 
    font-size: 30px; 
    cursor: pointer; 
}
#modal-caption { 
    color: white; 
    text-align: center; 
    margin-top: 10px; 
}

/* Report Styles (From the initial <style> block) */
.vehicle-count-report {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
h2 {
    text-align: center;
    color: #333;
    border-bottom: 2px solid #007bff; 
    padding-bottom: 10px;
    margin-bottom: 30px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
thead tr {
    background-color: #007bff;
    color: white;
}
th, td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: center;
}
th:first-child, td:first-child {
    text-align: left;
}
tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
tbody tr:hover {
    background-color: #eef;
}
.report-footer {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}
