body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, sans-serif;
    background-color: #fff;
    color: #000;
    margin: 0;
    padding: 0;
}

.sidebar {
    width: 60px;
    height: 100vh;
    background-color: #fff;
    transition: width 0.3s ease;
    overflow: hidden;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar.expanded {
    width: 250px;
    box-shadow: 0px 0px 5px #000000;
}

.arrow {
    font-size: 24px;
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.sidebar.expanded .arrow {
    transform: rotate(180deg);
}

.sidebar-content {
    width: 200px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar.expanded .sidebar-content {
    opacity: 1;
}

.sidebar h2 {
    color: #275d29;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #000000;
    text-decoration: none;
}

.sidebar ul li a.active {
    color: #275d29;
    font-weight: bold;
}

.actionButtons button {
    width: 100%;
    margin-top: 10px;
}

.arrow {
    cursor: default;
}

.expander {
    cursor: pointer !important;
}

.main-content {
    flex-grow: 1;
    margin-left: 60px;
    /* transition: margin-left 0.3s ease; */
}

/* .sidebar:hover + .main-content {
    margin-left: 250px;
} */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 20vh;
}

h1 {
    text-align: center;
    color: #275d29;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #275d29;
    background-color: #ffffff;
    color: #000;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #275d29;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

#chat-messages {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #275d29;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #ffffff;
}

.message {
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 5px;
    color: #000000;
    display: flex;
    flex-direction: row;
}

button#logout-btn {
    margin-top: 10px;
    background-color: #d32f2f;
}

header a {
    display: inline;
    margin: 5px;
}

button#logout-btn:hover {
    background-color: #f93939;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    color: white;
    justify-content: center;
    align-items: center;
}

.popup-content {
    width: 50%;
    height: 50%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.popup-buttons {
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    margin-top: 10px;
    width: 100%;
}

.popup-buttons button#nvmd {
    background-color: #d32f2f;
    margin-right: 5px;
}

.popup-buttons button.conf {
    margin-left: 5px;
}

.popup-buttons button#nvmd:hover {
    background-color: #f93939;
    transition: 500ms;
}

.popup-buttons button {
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: 500ms;
}

.popup-buttons button:hover {
    filter: brightness(0.5);
    transition: 500ms;
}

.invite-emailInputContainer {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    margin-top: 5px;
}

input.invite-emailInput,
.invite-emailInputFaux {
    width: 100%;
    border: 1px solid #275d29;
    box-sizing: border-box;
    padding: 5px;
    font-size: 14px;
    height: 36px;
    margin: 0px;
}

.invite-emailInputFaux {
    border: 1px solid transparent;
}

.invite-emails {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: left;
}

.invite-remove {
    margin-left: 5px;
    cursor: pointer;
    width: 50px;
    background-color: #d32f2f;
}

.invite-remove:hover {
    background-color: #f93939;
}

.invite-add {
    width: 50px;
    align-self: flex-end;
    background-color: #1a6bbc;
    /* Dodger Blue */
}

.invite-add:hover {
    background-color: #1e90ff;
}

.invite-box button.invite-send {
    margin-top: 5px;
    background-color: #275d29;
}

.invite-box button.invite-send:hover {
    background-color: #45a049;
}

input:focus {
    outline: none;
}

.bottomActions {
    display: flex;
    flex-direction: row;
}

.bottomActions button {
    margin: 2px !important;
}

.profile-picture {
    width: 25px;
    border-radius: 50%;
    height: 25px;
    object-fit: cover;
}

.message-header {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.author-time {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    box-sizing: content-box;
    margin-left: 10px;
}

.message-content {
    width: 100%;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* General Layout */
    .container {
        padding: 10px;
        margin: 0px;
        margin-top: 100px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .hamburger {
        order: -1;
    }

    /* Sidebar Modifications */
    .sidebar {
        width: 0;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        background-color: #fff;
        z-index: 8000;
        transition: width 0.3s ease;
    }

    .sidebar.active {
        width: 80%;
        box-shadow: 0px 0px 5px #000000;
        z-index: 8000;

    }

    .sidebar-content {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }
    .sidebar.active .arrow{
        display: none;
    }
    .sidebar.active .sidebar-content {
        opacity: 1;
    }


    /* Main Content Adjustments */
    .main-content {
        margin-left: 0;
    }

    /* Chat Interface */
    #chat-messages {
        height: 55vh;
        margin-bottom: 15px;
    }

    .message {
        padding: 8px;
    }

    .message-header {
        flex-direction: column;
    }
    .message-text{
        margin-left: 10px;
    }

    .author-time {
        flex-direction: column;
        margin: 0px;
        font-style: italic
    }

    /* Form Elements */
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    button {
        padding: 12px;
        font-size: 16px;
    }

    /* Popup Modifications */
    .popup-content {
        width: 90%;
        height: auto;
        padding: 20px;
    }

    .popup-buttons {
        flex-direction: column;
    }

    .popup-buttons button {
        margin: 5px 0;
    }

    /* Invite Box Modifications */
    .invite-emailInputContainer {
        flex-direction: column;
    }

    .invite-add,
    .invite-remove {
        width: 100%;
        margin: 5px 0;
    }

    .bottomActions {
        flex-direction: column;
    }

    .bottomActions button {
        margin: 5px 0 !important;
        width: 100%;
    }

    /* Profile Picture */
    .profile-picture {
        width: 35px;
        height: 35px;
    }

    form{
        width: 100%;
        max-height: 20%;
    }
}

/* Additional styles for very small screens */
@media screen and (max-width: 320px) {
    .container {
        padding: 5px;
    }

    h1 {
        font-size: 1.5em;
    }

    .popup-content {
        width: 95%;
    }
}