/* Базовый сброс для всех элементов */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Сброс для базовых HTML-элементов */
html,
body {
    scroll-behavior: smooth;
    height: 100%;
    font-family: 'Montserrat', 'Arial', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #333333;
    background-color: white;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

main {
    flex-grow: 1;
}

::selection {
    background-color: #DC2424;
    color: white;
}

/* Удаление стилей ссылок */
a {
    text-decoration: none;
    color: inherit;
}

/* Сброс границ и размеров для изображений и блоков */
img,
picture {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    border: 1px solid #333333;
    background: none;
    outline: none;
    padding: 0;
}

/* Сброс для заголовков */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
    font-weight: normal;
}

/* плавная анимация и цвет при наведении для ссылок и кнопок */
a,
button {
    transition: color .2s ease;
    cursor: pointer;

    &:hover {
        color: #DC2424;
    }
}

/* свитчер темы */
.theme-switcher__wrapper {
    display: flex;
    justify-content: center;
    user-select: none;
}

.theme-switcher {
    width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ededed;
    border-radius: 30px;
    transition: background-color 0.3s ease;
}

.slider::before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background-color: white;
    bottom: 3px;
    left: 3px;
    transition: transform 0.3s ease;
}

.switch input:checked + .slider {
    background-color: #5c5c5c; /* Цвет для включенного состояния */
}

.switch input:checked + .slider::before {
    transform: translateX(30px);
}

.icon {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.sun {
    left: 7px;
    user-select: none;
}

.moon {
    right: 7px;
    user-select: none;
}