/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1200px; /* Adjust max-width for larger screens */
    text-align: center;
    position: relative;
}

/* Header Styles */
header h1 {
    margin: 0;
    font-size: 2em;
    color: #333;
}

header p {
    color: #666;
    margin: 10px 0 20px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form input[type="text"],
form input[type="password"],
form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

form button {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #218838;
}

/* Stats Section */
.stats {
    display: flex;
    flex-wrap: wrap; /* Allow stats to wrap on smaller screens */
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
    flex: 1 1 200px; /* Allow items to grow and shrink */
    margin: 10px;
    padding: 10px;
}

.stat-number {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

/* Tables */
.categories-table,
.submissions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.categories-table th,
.categories-table td,
.submissions-table th,
.submissions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.categories-table th,
.submissions-table th {
    background-color: #28a745;
    color: #fff;
    font-weight: bold;
}

.categories-table tbody tr:hover,
.submissions-table tbody tr:hover {
    background-color: #f9f9f9;
}

.categories-table tbody tr:nth-child(even),
.submissions-table tbody tr:nth-child(even) {
    background-color: #f4f4f4;
}

/* Buttons */
.back-button,
.login-button,
.logout-button,
.export-button {
    position: absolute;
    top: 20px;
    right: 20px;
}

.back-button {
    left: 20px;
    right: auto;
}

.back-button a,
.login-button a,
.logout-button a,
.export-button a {
    background-color: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.back-button a:hover,
.login-button a:hover,
.logout-button a:hover,
.export-button a:hover {
    background-color: #218838;
}

.logout-button a {
    background-color: #dc3545;
}

.logout-button a:hover {
    background-color: #c82333;
}

/* Demo Disclaimer Box */
.demo-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.demo-box h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 1.2em;
}

.demo-box p {
    margin: 0 0 10px;
    color: #666;
}

.demo-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.demo-box ul li {
    margin: 5px 0;
    color: #333;
}

/* Footer Styles */
footer {
    margin-top: 40px;
    padding: 20px 0;
    background-color: #333;
    color: #fff;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid #444;
}

footer p {
    margin: 0;
}

footer a {
    color: #28a745;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .stats {
        flex-direction: column; /* Stack stats vertically on smaller screens */
    }

    .stat-item {
        flex: 1 1 auto; /* Allow items to take full width */
        margin: 5px 0;
    }

    .categories-table th,
    .categories-table td,
    .submissions-table th,
    .submissions-table td {
        padding: 8px 10px; /* Reduce padding for smaller screens */
    }

    .back-button,
    .login-button,
    .logout-button,
    .export-button {
        position: static; /* Stack buttons vertically on smaller screens */
        margin: 10px 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em; /* Reduce font size for smaller screens */
    }

    .categories-table th,
    .categories-table td,
    .submissions-table th,
    .submissions-table td {
        font-size: 0.9em; /* Reduce font size for smaller screens */
    }
}