/* Dark mode styles with low contrast for eye care */
body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

h1, h2 {
    color: #f0f0f0;
    margin-bottom: 20px;
}

a {
    color: #b0b0b0;
    text-decoration: none;
}

a:hover {
    color: #d0d0d0;
}

/* Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    background-color: #2a2a2a;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar nav a {
    padding: 12px 15px;
    background-color: #333;
    border-radius: 5px;
    transition: background-color 0.3s;
    text-align: center;
}

.sidebar nav a:hover {
    background-color: #555;
}

.close-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: #e0e0e0;
    cursor: pointer;
    z-index: 1001;
}

.close-btn:hover {
    color: #fff;
}

.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: 0.3s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.hamburger.open span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}

.overlay.show {
    display: block;
}

/* Mobile styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .sidebar {
        width: 200px;
        transform: translateX(-100%);
    }

    .close-btn {
        display: block;
    }

    .sidebar nav {
        margin-top: 40px; /* Space for close button */
    }

    .main-content h1 {
        padding-left: 60px; /* Avoid hamburger overlap */
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .page-container {
        display: flex;
        min-height: 100vh;
    }

    .sidebar {
        width: 250px;
        min-height: 100vh;
        position: static;
        flex-shrink: 0;
        background-color: #1a1a1a;
        border-right: 1px solid #333;
        box-shadow: none;
        z-index: auto;
    }

    .main-content {
        flex: 1;
        padding: 20px;
        background-color: #1a1a1a;
    }

    .hamburger {
        display: none;
    }

    .overlay {
        display: none;
    }
}

/* Sections */
.section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Forms */
form {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form label {
    font-weight: bold;
    color: #c0c0c0;
}

form input, form select, form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #333;
    color: #e0e0e0;
    font-size: 16px; /* Prevent zoom on mobile */
}

form input[type="submit"] {
    background-color: #444;
    cursor: pointer;
    transition: background-color 0.3s;
}

form input[type="submit"]:hover {
    background-color: #666;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

th, td {
    border: 1px solid #444;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #333;
    color: #f0f0f0;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #222;
}

tr:hover {
    background-color: #3a3a3a;
}

/* Links in tables */
td a {
    color: #a0a0a0;
    margin-right: 10px;
}

td a:hover {
    color: #c0c0c0;
}

/* Lists */
ul {
    padding-left: 20px;
}

li {
    margin-bottom: 5px;
}

/* Back links */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    nav {
        flex-direction: column;
    }

    nav a {
        text-align: center;
    }

    .section {
        padding: 15px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px;
    }

    /* Make tables scrollable on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    form {
        gap: 10px;
    }

    form input, form select, form textarea {
        font-size: 16px;
    }
}

/* Autocomplete container */
.autocomplete-container {
    position: relative;
    display: block;
    width: 100%;
}

/* Autocomplete suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #444;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #3a3a3a;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Additional mobile adjustments */
@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    nav a {
        padding: 8px 12px;
        font-size: 14px;
    }
}