.top-bar {
    display: flex;
    flex-direction: row;
    background-color: #3d3d3d;
    align-items: center;
    color: white;
    border-bottom: 1px solid #bbb;
    height: 60px;
}

/* Left: time + mobile buttons */
.header-left {
    display: flex;
    margin-left: 10px;
}

.header-date-time {
    color: white;
    font-weight: 600;
    height: fit-content;
    font-size: 12pt;
}

/* Right: user menu */
.header-right {
    position: absolute;
    margin-left: 20px;
    top: 0;
    right: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.username {
    color: #8a8a8a;
    margin-left: 4px;
    font-weight: 600;
    font-size: 1.1em;
}

/* Logo styling */
.title-image {
    max-width: 600px;
    width: 35%;
    margin-left: 10px;
    margin-right: 10px;
    height: auto;
}

.title-mobile {
    display: none;
    margin-right: 100px;
}

.status {
    color: #bbb;
    font-size: .9em;
}

/* Navigation bar */
#main-nav {
    display: flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: auto;
    padding-right: 140px;
    gap: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 200px;
    padding: 10px;
    z-index: 10;
    margin-top: 0;
    right: 0;
    border: 1px solid #00e3ea;
}

.dropdown-menu a {
    display: block;
    padding: 8px;
    color: #00e3ea;
    text-decoration: none;
    border-radius: 4px;
}

.dropdown-menu a:hover {
    background-color: #444;
}

.avatar-dropdown:hover .dropdown-menu {
    display: block;
}

#main-nav a {
    background-color: transparent;
    color: #bbb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    text-align: center;
    max-height: 32px;
    padding: 2px;
    font-weight: 600;
    transition: color 0.2s ease;
}

#main-nav a:hover {
    color: #00e3ea;
}

/* Notification drawer */
.notif-drawer {
    position: absolute;
    right: -50px;
    top: 40px;
    width: 300px;
    max-height: 400px;
    overflow: auto;
    background: #1a1a1a;
    color: white;
    border: 2px solid #00e3ea;
    border-radius: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    z-index: 5;
    padding: 10px;
    display: none;
}

.notif-drawer .notif-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 10px;
}

.clear-notifs {
    background-color: transparent;
    padding: 2px 5px;
    color: white;
    border: 1px solid #00e3ea;
    transition: background-color 0.2s ease;
}

.clear-notifs:hover {
    background-color: #bbb;
}

.notif-drawer .placeholder {
    opacity: 0.6;
    text-align: center;
    padding: 20px;
}

.notif-drawer.show {
    display: block;
}

.notif-content {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px; /* spacing between messages */
}

.notif-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #1a1a1a;
    padding: 10px;
    border: 2px solid #bbb;
    border-radius: 4px;
    font-size: 0.95rem;
    word-wrap: break-word;
    transition: background-color 0.2s ease;
}

.notif-item:hover {
    background-color: #000;
}

.notif-message-content {
    margin-top: 5px;
}

.timestamp {
    font-size: .8em;
    font-weight: 1;
    margin-top: 5px;
    margin-left: 5px;
    color: #bbb
}

/* User navigation */
.user-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 6px;
    margin-right: 0;
    border-radius: 12px;
}

.user-link {
    color: #00e3ea;
    text-decoration: none;
    font-size: .8em;
    margin-top: 0;
    padding: 2px 6px;
    cursor: pointer;
    background-color: #1a1a1a;
}

.user-link:hover {
    color: #c7c7c7;
    background-color: #555;
}

.avatar-inline {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
}

#onlineBtn {
    font-size: 2em;
    background-color: transparent;
    padding: 0;
    margin-bottom: 10px;
}

#onlineDrawer {
    display: none;
    position: fixed;
    right: 30px;
    top: 60px;
    width: fit-content;
    background-color: #1a1a1a;
    border: 1px solid #00e3ea;
    border-radius: 24px;
    padding: 18px;
    box-shadow: -2px 0 5px black;
    z-index: 1000;
}

#onlineUserList,
#offlineUserList {
    list-style-type: none;
    padding-left: 0;
    padding-top: 0;
    margin: 0;
}

#onlineUserList {
    margin-bottom: 12px;
}

.user-status {
    color: #888;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 0;
    padding-bottom: 0;
    margin: 0;
}

/* ========== Mobile Controls ========== */


.directory-button,
.hamburger-icon {
    display: none;
}

#mobile-nav {
    display: none;
    position: absolute;
    font-size: 1em;
    top: 45px;
    left: 0;
    padding: 10px;
    background-color: #111;
    border: 1px solid #444;
    border-radius: 10px;
    max-width: 300px;
    z-index: 1000;
    flex-direction: column;
    gap: 10px;
}

#mobile-nav a:hover {
    color: white;
    background-color: #444;
}

#mobile-directory {
    display: none;
    position: absolute;
    font-size: 1em;
    top: 45px;
    left: 110px;
    padding: 20px;
    background-color: #111;
    border: 1px solid #444;
    border-radius: 10px;
    max-width: 400px;
    z-index: 1000;
    flex-direction: column;
    gap: 10px;
}

#mobile-directory ul {
    list-style: none;
    padding-left: 0;
}

#mobile-directory a:hover {
    color: white;
    background-color: #444;
}

#mobile-directory.show,
#mobile-nav.show {
    display: flex;
}

.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgb(60 60 60 / 90%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
}

.toast-message.show {
    display: block;
    opacity: 1;
    bottom: 40px;
}

/* ========== Responsive Adjustments (≤ 768px) ========== */
@media (width <= 768px) {
    .header-date-time,
    #main-nav a {
        display: none;
    }

    .title-image {
        display: none;
    }

    .title-mobile {
        display: flex;
        align-items: center;
        margin: 0 auto;
        margin-right: 40px;
        font-size: 1.6em;
        font-weight: 600;
        color: black;
    }
    
    .mobile-nav-buttons {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 5px;
        padding: 0;
    }

    .user-nav {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
        padding: 0;
    }

    #onlineBtn {
        margin-bottom: 0;
    }

    .directory-button,
    .hamburger-icon {
        display: flex;
        background-color: #1a1a1a;
        color: white;
        border: none;
        padding: 8px 18px;
        border-radius: 24px;
        cursor: pointer;
    }

    .directory-button:hover,
    .hamburger-icon:hover {
        background-color: #444;
    }

