/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e0f7fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 100px; /* Make room for the fixed footer */
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #42a5f5, #7e57c2);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin: 0;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
}

nav ul li {
    position: relative;
    margin-left: 10px;
}

/* Style for links in the navigation bar */
nav ul li a {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    background-color: #42a5f5;
    border-radius: 20px;
    transition: background-color 0.3s, transform 0.3s;
    font-weight: bold;
    font-size: 0.85rem;
}

nav ul li a:hover {
    background-color: #00acc1;
    transform: scale(1.1);
}

/* Dropdown button styles */
.dropbtn {
    cursor: pointer;
}

/* Dropdown content container, hidden by default */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 10px;
    padding: 10px 0;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    transition: background-color 0.3s;
    margin-bottom: 5px;
}

.dropdown-content a:last-child {
    margin-bottom: 0;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Button Styles */
button {
    padding: 10px 20px;
    background-color: #42a5f5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #1e88e5;
}

/* Top-right Button Container */
.top-right {
    display: flex;
    justify-content: flex-end;
    margin: 20px;
}

/* Search Field Styles */
.search-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-container p {
    margin: 5px 0;                 /* Margin for labels */
    font-weight: bold;              /* Bold text for labels */
}

.search-container input[type="text"] {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 200px;
}

.search-container button {
    padding: 10px 15px;
}

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

table th, table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #f5f5f5;
}

table td {
    text-align: center;
}

/* Action Buttons in Table */
table td button {
    padding: 5px 10px;
    margin-right: 5px;
    background-color: #42a5f5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

table td button:hover {
    background-color: #1e88e5;
}

/* Main Styles */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer Styles */
footer {
    background-color: #42a5f5;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul li {
        margin-bottom: 10px;
    }

    .search-container {
        flex-direction: column;
    }

    .top-right {
        justify-content: center;
    }
    .update-btn,
    .delete-btn {
        margin-right: 0;          /* Remove right margin on small screens */
        margin-bottom: 5px;       /* Space below buttons */
        flex: 1;                   /* Allow buttons to take equal space */
    }

    .update-btn {
        margin-right: 5px;         /* Add margin to the right for the update button */
    }
}
