body {
    font-family: 'Arial', sans-serif;
    background-color: #fafafa; /* Light background */
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #2e5e2e; /* Pine green */
    color: white;
    padding: 2em 1em;
    text-align: center;
    background-image: url('../images/pine_tree.jpg');
    background-size: cover;
    background-position: center;
}

header h1 {
    margin: 0;
    font-size: 3em;
    font-weight: bold;
}

header p {
    margin: 0.5em 0 0;
    font-size: 1.2em;
}

nav {
    background-color: #ffffff; /* White background */
    padding: 1em;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #4CAF50; /* Green */
    margin: 0 1em;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover,
nav a.active {
    text-decoration: underline;
    text-decoration-color: #4CAF50;
    text-decoration-thickness: 2px;
}

nav .login-btn {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 0.5em 1em;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

nav .login-btn:hover {
    background-color: #45a049;
}

main {
    margin: 2em 1em;
    padding: 1em;
}

.content-section {
    display: flex;
    gap: 2em;
    flex-wrap: wrap;
}

.content-left {
    flex: 1;
    background-color: #E0E0E0; /* Gray background */
    padding: 2em;
    border-radius: 4px;
    min-width: 300px;
}

.content-left h2 {
    font-size: 2em;
    margin-top: 0;
    border-bottom: 2px solid #4CAF50; /* Green underline */
    padding-bottom: 0.5em;
}

.content-left p {
    line-height: 1.6;
    margin: 1em 0;
}

.content-right {
    flex: 1;
    background-color: #E8F5E9; /* Light green background */
    padding: 2em;
    border-radius: 4px;
    text-align: center;
    min-width: 300px;
}

.content-right .pine-icon {
    font-size: 2em;
    color: #4CAF50; /* Green */
    margin-bottom: 0.5em;
}

.content-right p {
    line-height: 1.6;
}

.buttons {
    margin-top: 1em;
    display: flex;
    gap: 1em;
}

.btn {
    padding: 0.75em 1.5em;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.btn-learn {
    background-color: #4CAF50; /* Green */
    color: white;
}

.btn-learn:hover {
    background-color: #45a049;
}

.btn-join {
    background-color: #2196F3; /* Blue */
    color: white;
}

.btn-join:hover {
    background-color: #1e88e5;
}

footer {
    background-color: #5e5e5e; /* Mountain gray */
    color: white;
    text-align: center;
    padding: 1em;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.upload-form {
    margin-bottom: 2em;
    padding: 1em;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.upload-form input[type="file"],
.upload-form textarea {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.file-table {
    width: 100%; /* Span full width of parent (main) */
    border-collapse: collapse;
    margin-top: 1em;
    table-layout: auto; /* Dynamic column widths based on content */
}

.file-table th,
.file-table td {
    padding: 0.75em;
    border: 1px solid #ddd;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 150px; /* Prevent columns from collapsing too small */
}

.file-table th {
    background-color: #2196F3; /* Blue (updated to match reference) */
    color: white;
}

.file-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.file-table tbody tr:hover {
    background-color: #e9ecef;
}

.file-table a {
    color: #4CAF50; /* Green (updated to match reference) */
    text-decoration: none;
}

.file-table a:hover {
    text-decoration: underline;
}

.actions {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-top: 0.5em;
}

.edit-form label {
    font-weight: bold;
}

.edit-form input,
.edit-form textarea {
    width: 100%;
    padding: 0.3em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button, input[type="submit"] {
    background-color: #4CAF50; /* Green (updated to match reference) */
    color: white;
    border: none;
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: 1em;
    border-radius: 4px;
    transition: background-color 0.3s;
}

button:hover, input[type="submit"]:hover {
    background-color: #45a049;
}

.info-btn {
    background-color: #5e5e5e; /* Mountain gray */
    padding: 0.3em 0.6em;
    font-size: 0.9em;
}

.info-btn:hover {
    background-color: #4b4b4b;
}

.edit-toggle-btn {
    background-color: #2196F3; /* Blue (updated to match reference) */
}

.edit-toggle-btn:hover {
    background-color: #1e88e5;
}

.delete-btn {
    background-color: #d9534f; /* Red for delete */
}

.delete-btn:hover {
    background-color: #c9302c;
}

.edit-btn {
    background-color: #2196F3; /* Blue (updated to match reference) */
}

.edit-btn:hover {
    background-color: #1e88e5;
}

.message {
    padding: 1em;
    margin-bottom: 1em;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Styles for home page table editor */
.table-editor {
    margin-top: 2em;
}

.table-editor h4 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.home-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.home-table th,
.home-table td {
    padding: 0.75em;
    border: 1px solid #ddd;
    text-align: left;
}

.home-table th {
    background-color: #2196F3; /* Blue (updated to match reference) */
    color: white;
}

.home-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.home-table tbody tr:hover {
    background-color: #e9ecef;
}

.home-image,
.table-image {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}