:root {
    --primary-color: #1e2f42;
    /* A deeper and slightly warmer dark blue for primary elements */
    --secondary-color: #34495e;
    /* A more vibrant and slightly lighter blue for secondary elements */
    --accent-color: #4f94cc;
    /* A more lively and brighter blue for accent elements */
    --text-color: #f0f0f0;
    /* Off-white for text to reduce harshness and improve readability */
    --border-color: #455a6f;
    /* A bluer and more pronounced hue for borders */
    --lighter-color: #637c91;
    /* A gentler and slightly warmer tone for lighter areas */
    --reaction-color: #fff;
    --red: rgb(255, 125, 125);
}

[data-theme="light"] {
    --primary-color: #5e8db8;
    /* A soft and calming blue for primary elements */
    --secondary-color: #7da4cd;
    /* A lighter, serene blue for secondary elements */
    --accent-color: #a3c4e4;
    /* An even lighter, soothing blue for accent elements */
    --text-color: #000;
    /* A dark grey for text, offering good contrast without being too harsh */
    --border-color: #b8cde0;
    /* A very light blue for borders, subtle and unobtrusive */
    --lighter-color: #d3e1f0;
    /* A very light, almost white blue for lighter areas */
    --reaction-color: #1e2f42;
    /* A contrasting dark color for interactive or highlighted elements */
    --red: rgb(207, 0, 0);
}

[data-theme="meower"] {
    --primary-color: #fff;
    /* A soft and calming blue for primary elements */
    --secondary-color: #f9a636;
    /* A lighter, serene blue for secondary elements */
    --accent-color: #ffce8c;
    /* An even lighter, soothing blue for accent elements */
    --text-color: #000;
    /* A dark grey for text, offering good contrast without being too harsh */
    --border-color: #ffce8c;
    /* A very light blue for borders, subtle and unobtrusive */
    --lighter-color: #ffce8c;
    /* A very light, almost white blue for lighter areas */
    --reaction-color: #000;
    /* A contrasting dark color for interactive or highlighted elements */
    --red: rgb(207, 0, 0);
}

[data-theme="blaze"] {
    --primary-color: #fff;
    /* A soft and calming blue for primary elements */
    --secondary-color: #000000;
    /* A lighter, serene blue for secondary elements */
    --accent-color: #FF6F04;
    /* An even lighter, soothing blue for accent elements */
    --text-color: #dbdbdb;
    /* A dark grey for text, offering good contrast without being too harsh */
    --border-color: #FF6F04;
    /* A very light blue for borders, subtle and unobtrusive */
    --lighter-color: #FF6F04;
    /* A very light, almost white blue for lighter areas */
    --reaction-color: #fff;
    /* A contrasting dark color for interactive or highlighted elements */
    --red: rgb(255, 0, 0);
}

@font-face {
    font-family: 'varela';
    src: url('VarelaRound-Regular.ttf') format('truetype');
    /* Add additional font formats if necessary */
}

html {
    background-color: var(--primary-color);
}

body {
    margin: 0 auto;
    font-family: 'varela', Arial, sans-serif;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    color: var(--text-color);
    /* Prevents horizontal scroll */
}

a {
    color: var(--lighter-color);
    text-decoration: none;
}

/** navigation styles **/

nav {
    background-color: var(--secondary-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    left: 0;
    z-index: 99;
}

.nav-items {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 15px;
}


nav .secondary {
    margin-top: 5px;
    margin-bottom: 0px;
    /* Adds space between the two rows */
}

.nav-item {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.nav-item:hover {
    transform: scale(1.1);
    /* Enlarge the icon slightly on hover/focus */
}

.nav-item:active {
    transform: scale(0.95);
    /* Subtle shrink effect when clicked */
}

.nav-item.focused {
    background-color: var(--primary-color);
}

nav .secondary a {
    padding: 10px;
    font-size: 18px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.open {
    color: var(--lighter-color)
}

nav img {
    height: 20px;
}

.logo {
    position: absolute;
    top: 15px;
    left: 0;
}

/* Example media query for screens smaller than 600px */
@media (max-width: 600px) {
    .logo {
        display: none;
    }
}

button {
    color: var(--text-color);
    font-family: 'varela', Arial, sans-serif;
    transition: background-color 0.3s ease;
}

h2,
h3 {
    margin: 0;
    margin-top: 15px;
    margin-bottom: 5px;
    padding: 0;
    color: var(--text-color);
    font-family: 'varela', Arial, sans-serif;
}


/** post creation styles **/

textarea {
    min-height: 100px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-color);
    /* Replace #yourColor with the color code you want */
    opacity: 0.6;
    /* Ensure the color is not partially transparent */
}



textarea,
.post-maker input {
    width: 100%;
    margin-bottom: 5px;
    margin-top: 5px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'varela', Arial, sans-serif;
    max-width: 900px;
}

input,
textarea {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    /* Include padding and border in the width */
    background-color: var(--primary-color);
    /* Set textarea background */
    color: var(--text-color);
    /* Set textarea text color */
    font-family: 'varela', Arial, sans-serif;
    font-size: 16px;
}

#colorPicker {
    padding: 5px;
    border-radius: 4px;
    height: 42px;
}

.formatting-buttons {
    text-align: center;
    margin-bottom: 5px;
}

.formatting-buttons button {
    margin-bottom: 5px;
    margin-right: 5px;
    background-color: var(--lighter-color);
    /* Set button background */
    color: var(--text-color);
    /* Set button text color */
}

.post-maker {
    background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding: 10px;
    position: fixed;
    bottom: 0;
    text-align: center;
}

button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: var(--accent-color);
}

