/* Переключатель темы */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
    margin: 10px 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--button-bg);
    border-radius: 15px;
    transition: background-color 0.3s;
}

.switch .slider:before {
    content: '';
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    color: var(--bg-color);
    font-size: 16px;
    transition: transform 0.3s, background 0.3s, color 0.3s;
}

.switch .slider.sun:before {
    content: '☀️';
}

.switch .slider.moon:before {
    content: '🌙';
    transform: translateX(30px);
}

input:checked + .slider {
    background: #4caf50;
}

input:checked + .slider.sun:before {
    content: '🌙';
    transform: translateX(30px);
}

input + .slider.moon:before {
    content: '☀️';
    transform: translateX(0);
}
