:root {
    --max-width-content: 1100px;
    --header-height: 60px;
    --open-panel-width: 300px;
    --main-color: #969eb9;
    --main-color-rgb: 165, 152, 152;
    --field-color: #abd;
    --btn-hover-color: #0093ff;
    --btn-hover-color-rgb: 0, 147, 255;
    --warn-color: #c30;
    --warn-color-rgb: 204, 51, 0;
    --logo-bg-color: #3d405b;
    --logo-bg-color-rgb: 61, 64, 91;
    --logo-main-color: #f4f1de;
    --logo-main-color-rgb: 244, 241, 222;

    --outgoing-bg: rgba(0, 247, 255, 0.4);
    --requested-bg: #cfb;
}
@font-face {
    font-family: "Museo Sans Cyrl 300";
    src: url("/fonts/MuseoSansCyrl-300.woff2") format("woff2"),
        url("/fonts/MuseoSansCyrl-300.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "Museo Sans Cyrl 500";
    src: url("/fonts/MuseoSansCyrl-500.woff2") format("woff2"),
        url("/fonts/MuseoSansCyrl-500.woff") format("woff");
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: "Fira Code";
    src: url("/fonts/FiraCode-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Fira Code";
    src: url("/fonts/FiraCode-Bold.woff2") format("woff2");
    font-weight: bold;
    font-style: normal;
}
/* *::-webkit-scrollbar {
    width: 7px;
    background-color: #f9f9fd;
}
*::-webkit-scrollbar-thumb {
    background-color: #656565;
} */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Museo Sans Cyrl 300";
    position: relative;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* z-index: -1; */
    
    /* Путь к картинке, пропорции и запрет повторения */
    background-image: url('/img/notWePn.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Настройка прозрачности (0.3 = 30%) */
    animation: fadeToOpacity 1s ease-in-out forwards;
}

/* Описываем шаги анимации */
@keyframes fadeToOpacity {
    from {
        z-index: 100;
        opacity: 1;   /* Начальная прозрачность при загрузке */
    }
    to {
        z-index: -1;
        opacity: 0.2; /* Финальная прозрачность */
    }
}

/*
* Делаем три контейнера внутри _wrapper такими,
* чтобы нижний последний прижимался к самому низу.
* Аля, sticky footer
*/
html,
body {
    height: 100%;
}
._wrapper {
    min-height: 100%;
    width: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
}
/* Ready */

header {
    z-index: 2;
    position: sticky;
    top: -1px;
    width: 100%;
    height: var(--header-height);
    color: black;
    background: var(--main-color);

    transition: all 0.2s ease;

    &> .content {
        position: relative;
        &> .top-bar {
            display: flex;
            justify-content: space-between;

            & .top-btn {
                cursor: pointer;
                border: none;
                background: none;
                padding: 5px 10px;
                border-radius: 0px;
                box-shadow: none;

                transition: all 0.2s ease;

                &> svg {
                    color: black;
                    transition: all 0.2s ease;
                }

                &:hover {
                    box-shadow: 0 0 5px white;
                    border-radius: 5px;
                    &> svg {
                        color: white;
                    }
                }

                &:active {
                    box-shadow: 0 0 2px white;
                    border-radius: 10px;
                    &> svg {
                        color: white;
                    }
                }
            }

            &> .menu-vertical {
                
                &> svg {
                    transform: rotate(0);
                    transition: all .2s ease;

                    &.show {
                        transform: rotate(180deg);
                    }
                }
            }
        }

        &> .nav-menu {
            z-index: -1;
            position: absolute;
            padding: 0 20px;
            bottom: 0;
            background: var(--main-color);
            width: 100%;
            height: 40px;
            display: flex;
            justify-content: center;
            gap: 20px;
            border-radius: 0 0 5px 5px;
            box-shadow: none;
            opacity: 0;
            visibility: hidden;

            transition: all .2s ease;

            &.show {
                bottom: -40px;
                box-shadow: 0 3px 3px black;
                opacity: 1;
                visibility: visible;
            }

            &> a {
                cursor: pointer;
                color: black;
                text-decoration: none;
                text-shadow: none;

                transition: all 0.2s ease;

                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }

    &.is-pinned {
        &> .content {
            &> .top-bar {
                & .top-btn {
                    &> svg {
                        color: white;
                    }
                }
            }
            &> .nav-menu {
                background: black;
                &> a {
                    color: white;
                }
            }
        }
    }
}

#main {
    height: 100%;

    &> .content.on-auth {
        height: calc(100% - 40px);

        &> #app {
            height: calc(100% + 40px);
        }
    }
}

footer {
    border-top: 1px solid #00000025;
    background: var(--main-color);

    &> .content {

        &> .foot-field {
            padding: 20px 0;
            display: flex;
            gap: 20px;
            
            &> .info-bar {
                
                &> a {
                    cursor: pointer;
                    color: white;
                    text-decoration: none;
                    text-shadow: none;

                    transition: all 0.2s ease;

                    &:hover {
                        text-shadow: 0 0 5px black;
                        text-decoration: underline;
                    }
                }
            }
        }
    }

    &> .underline {
        padding: 10px 0;
        background: black;
        color: white;

        & a { color: inherit; }

        &> .content {

            &> .info-bar {
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
        }
    }
}

.content {
    margin: 0 auto;
    max-width: 100%;
    padding: 0 20px;
}

header > .content {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    gap: 10px;
    align-items: center;

    & > .ahk-info {
        display: block;      
    }

    & > #a-username {
        font-size: 30px;
        font-weight: bold;
    }
}

/* Когда header прилипает к потолку из-за прокручивания */
header.is-pinned .logo {
    /* background: none; */
    transform: rotate(-90deg);
}

header:not(.is-pinned) .logo {
    transform: rotate(0deg);
}

.is-pinned {
    color: white;
    background: black;
}

/* DEFAULT */
.default-btn:not([disabled]) {
    user-select: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    gap: 5px;
    border: solid black 1px;
    border-radius: 2px;
    color: black;
    box-shadow: none;
    min-height: 26px;

    transition: all 0.2s ease;
}
.default-btn:not([disabled]):hover {
    border-color: #0093ff;
    border-radius: 5px;
    color: #0093ff;
    box-shadow: 0 2px 5px black;
}
.default-btn:not([disabled]):active {
    box-shadow: 0 0 3px #0093ff;
}

/* SVG */

/* BUTTONS */
.red-text {
    position: relative;
    color: darkred;
}
.blue-text {
    position: relative;
    color: darkblue;
}
.dots-button {
    height: 12px;
    width: 12px;
    font-size: 24px;
    position: absolute;
    bottom: 18px;
    left: 4px;
}

/* === 1. Стили для маленьких разрешений (экраны до 768px и меньше) === */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    .content {
        max-width: 100%;
        padding: 0 5px;
    }
}

/* === 2. Стили для планшетов (экраны от 768px и выше) === */
@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
    .content {
        max-width: 720px;
        margin: 0 auto; /* Центрируем контент */
    }
}

/* === 3. Стили для компьютеров (экраны от 1024px и выше) === */
@media (min-width: 1024px) {
    .content {
        max-width: 960px;
    }
}