body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Add some basic styling to the table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

th {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #f5f5f5;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Style for table header links */
th a {
    color: inherit;
    /* Use the default text color */
    text-decoration: none;
}

th a:hover {
    color: #555;
    /* Slightly darken on hover */
    text-decoration: none;
}

th a.current.asc::after {
    content: " \25B2";
}

th a.current.desc::after {
    content: " \25BC";
}

/* Project List and Card Styling */
.project-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0366d6;
}

.project-card p {
    margin-bottom: 5px;
    line-height: 1.5;
}

.project-card p strong {
    color: #586069;
}

.project-card a {
    word-break: break-all;
    /* Ensures long URLs wrap */
}

/* Sorting Controls Wrapper */
.sort-controls-wrapper {
    text-align: right;
    /* Center the inline-block sort-dropdown */
    margin-bottom: 20px;
}

/* Sorting Dropdown */
.sort-dropdown {
    display: inline-block;
    /* Make it inline-block to be centered by text-align on parent */
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
}

/* Voting Buttons */
.voting-buttons {
    display: inline-flex;
    flex-direction: column;
    margin-right: 10px;
}

.vote-up,
.vote-down {
    background: none;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px 0;
    cursor: pointer;
    font-size: 1em;
}

.vote-up:hover,
.vote-down:hover {
    background-color: #f5f5f5;
}

.vote-up:active,
.vote-down:active {
    background-color: #e9ecef;
}

.sort-dropdown select {
    padding: 8px 12px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    background-color: #fff;
    font-size: 1em;
    cursor: pointer;
    margin-left: 10px;
    margin-bottom: 10px;
    /* Add space between the two dropdowns */
}

.sort-dropdown select:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.2);
}

/* Modern Nav Bar Styling */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #282c34;
    /* Dark background */
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.nav-brand .nav-link {
    color: #61dafb;
    /* Light blue for brand link */
    font-size: 1.5em;
    /* Larger font size for brand */
    font-weight: bold;
    text-decoration: none;
}

.nav-brand .nav-link:hover {
    color: #ffffff;
    /* White on hover */
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    /* Space between links */
}

.nav-link {
    color: #61dafb;
    /* Light blue for links */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
    /* White on hover */
    text-decoration: none;
}

.nav-auth {
    display: flex;
    gap: 15px;
}

.nav-button {
    background-color: #61dafb;
    /* Light blue button */
    color: #282c34;
    /* Dark text for button */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-button:hover {
    background-color: #ffffff;
    /* White on hover */
    color: #282c34;
}

/* Form Styling */
.form-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.form-container h2 {
    color: #282c34;
    margin-bottom: 25px;
    font-size: 2em;
}

.modern-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.modern-form label {
    display: block;
    margin-bottom: 8px;
    color: #586069;
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5da;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #61dafb;
    box-shadow: 0 0 0 3px rgba(97, 218, 251, 0.3);
}

.form-links {
    margin-top: 25px;
}

.form-link {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.form-link:hover {
    color: #0366d6;
    text-decoration: underline;
}

.error-messages {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ef9a9a;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.error-messages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-messages li {
    margin-bottom: 5px;
}