body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}
header h1 { margin: 0; }
header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0.5rem auto 0;
    padding: 0 1rem;
}
header nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color: #555;
    border-radius: 4px;
}
header nav a:hover { background-color: #777; }

main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
section:last-child { border-bottom: none; }

h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
h3 {
    color: #555;
    margin-top: 0;
}

.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.login-container h2 { text-align: center; margin-bottom: 20px; }
.login-container div { margin-bottom: 15px; }
.login-container label { display: block; margin-bottom: 5px; }
.login-container input[type="text"],
.login-container input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.login-container button:hover { background-color: #0056b3; }
.login-container .error { color: red; text-align: center; margin-bottom: 15px; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
}
th { background-color: #f2f2f2; }
tr:nth-child(even) { background-color: #f9f9f9; }

.ip-management .ip-columns {
    display: flex;
    gap: 20px;
}
.ip-management .ip-columns > div {
    flex: 1;
}

button, .btn-exclude, .btn-include {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.8em;
}
.btn-exclude { background-color: #dc3545; }
.btn-exclude:hover { background-color: #c82333; }
.btn-include { background-color: #28a745; }
.btn-include:hover { background-color: #218838; }

/* Video Analytics Section */
.analytics-summary {
    margin-bottom: 30px;
}

.stat-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.video-analytics h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.video-analytics table th {
    background-color: #f8f9fa;
}

.video-analytics table td:nth-child(3),
.video-analytics table td:nth-child(4),
.video-analytics table td:nth-child(5),
.video-analytics table td:nth-child(6),
.video-analytics table td:nth-child(7) {
    text-align: center;
}

/* Make the table more readable on smaller screens */
@media (max-width: 768px) {
    .stat-cards {
        flex-direction: column;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .video-analytics table {
        display: block;
        overflow-x: auto;
    }
}