/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
}

/* Modal Styles */
.modal {
    display: flex; /* Use flexbox for centering */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: left; /* Align text to the left */
    width: 90%; /* Responsive width */
    max-width: 400px;
    margin: auto;
}

.modal-content label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.modal-content input {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 10px;
    margin: 10px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.modal-content button {
    display: block;
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    margin: 10px 0 20px 0;
}

.modal-content button:hover {
    background: #0056b3;
}

/* For horizontal alignment of input and button */
.modal-content .form-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between elements */
}

.modal-content .form-group input {
    flex: 2; /* Input takes more space */
}

.modal-content .form-group button {
    flex: 1; /* Button takes less space */
}

.modal-content button:hover {
    background: #0056b3;
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%; /* Increase width for very small screens */
        max-width: 350px;
    }

    .modal-content input, 
    .modal-content button {
        font-size: 14px; /* Adjust font size for smaller screens */
    }
    
    h1 {
        font-size: 2em;
    }

    .container {
        padding: 10px;
    }

    form input[type="text"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    form button {
        width: 100%;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    table {
        font-size: 12px;
    }

    th, td {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    /* Stack table rows for small screens */
    td {
        display: block;
        text-align: right;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #ddd;
    }

    td:before {
        content: attr(data-label);
        font-weight: bold;
        color: #2c3e50;
        margin-right: 10px;
        display: inline-block;
        width: 130px;
    }

    tr {
        display: block;
        margin-bottom: 10px;
    }

    th {
        display: none; /* Hide headers on small screens */
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .pagination a {
        padding: 8px 12px;
        font-size: 14px;
    }

    form {
        flex-direction: column;
        align-items: center;
    }

    form input[type="text"], form button {
        margin-bottom: 10px;
    }
}

/* Table and Other Styling */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin: 20px 0;
    color: #2c3e50;
    font-size: 2.5em;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

th, td {
    padding: 15px;
    text-align: left;
    border: 1px solid #ddd;
    word-wrap: break-word;
}

th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

td {
    background-color: #f9f9f9;
}

tr:nth-child(even) td {
    background-color: #f1f1f1;
}

tr:hover td {
    background-color: #e0e0e0;
}

/* Search Form Styles */
form {
    /*display: flex;*/
    /*justify-content: right;*/
    /*margin-bottom: 20px;*/
}

form input[type="text"] {
    width: 355px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: border 0.3s ease;
}

form input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}

form button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #2980b9;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 10px 15px;
    margin: 0 5px;
    text-decoration: none;
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background-color: #3498db;
    color: white;
}

/* Pagination Current Page */
.pagination .active {
    background-color: #3498db;
    color: white;
    border: none;
}
