table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid black;
  padding: 8px;
  text-align: left;
}

img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

h1 {
    color: #2c3e50;
    text-align: center;
}

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="email"],
input[type="file"],
input[type="url"],
input[type="text"],
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"] {
    background-color: #3498db;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

input[type="submit"]:hover {
    background-color: #2980b9;
}

#urlInputSection,
#fileUploadSection {
    margin-bottom: 15px;
}

#gradesResult table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#gradesResult th, #gradesResult td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#gradesResult th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#gradesResult tr:nth-child(even) {
    background-color: #f9f9f9;
}

#gradesResult td:nth-child(2) {
    max-width: 300px;
    word-wrap: break-word;
}

#viewGradesButton {
    margin-left: 10px;
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#viewGradesButton:hover {
    background-color: #45a049;
}

#message {
    position: fixed;
    top: 60px; /* Adjust this value based on your topbar height */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    color: white;
    font-weight: bold;
    max-width: 80%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#message.success {
    background-color: #4CAF50; /* Green */
}

#message.error {
    background-color: #f44336; /* Red */
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.login-container h1 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
}

#loginForm {
    margin-top: 20px;
}

#loginForm div {
    margin-bottom: 20px;
}

#loginForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
}

#loginForm input[type="email"],
#loginForm input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    height: 40px; /* Set a fixed height */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#loginForm input[type="email"]:focus,
#loginForm input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

#loginForm input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 40px; /* Set a fixed height */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#loginForm input[type="submit"]:hover {
    background-color: #2980b9;
}

#message {
    display: none;
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

.upload-button:hover {
    background-color: #45a049;
}

.upload-button:active {
    background-color: #3e8e41;
}

#uploadForm {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f2f2f2;
    border-radius: 5px;
}

#uploadForm div {
    margin-bottom: 15px;
}

#uploadForm label {
    display: block;
    margin-bottom: 5px;
}

#uploadForm select,
#uploadForm input[type="file"],
#uploadForm input[type="url"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    color: white;
    font-weight: bold;
}

#message.success {
    background-color: #4CAF50; /* Green */
}

#message.error {
    background-color: #f44336; /* Red */
}

.topbar {
    background-color: #3498db;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
}

.nav-button {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    font-size: 16px;
    cursor: pointer;
    background-color: transparent;
}

.nav-button:hover, .nav-button.active {
    background-color: #2980b9;
}

.content {
    margin-top: 60px; /* Adjust this value based on the height of your topbar */
    padding: 20px;
}

/* Update the body style to remove the max-width constraint */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* Center the form and content */
#uploadForm, .content > h1, #gradesResult {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.button-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.upload-button, .show-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    color: white;
    width: 90px;
    text-align: center;
}
.upload-button {
    background-color: #5cb85c;
}
.show-button {
    background-color: #337ab7;
    margin: 4px 2px;
}
.upload-button:hover {
    background-color: #4cae4c;
}
.show-button:hover {
    background-color: #286090;
}
.show-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}