@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Container */
.container {
    width: 100%;
    max-width: 450px;
    padding: 10px;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
}

.box {
    position: relative;
    width: 450px;
    height: 550px;
    border-radius: 30px;
    background: inherit;
    padding: 30px 20px;
    box-shadow: 25px 25px 75px rgba(0, 0, 0, 0.25),
    10px 10px 70px rgba(0, 0, 0, 0.25),
    inset 5px 5px 10px rgba(0, 0, 0, 0.5),
    inset 5px 5px 20px rgba(255, 255, 255, 0.5),
    inset -5px -5px 15px rgba(0, 0, 0, 0.75);
}

h2 {
    width: 100%;
    font-weight: 600;
    text-align: center;
    color: inherit;
    font-size: 1.75em;
    margin-bottom: 10px;
}

input[type="text"] {
    position: relative;
    width: 100%;
    border: none;
    outline: none;
    padding: 15px 20px;
    border-radius: 30px;
    font-size: 1em;
    box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.25),
    inset 2px 2px 5px rgba(0, 0, 0, 0.5),
    inset -3px -3px 5px rgba(0, 0, 0, 0.5);
}

/* List Styles */
ul {
    position: relative;
    margin-top: 20px;
    height: 350px;
    overflow-x: auto;
    padding-right: 10px;
}

.box li {
    position: relative;
    width: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--item-bg-light);
    margin: 10px 5px;
    padding: 10px 10px 10px 45px;
    min-height: 45px;
    cursor: pointer;
    border-radius: 22.5px;
    color: #fff;
    box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.25),
    inset 2px 2px 5px rgba(0, 0, 0, 0.5),
    inset -3px -3px 5px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
}

.box li i {
    position: absolute;
    right: -40px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ef0000;
    border-radius: 50%;
    box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.25),
    inset 2px 2px 5px rgba(255, 255, 255, 0.5),
    inset -3px -3px 5px rgba(0, 0, 0, 0.5);
}

.box li i::before, .box li i::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 2px;
    background: #fff;
}

.box li i::before {
    transform: rotate(45deg);
}

.box li i::after {
    transform: rotate(-45deg);
}

.box li::before {
    content: '';
    position: absolute;
    left: 8px;
    width: 30px;
    height: 30px;
    background: #2f363e;
    border-radius: 50%;
}

.box li.done {
    background: #607d8b;
    text-decoration: line-through;
}

.box li.done::after {
    content: '';
    position: absolute;
    left: 16px;
    width: 12px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(315deg);
}

/* Scrollbar Track for Dark Mode */
body.dark-mode ::-webkit-scrollbar-track {
    background: #333;
}
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #fff; 
}

/* Scrollbar Track for Light Mode */
body:not(.dark-mode) ::-webkit-scrollbar-track {
    background: #f0f0f0; 
}

body:not(.dark-mode) ::-webkit-scrollbar-thumb {
    background: #000; 
}

/*size*/
::-webkit-scrollbar {
    width: 4px;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: var(--text-color-light);
}

body.dark-mode .popup-content {
    background-color: #444;
    color: #fff;
}

#close-popup {
    margin-top: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #dfd7af;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

/* Dark & Light Mode Base Styles */
:root {
    --bg-color-light: #ffffff;
    --text-color-light: #161817;
    --item-bg-light: #dfd7af;
    --bg-color-dark: #161817;
    --text-color-dark: #ffffff;
    --item-bg-dark: #dfd7af;
}

body.dark-mode {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

body.dark-mode .box li {
    background: var(--item-bg-dark);
}
body.dark-mode .box li.done {
    background: #607d8b;
}
body.dark-mode #close-popup {
    background-color: #607d8b;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 50px;
}

.switch-label {
    position: absolute;
    width: 100%;
    height: 50px;
    background-color: var(--bg-color-light);
    border-radius: 25px;
    cursor: pointer;
    border: 3px solid var(--bg-color-dark);
    transition: background-color 0.3s, border-color 0.3s;
}

body.dark-mode .switch-label {
    background-color: var(--bg-color-dark);
    border-color: var(--bg-color-light);
}

.checkbox {
    position: absolute;
    display: none;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    transition: 0.3s;
}

.checkbox:checked ~ .slider {
    background-color: var(--bg-color-dark);
}

body.dark-mode .checkbox:checked ~ .slider {
    background-color: var(--bg-color-dark);
}

.slider::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--bg-color-dark);
    transition: 0.3s;
}

.checkbox:checked ~ .slider::before {
    transform: translateX(50px);
    background-color: var(--bg-color-light);
}

body.dark-mode .checkbox:checked ~ .slider::before {
    background-color: var(--bg-color-light);
}
