.dark-mode { mix-blend-mode: difference; background-color: white; } .dark-mode media-item::part(media) { filter: invert(1) hue-rotate(357deg); } .dark-mode img { filter: blur(0px) invert(1) hue-rotate(357deg); } .dark-mode .dark-mode-toggle { filter: blur(0px) invert(1) hue-rotate(357deg); } .dark-mode img:hover { filter: blur(0px) invert(1) hue-rotate(357deg); } .dark-mode-toggle { position: relative; display: inline-block; } .dark-mode-toggle input { opacity: 0; position: absolute; cursor: pointer; } .checkbox-label { background-color: #111; width: 53px; height: 9px; border-radius: 50px; position: relative; padding: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; overflow: hidden; } .checkbox-label .toggle-icon { z-index: 1; width: 35%; text-align: center; } .fa-moon { color: #f1c40f; position: absolute; right: 5px; } .fa-sun { color: #f39c12; position: absolute; left: 5px; } .checkbox-label .ball { background-color: #fff; width: 22px; height: 22px; position: absolute; left: 2px; top: 2px; border-radius: 50%; transition: transform 0.2s linear; z-index: 2; } .dark-mode-toggle input:checked + .checkbox-label .ball { transform: translateX(24px); } .dark-mode-toggle input:checked + .checkbox-label { background-color: #2c3e50; } @media(max-width:768px){ .checkbox-label { background-color: #111; width: 52px; height: 26px; border-radius: 50px; position: relative; padding: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; overflow: hidden; } }