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

body {
    transition: background 0.3s ease;
}

.container {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #153677, #4e085f);
    padding: 10px;
    transition: background 0.3s ease;
    position: relative;
}

.top-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.container.dark-mode {
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
}

.todo-app {
    width: 100%;
    max-width: 540px;
    background-color: white;
    margin: 100px auto 20px;
    padding: 40px 30px 70px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.todo-app.dark-mode {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.header-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
}

.todo-app h2 {
    color: #002765;
    display: flex;
    align-items: center;
    margin: 0;
}

.todo-app.dark-mode h2 {
    color: #64b5f6;
}

.todo-app h2 img {
    width: 30px;
    margin-left: 10px;
}

.theme-toggle {
    background: #edeef0;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.todo-app.dark-mode .theme-toggle {
    background: #2a2a2a;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #edeef0;
    border-radius: 30px;
    padding-left: 20px;
    margin-bottom: 25px;
    transition: background 0.3s ease;
}

.todo-app.dark-mode .row {
    background: #2a2a2a;
}

input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    font-weight: 14px;
    color: inherit;
}

button {
    border: none;
    outline: none;
    padding: 16px 50px;
    background: #ff5945;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.3s ease;
}

button:hover {
    background: #ff7961;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 89, 69, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(255, 89, 69, 0.3);
}

ul li {
    list-style: none;
    font-size: 17px;
    padding: 12px 8px 12px 50px;
    user-select: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

ul li.removing {
    animation: slideOut 0.3s ease;
}

ul li::before {
    content: '';
    position: absolute;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid #999;
    top: 12px;
    left: 8px;
    transition: all 0.3s ease;
}

.todo-app.dark-mode ul li::before {
    background: #2a2a2a;
    border-color: #666;
}

ul li:hover::before {
    transform: scale(1.1);
    border-color: #ff5945;
}

ul li.checked {
    color: #555;
    text-decoration: line-through;
}

.todo-app.dark-mode ul li.checked {
    color: #888;
}

ul li.checked::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5945;
    font-size: 20px;
    font-weight: bold;
    background: #ffe6e3;
    border-color: #ff5945;
}

.todo-app.dark-mode ul li.checked::before {
    background: #3a1f1d;
}

ul li span {
    position: absolute;
    right: 0;
    top: 5px;
    width: 40px;
    height: 40px;
    font-size: 22px;
    color: #555;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.todo-app.dark-mode ul li span {
    color: #aaa;
}

ul li span:hover {
    background: #ffe6e3;
    color: #ff5945;
    transform: rotate(90deg) scale(1.2);
}

.todo-app.dark-mode ul li span:hover {
    background: #3a1f1d;
}

/* Empty state message */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
    animation: fadeIn 0.5s ease;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.todo-app.dark-mode .empty-state {
    color: #666;
}