@font-face {
    font-family: 'Istok Web';
    src: url('/static/font/IstokWeb-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Istok Web';
    src: url('/static/font/IstokWeb-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary-color: #292D32;
    --secondary-color: #9A6C00;
    --background-gradient-start: #F3E7CB;
    --background-gradient-end: #E3E5E6;
    --white-transparent-60: rgba(255, 255, 255, 0.6);
    --white-transparent-70: rgba(255, 255, 255, 0.7);
    --white-transparent-80: rgba(255, 255, 255, 0.8);
    --highlight-color: #ffb300;
    --border-color: hsla(213, 10%, 18%, 0.1);
    --transparent-black-50: rgba(0, 0, 0, 0.5);
    --transparent-black-10: rgba(0, 0, 0, 0.1);
    --transparent-black-20: rgba(0, 0, 0, 0.2);
    --white: #fff;
    --error-color: red;
    --background-color-f4: #F4F4F4;
    --background-gradient-start-30: rgba(243, 231, 203, 0.3);
    --secondary-color-20: rgba(154, 108, 0, 0.2);
}

:root.theme-dark {
    --primary-color: #E1E1E1;
    --secondary-color: #FFB84D;
    --background-gradient-start: #1A1D21;
    --background-gradient-end: #2A2D32;
    --white-transparent-60: rgba(40, 44, 52, 0.6);
    --white-transparent-70: rgba(40, 44, 52, 0.7);
    --white-transparent-80: rgba(40, 44, 52, 0.8);
    --highlight-color: #FFD700;
    --border-color: hsla(213, 10%, 80%, 0.1);
    --transparent-black-50: rgba(0, 0, 0, 0.5);
    --transparent-black-10: rgba(255, 255, 255, 0.1);
    --transparent-black-20: rgba(255, 255, 255, 0.2);
    --white: #2A2D32;
    --error-color: #FF453A;
    --background-color-f4: #2C2C2C;
    --background-gradient-start-30: rgba(255, 184, 77, 0.15);
    --secondary-color-20: rgba(255, 184, 77, 0.2);
}

.sidebar {
    margin: 16px;
    width: calc(300px - 32px);
    height: calc(100% - 32px);
    position: fixed;
    left: -300px;
    top: 0;
    background-color: var(--white-transparent-70);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding-left: 4px;
    z-index: 10;
    padding-top: 16px;
    border: 1px solid var(--border-color);
}


.menu-item {
    display: flex;
    margin: 8px 16px 0px 16px;
    width: calc(100% - 32px);
    align-items: center;
    border-radius: 16px;
    height: 38px;
    left: 0;
    border: none;
    padding-left: 16px;
    position: relative;
    gap: 10px;
    font-size: 16px;
    color: var(--primary-color);
    background-color: transparent;
    transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item .menu-icon:not(svg) {
    background-color: var(--primary-color);
    width: 21px;
    height: 21px;
    transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-item-name {
    text-align: start;
    flex-grow: 1;
}

.sidebar-item-count {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
}

.menu-item .menu-icon:is(svg) path {
    stroke: var(--primary-color);
    transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item.selected .menu-icon:is(svg) path {
    stroke: var(--secondary-color);
}

.menu-item.selected {
    background-color: var(--background-gradient-start);
    color: var(--secondary-color);
}

.menu-item.selected .sidebar-item-name {
    color: var(--secondary-color);
}

.menu-item.selected .menu-icon:not(svg) {
    background-color: var(--secondary-color);
}

.menu-item:not(.selected) {
    cursor: pointer;
}

.menu-item:hover .sidebar-item-name {
    color: var(--secondary-color);
}

.menu-item:hover .sidebar-item-count {
    color: var(--secondary-color);
}

.menu-item:not(.selected):hover {
    left: 12px;
    color: var(--secondary-color);
}

.menu-item:hover .menu-icon:not(svg) {
    background-color: var(--secondary-color);
}

.menu-item:hover .menu-icon:is(svg) path {
    stroke: var(--secondary-color);
}

.no-animation {
    transition: none !important;
}

#username-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

#username-container {
    display: inline-block;
    position: relative;
    margin-right: 16px;
}

.username {
    font-size: 16px;
    color: var(--primary-color);
}

.dropdown-icon {
    border-radius: 8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-gradient-start);
    transition: .1s;
}

#username-container:hover .dropdown-icon {
    background-color: var(--highlight-color);
}

.istok-web-regular {
    font-family: "Istok Web", serif;
    font-weight: 400;
    font-style: normal;
}

.istok-web-black {
    font-family: "Istok Web", serif;
    font-weight: 900;
    font-style: normal;
}

.istok-web-bold {
    font-family: "Istok Web", serif;
    font-weight: 700;
    font-style: normal;
}
.dropdown-content {
    display: block;
    position: absolute;
    opacity: 0;
    transform: translateY(-10px);
    right: 0;
    width: 100%;
    background-color: var(--white-transparent-80);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    z-index: 10;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    visibility: hidden;
    min-width: 180px;
    pointer-events: none;
}

#username-container:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-content button {
    color: var(--primary-color);
    height: 36px;
    text-align: center;
    display: flex;
    width: calc(100% - 16px);
    align-items: center;
    margin: 8px;
    border-bottom: 1px solid var(--transparent-black-10);
    border-left: none;
    cursor: pointer;
    border-right: none;
    border-top: none;
    background-color: transparent;
    outline: none;
}

.submenu-container {
    position: relative;
    display: block;
}

.submenu-button {
    width: 100%;
    text-align: left;
    position: relative;
}

.submenu-button::after {
    content: '›';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.submenu {
    position: absolute;
    right: 100%;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 150px;
    background-color: var(--white-transparent-80);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 5px 0;
    z-index: 11;
}

.selected_lang {
    color: var(--secondary-color) !important;
}

.submenu-container:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-content a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content button:focus {
    border-bottom: 1px solid var(--transparent-black-10);
    outline: none;
}

.submenu button {
    text-align: left;
    justify-content: flex-start;
    padding-left: 15px;
}

body {
    height: 100dvh;
    background: linear-gradient(to top left, var(--background-gradient-start) 60%, var(--background-gradient-end) 100%);
    font-family: 'Istok Web', sans-serif;
    padding: 16px;
}

* {
    font-weight: normal;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--primary-color);
}


.dropdown-content button:last-child {
    border-bottom: none;
}

#logout {
    color: var(--error-color);
}

#menu-title-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.menu-title {
    font-size: 20px;
}

#menu-expand-icon {
    cursor: pointer;
}

#menu-expand-icon {
    cursor: pointer;
    transform: rotateY(0deg);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-expand-icon.expanded {
    transform: rotateY(180deg);
}