/* Reset box sizing for easier layout control */
* {
  box-sizing: border-box;
}

/* Set up the body as a column flex container */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 50px; /* Adjust to match the navbar height */
  background-color: #f2f2f2;
}

/* Fixed navbar at the top */
.navbar {
  background: #333;
  padding: 10px;
  text-align: center;
  position: relative;
}

.navbar a, .dropdown-btn {
  color: #fff;
  padding: 10px;
  text-decoration: none;
  transition: background 0.3s;
  cursor: pointer;
}

.navbar a:hover, .dropdown-btn:hover {
  background: #575757;
}

/* Dropdown containier */
.dropdown {
    display: inline-block;
    position: relative;
}

/* Dropdown button */
.dropdown-btn {
  color: white;
  padding: 10px;
  text-decoration: none;
  cursor: pointer;
}

/* Dropdown content container */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #444;
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0,2);
    border-radius: 4px;
    z-index: 1;
}

/* Hover effect */
.dropdown-content a:hover{
  background-color: #575757;
}

/* Links inside a dropdown */
.dropdown-content a {
    display: block;
    text-align: left;
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Main container is centered and allowed to expand */
.container {
  width: 80%;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px #ccc;
  flex: 1; /* Takes available space to push footer down */
}

/* Footer stays at the bottom */
.footer {
  text-align: center;
  padding: 10px;
  background: #333;
  color: #fff;
}

/* Make the screen responsive to different screen sizes */
@@media screen and (max-width: 600px) {
  .dropdown-content {
    min-width: 100%;
    left: 0;
  }
}

h1 {
  color: #333;
}

ul {
  list-style-type: none;
}

li {
  margin: 5px 0;
}

/* ================================ Modeule 2 styling ================ */

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 30px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  font-size: 16px;
  background-color: #fff;
}

table th, table td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

table th {
  background-color: #f4f4f4;
  font-weight: bold;
  color: #333;
}

table tr:hover {
  background-color: #f9f9f9;
}

h2 {
  margin-top: 40px;
  color: #444;
}


/* ================================ Modeule 2 login styling ================ */

/* Center the container using flexbox */
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Style the login form */
.login-form {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Center the login heading and form elements */
.login-form h1 {
  text-align: center;
  margin-bottom: 20px;
}

.login-form p {
  margin: 10px 0;
}

/* Input styling */
.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="submit"] {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  box-sizing: border-box;
}

.login-form input[type="submit"] {
  background-color: #4CAF50;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.login-form input[type="submit"]:hover {
  background-color: #45a049;
}

/* Error message styling */
.error {
  color: red;
  text-align: center;
}