.post-maker {
    left: 0;
    right: 0;
    position: fixed;
}

/** post styles **/

main {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.sidebar-container {
    display: flex;
}

.sidebar {
    width: 20%;
    max-width: 300px;
    min-width: 110px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    display: flex;
    align-items: center; /* This will vertically center the contents */
    margin-top: 20px;
    background-color: var(--secondary-color);
    border-radius: 5px;
}


.sidebar a {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px;
    flex: 1; /* Flex-grow to fill the space */
    box-sizing: border-box; /* Include padding in width calculation */
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden; /* Hide text that overflows the container */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
}


.sidebar button {
    flex: 0;
    vertical-align: middle;
    align-items: center;
    background-color: var(--secondary-color);
}

.sidebar a:hover {
    color: var(--accent-color);
}

.sidebar .profile-pic {
    height: 30px;
    width: 30px;
    margin-left: 5px;
}

@media (max-width: 800px) {
    .sidebar .profile-pic {
        display: none;
    }
}


.post {
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-color);
}

.chat {
    padding: 15px;
    margin-top: 20px;
    /* Space between consecutive posts */
    width: calc(100% - 30px);
    /* Full width minus padding */
    box-sizing: border-box;
    /* Include padding in the width */
    color: var(--text-color);
}

.profile-pic {
    width: 50px;
    /* Adjust as needed */
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-info {
    display: inline-block;
    vertical-align: top;
}

.user-name {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-color);
}

.user-at-name {
    font-size: 0.8em;
    color: var(--lighter-color);
}

.post-header {
    display: flex;
    align-items: center;
}

.post-content {
    margin-top: 10px;
}

.post-actions {
    margin-top: 10px;
    text-align: left;
}

.action-button {
    margin-right: 10px;
    background-color: var(--lighter-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.action-icon {
    width: 15px;
    height: 15px;
    vertical-align: middle;
}

.action-button:hover {
    background-color: var(--accent-color);
}

.action-button i {
    vertical-align: middle;
}

/* Style for the dropdown button */

/* Container for the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown content hidden by default */
.dropdown-content {
    display: none;
    position: absolute;
    z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content button {
    margin: 5px;
    width: 100%;
}

/* Show the dropdown content on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
    background-color: var(--accent-color);
}

/* This will affect the scrollbar throughout the document */
::-webkit-scrollbar {
    width: 4px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--hover-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/** Modal styles here. Every pages uses them, so it makes sense to put them in global styles. **/

.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    /* This creates the slightly dark background */
    display: none;
    /* Initially hidden */
    justify-content: center;
    align-items: center;

    /* Hide scrollbar for Chrome, Safari and Opera */
    ::-webkit-scrollbar {
        display: none;
    }

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.modal-content {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: scroll;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
}


.execute-action {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-top: 0px;
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
}

#moderation-actions {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    margin-top: 0px;
    font-size: 16px;
    font-family: inherit;
    background-color: var(--input-bg-color);
    color: var(--text-color);
}

#username,
#announcement {
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    resize: none;
    font-family: inherit;
    background-color: var(--input-bg-color);
    color: var(--text-color);
}

#announcement {
    min-height: 40px;
}

select {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    appearance: none;
    /* Removes default styling provided by the browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    outline: none;
}

select:focus {
    border-color: var(--accent-color);
    /* Change border color */
    box-shadow: 0px 0px 5px var(--accent-color);
    /* Optional: Adds a glow effect */
}

/* You might also want to style the options */
option {
    background-color: var(--primary-color);
    /* Background of options */
    color: var(--text-color);
    /* Text color of options */
}

.toggle button {
    width: 35px;
}

.avatar img {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-right: 1em;
    border: 2px solid var(--primary-color);
}

.avatar {
    display: block;
    margin-bottom: 10px;
}

.profile-page .avatar {
    flex: 1;
}

.upload-avatar input[type="file"] {
    display: none;
}

.upload-avatar label {
    cursor: pointer;
}

/* some group settings styles */

.channel-settings {
    display: flex;
    align-items: center;
    align-items: stretch;
    gap: 10px;
}

.channel-settings input[type="text"],
.channel-settings input[placeholder="Channel Name"],
.channel-settings input[placeholder="Role Name"] {
    flex-grow: 1;
}

.channel-settings input[type="number"] {
    flex-grow: 0;
    flex-shrink: 0;
    width: 80px;
}

.friends {
    width: 100%;
    margin-top: 15px;
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 5px;
}

.friend {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}