/* Basic Reset */
body, h2, input, button, label, span, p {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Style */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Header Styles */
header {
    background-color: #003366; /* Header background color */
    color: #ffffff; /* Text color */
    padding: 15px 20px; /* Padding for the header */
    width: 100%; /* Full width */
    position: fixed; /* Fixed position */
    top: 0; /* Align to the top */
    left: 0; /* Align to the left */
    z-index: 1000; /* Ensure it's above other content */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

nav {
    display: flex; /* Flexbox for layout */
    justify-content: space-between; /* Space out the nav items */
    align-items: center; /* Center items vertically */
}

nav a {
    color: #ffffff; /* Link color */
    text-decoration: none; /* Remove underline */
    margin: 0 10px; /* Margin between links */
    font-size: 16px; /* Font size for links */
}

nav a:hover {
    text-decoration: underline; /* Underline on hover */
}

.logout-button {
    background-color: #ff0000; /* Logout button color */
    padding: 10px 15px; /* Button padding */
    border-radius: 4px; /* Rounded corners */
    color: #ffffff; /* Text color */
}



/* Container Style */
.container {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 350px;
    max-width: 100%;
    border: 1px solid #ddd;
}

/* Title Style */
h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #003366;
    font-size: 24px;
}

/* Form Input and Label Style */
label {
    display: block;
    margin-bottom: 5px;
    color: #333333;
}

/* Specific style for text and email inputs */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

/* Error styling for inputs */
input[type="text"].error,
input[type="password"].error,
input[type="email"].error {
    border-color: #ff0000;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #003366;
    outline: none;
}

/* Button Style */
button {
    width: 100%;
    padding: 12px;
    background-color: #003366;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #002244;
}

/* Error Message Style */
.error-message {
    color: #ff0000;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Register Prompt Style */
.success-message {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}


.register-prompt {
    text-align: center;
    margin-top: 20px; /* Increased margin to create more space */
}

.register-link {
    color: #003366;
    text-decoration: none;
}

.register-link:hover {
    text-decoration: underline;
}

/* Sign In Button Style */
.signin-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #003366;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
}

.signin-button:hover {
    background-color: #002244;
}

/* Dashboard Page Styles */

/* Dashboard Page Styles */

/* Container Style */
.dashboard-container {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 600px;
    max-width: 100%;
    border: 1px solid #ddd;
    margin: 20px auto; /* Center the container horizontally */
}

/* Title Style */
.dashboard-title {
    margin-bottom: 20px;
    text-align: center;
    color: #003366;
    font-size: 24px;
}

/* Course Selection Style */
.course-selection {
    margin-bottom: 20px;
}

.course-selection h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #003366;
}

.course-selection label {
    display: flex; /* Use flexbox for side-by-side layout */
    align-items: center; /* Align checkbox and text vertically */
    margin-bottom: 10px; /* Spacing between each checkbox-label pair */
    color: #333333;
}

.course-selection input[type="checkbox"] {
    margin-right: 10px; /* Space between checkbox and label text */
    display: inline-block; /* Ensure checkbox is inline */
    vertical-align: middle; /* Align with text */
    margin-top: -10px;
}

.course-selection span {
    display: inline-block; /* Ensure the text aligns with the checkbox */
    vertical-align: middle; /* Align with checkbox */
}

/* Enroll and Logout Buttons Container */
.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Enroll Button Style */
.enroll-button {
    padding: 12px 20px;
    background-color: #003366;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.enroll-button:hover {
    background-color: #002244;
}

/* Logout Link Style */
.logout-link {
    padding: 12px 20px;
    background-color: #003366;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.logout-link:hover {
    background-color: #002244;
}

/* Error Message Style */
.dashboard-error {
    color: #ff0000;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Success Message Style */
.dashboard-success {
    color: #00ff00;
    font-size: 14px;
    margin-bottom: 10px;
}



/* Ensure logout button is visible */
.logout-button {
    display: inline-block; /* Make sure it's not hidden */
    padding: 12px;
    background-color: #003366;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.logout-button:hover {
    background-color: #002244;
}

/* My Courses Page Styles */

/* Container Style */
.my-courses-container {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 600px;
    max-width: 100%;
    border: 1px solid #ddd;
    margin: 20px auto; /* Center the container horizontally */
}

/* Title Style */
.my-courses-title {
    margin-bottom: 20px;
    text-align: center;
    color: #003366;
    font-size: 24px;
}

/* Course List Style */
.course-list {
    list-style-type: none;
    padding-left: 0;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.course-name {
    color: #333333;
}

/* Delete Button Style */
.delete-form {
    margin: 0;
}

.delete-button {
    padding: 6px 12px;
    background-color: #cc0000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #990000;
}

/* No Courses Message */
.no-courses-message {
    text-align: center;
    color: #333333;
    margin-top: 20px;
}

/* Add More Button Style */
.add-more-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #003366;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.add-more-button:hover {
    background-color: #002244;
}

.view-button {
    background-color: #0066cc;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    margin-right: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.view-button:hover {
    background-color: #004d99;
}
.buttons-del-view {
    display: flex;
    gap: 10px;
  }

  /* Container for the course details page */
.course-details-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Title of the course */
.course-details-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Course description */
.course-details-description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Course credits */
.course-details-credits {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

/* Course instructor */
.course-details-instructor {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

/* Back button to return to My Courses page */
.back-to-courses-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.back-to-courses-button:hover {
    background-color: #0056b3;
}
