/*-------------
  Общие стили
-------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    font-size: 16px;
    font-weight: 400;
    width: 100%;
    height: 100%;
}

/*--- Скрытие контента до обновления страницы ---*/
body {
    visibility: hidden;
}

body.visible {
    visibility: visible;
    transition: visibility 0s ease 0s, opacity 0.3s ease;
    opacity: 1;
}

/*--- Цвета системной темы ---*/
.theme-icon .light-half {
    fill: #fff;
}

.theme-icon .dark-half {
    fill: #000;
}

/*------------------------
  ПК версия светлая тема
------------------------*/

/*--- Верхний контейнер ---*/
.light header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #fff;
    color: #000;
    width: 100%;
    min-height: 90px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/*--- Кнопка войти ---*/
.light .enter-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 19px;
    background: linear-gradient(135deg, #50a0f0, #468cd2);
    color: #fff;
    height: 50px;
    padding: 0 20px;
    margin-right: 20px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    user-select: none;
}

.light .enter-btn:hover {
    background: linear-gradient(135deg, #50a0f0, #3c78b4);
}

.light .enter-btn:focus {
    outline: none;
}

/*--- Кнопка переключения темы ---*/
.light .theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    cursor: pointer;
}

.light .theme-icon svg {
    display: block;
    color: #7d8791;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.light .theme-icon:hover svg {
    color: #69737d;
}

.light #light-on {
  display: none;
}

/*--- Центральный контейнер ---*/
.light main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: justify;
    background-color: #fff;
    color: #000;
    padding: 6px 20px 17px 20px;
    white-space: pre-line;
    overflow-wrap: break-word;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/*--- Модальное окно ---*/
.light .modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
}

.light .modal.active {
    display: block;
}

.light .modal-content {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #fff;
    color: #000;
    width: calc(100% - 40px);
    max-width: 420px;
    max-height: calc(100% - 40px);
    padding: 48px 20px 0px 20px;
    border-radius: 10px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.light .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.light .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    cursor: pointer;
    pointer-events: auto;
}

.light .close-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 3px;
    fill: currentColor;
    color: #7d8791;
}

.light .close-btn:hover svg {
    color: #69737d;
}

/*--- Имя модального окна ---*/
.light .name-login {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 22px;
    font-weight: 600;
}

/*--- Форма авторизации ---*/
.light .form-login,
.light .form-password {
    position: relative;
    margin-top: -34px;
}

.light .form-login input,
.light .form-password input {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    font-size: 16px;
    font-weight: 400;
    background-color: #fff;
    color: #000;
    width: 100%;
    height: 40px;
    padding: 2px 20px 0 20px;
    border: 1px solid #7d8791;
    border-radius: 100px;
}

.light .form-login label,
.light .form-password label {
    position: absolute;
    top: 10px;
    left: 50%;
    font-size: 15px;
    background-color: #fff;
    color: #7d8791;
    padding: 0 20px;
    transform: translateX(-50%);
}

.light .form-login input:focus,
.light .form-password input:focus {
    border: 1px solid #468cd2;
    color: #468cd2;
    outline: none;
}

.light .form-login input:focus + label,
.light .form-password input:focus + label {
    color: #468cd2;
}

.light .form-btn {
    position: relative;
    margin-top: -34px;
    margin-bottom: -16px;
}

