/* General Reset */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f9;
  color: #333;
  line-height: 1.6;
}

/* Top Menu */
.top-menu {
  background-color: #003366; /* Dark blue from STB System */
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.top-menu a:hover {
  background-color: #0099cc; /* Light blue for hover */
}

.top-menu a.logout {
  background-color: #cc0000; /* Red for logout button */
}

.top-menu a.logout:hover {
  background-color: #a30000; /* Darker red for hover */
}

/* Centered Container */
.container {
  max-width: 800px;
  margin: 50px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #003366; /* Dark blue from STB System */
  border-bottom: 2px solid #cc0000; /* Red from STB System */
  padding-bottom: 10px;
}

label {
  font-size: 16px;
  font-weight: 600;
  color: #003366; /* Dark blue from STB System */
}

select {
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 10px;
  width: 100%;
  max-width: 200px;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease;
}

select:focus {
  border-color: #cc0000; /* Red from STB System */
  outline: none;
}

/* Directory Listing */
.directory-listing {
  margin: 20px 0;
  padding: 0;
  list-style-type: none;
}

.directory-listing a {
  display: block;
  padding: 10px;
  font-size: 16px;
  color: #0099cc; /* Light blue from STB System */
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.directory-listing a:hover {
  background-color: #e6f7ff; /* Very light blue for hover */
}

.directory-listing a[href="#"] {
  color: #7f8c8d;
  cursor: default;
}

.directory-listing a[href="#"]:hover {
  background-color: transparent;
}

/* File Listing */
.file-listing {
  margin: 20px 0;
  padding: 0;
  list-style-type: none;
}

.file-listing li {
  padding: 10px;
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #eee;
}

.file-listing li:last-child {
  border-bottom: none;
}

/* Parent Directory Link */
#parentdir-link {
  display: inline-block;
  margin: 10px 0;
  padding: 10px 20px;
  font-size: 16px;
  color: #fff;
  background-color: #cc0000; /* Red from STB System */
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 4px rgba(204, 0, 0, 0.2);
}

#parentdir-link:hover {
  background-color: #a30000; /* Darker red for hover */
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(204, 0, 0, 0.3);
}

/* Form Styling */
form {
  margin-top: 20px;
}

form input[type="file"] {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  width: 100%;
  max-width: 300px;
  margin-bottom: 10px;
}

form input[type="submit"] {
  padding: 10px 20px;
  font-size: 16px;
  color: #fff;
  background-color: #cc0000; /* Red from STB System */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
  background-color: #a30000; /* Darker red for hover */
}

/* Error Styling */
#errors {
  background-color: #ffe6e6; /* Light red background for errors */
  border: 1px solid #cc0000; /* Red border */
  border-radius: 4px;
  padding: 20px;
  margin-top: 20px;
}

#errorlist {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#errorlist li {
  padding: 10px;
  font-size: 16px;
  color: #cc0000; /* Red text for errors */
  border-bottom: 1px solid #ff9999; /* Light red border between errors */
}

#errorlist li:last-child {
  border-bottom: none;
}

/* Responsive Design */
@media (max-width: 600px) {
  .top-menu {
    padding: 10px;
  }

  .top-menu a {
    font-size: 14px;
    padding: 6px 12px;
  }

  .container {
    margin: 20px;
    padding: 15px;
  }

  h1 {
    font-size: 20px;
  }

  select {
    width: 100%;
  }

  .directory-listing a,
  .file-listing li {
    font-size: 14px;
  }

  #parentdir-link {
    font-size: 14px;
    padding: 8px 16px;
  }

  #errorlist li {
    font-size: 14px;
  }
}