.light .form-btn button {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    font-size: 16px;
    font-weight: 400;
    background: linear-gradient(135deg, #50a0f0, #468cd2);
    color: #fff;
    padding-top: 2px;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
}

.light .form-btn button:hover {
    background: linear-gradient(135deg, #50a0f0, #3c78b4);
}

.light .form-btn button:focus {
    outline: none;
}

/*--- Нижний контейнер ---*/
.light footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #fff;
    color: #000;
    width: 100%;
    min-height: 52px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/*-------------------------------
  Мобильная версия светлой темы
-------------------------------*/

.light {
    @media (max-width: 768px) {
        & header {
            min-height: 60px;
        }
        & .enter-btn {
            font-size: 17px;
            height: 40px;
            padding: 10px 10px;
            margin-right: 10px;
        }
        & .theme-switch {
            margin-right: 10px;
        }
        & .modal-content {
            top: 0;
            right: 0;
            min-width: 100%;
            min-height: 100%;
            border-radius: 0;
        }
        & footer {
            font-size: 14px;
            min-height: 30px;
        }
    }
}

/*-----------------------
  ПК версия тёмная тема
-----------------------*/

/*--- Верхний контейнер ---*/
.dark header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #1c1e20;
    color: #bec8d2;
    width: 100%;
    min-height: 90px;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/*--- Кнопка войти ---*/
.dark .enter-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 19px;
    background: linear-gradient(135deg, #50a0f0, #468cd2);
    color: #fff;
    height: 50px;
    padding: 0 20px;
    margin-right: 20px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    user-select: none;
}

.dark .enter-btn:hover {
    background: linear-gradient(135deg, #50a0f0, #3c78b4);
}

.dark .enter-btn:focus {
    outline: none;
}

/*--- Кнопка переключения темы ---*/
.dark .theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    cursor: pointer;
}

.dark .theme-icon svg {
    display: block;
    color: #7d8791;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.dark .theme-icon:hover svg {
    color: #69737d;
}

.dark #light-off {
  display: none;
}

/*--- Центральный контейнер ---*/
.dark main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: justify;
    background-color: #1c1e20;
    color: #bec8d2;
    padding: 6px 20px 17px 20px;
    white-space: pre-line;
    overflow-wrap: break-word;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/*--- Модальное окно ---*/
.dark .modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
}

.dark .modal.active {
    display: block;
}

.dark .modal-content {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #1c1e20;
    color: #bec8d2;
    width: calc(100% - 40px);
    max-width: 420px;
    max-height: calc(100% - 40px);
    padding: 48px 20px 0px 20px;
    border-radius: 10px;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    overflow-y: auto;
}

.dark .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    cursor: pointer;
    pointer-events: auto;
}

.dark .close-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 3px;
    fill: currentColor;
    color: #7d8791;
}

.dark .close-btn:hover svg {
    color: #69737d;
}

/*--- Имя модального окна ---*/
.dark .name-login {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 22px;
    font-weight: 600;
}

/*--- Форма авторизации ---*/
.dark .form-login,
.dark .form-password {
    position: relative;
    margin-top: -34px;
}

.dark .form-login input,
.dark .form-password input {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    font-size: 16px;
    font-weight: 400;
    background-color: #1c1e20;
    color: #bec8d2;
    width: 100%;
    height: 40px;
    padding: 2px 20px 0 20px;
    border: 1px solid #7d8791;
    border-radius: 100px;
}

.dark .form-login label,
.dark .form-password label {
    position: absolute;
    top: 10px;
    left: 50%;
    font-size: 15px;
    background-color: #1c1e20;
    color: #7d8791;
    padding: 0 20px;
    transform: translateX(-50%);
}

.dark .form-login input:focus,
.dark .form-password input:focus {
    border: 1px solid #468cd2;
    color: #468cd2;
    outline: none;
}

.dark .form-login input:focus + label,
.dark .form-password input:focus + label {
    color: #468cd2;
}

.dark .form-btn {
    position: relative;
    margin-top: -34px;
    margin-bottom: -16px;
}

.dark .form-btn button {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    font-size: 16px;
    font-weight: 400;
    background: linear-gradient(135deg, #50a0f0, #468cd2);
    color: #fff;
    padding-top: 2px;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
}

.dark .form-btn button:hover {
    background: linear-gradient(135deg, #50a0f0, #3c78b4);
}

.dark .form-btn button:focus {
    outline: none;
}

/*--- Нижний контейнер ---*/
.dark footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #1c1e20;
    color: #bec8d2;
    width: 100%;
    min-height: 52px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/*-------------------------------
  Мобильная версия тёмной темы
-------------------------------*/

.dark {
    @media (max-width: 768px) {
        & header {
            min-height: 60px;
        }
        & .enter-btn {
            font-size: 17px;
            height: 40px;
            padding: 10px 10px;
            margin-right: 10px;
        }
        & .modal-content {
            top: 0;
            right: 0;
            min-width: 100%;
            min-height: 100%;
            border-radius: 0;
        }
        & .theme-switch {
            margin-right: 10px;
        }
        & footer {
            font-size: 14px;
            min-height: 30px;
        }
    }
}