* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    height: 100vh;
    width: 100%;
    background: 
        linear-gradient(45deg, rgba(240, 105, 199, 0.4), rgba(125, 108, 235, 0.4), rgba(233, 210, 95, 0.4), rgba(100, 225, 196, 0.4)),
        url("Pastel_bg.jpg") no-repeat center center fixed;
    background-size: 300% 300%, cover;
    animation: color 12s ease-in-out infinite;
}

@keyframes color {
    0% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.list {
    padding: 30px;
    border-radius: 40px;
    border: 2px solid white;
    max-width: 500px;
    background-color: white;
    box-shadow: 0 8px 20px rgba(10, 10, 10, 0.1);
}

.stats-container {
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #b57bb3;
    display: flex;
    gap: 40px;
    justify-content: space-between;
    width: 100%;
}

.details {
    width: 100%;
}

#progressBar {
    width: 100%;
    height: 12px;
    background-color: white;
    border-radius: 5px;
    margin-top: 20px;
    border: 2px solid #b57bb3;
}

#progress {
    width: 0%;
    height: 8px;
    background-color: #b57bb3;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#numbers {
    width: 100px;
    height: 100px;
    background-color: #b57bb3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 30px;
    font-weight: bold;
    transition: transform 0.2s ease, color 0.2s ease;
}
#numbers.animate {
    transform: scale(1.2);
    color: #ff7b54;
}

form {
    margin-top: 60px;
    width: 100%;
    display: flex;
    gap: 10px;
}

input {
    padding: 16px;
    background: #f5d6ec;
    border: 1px solid #d59ad8;
    border-radius: 12px;
    outline: none;
    width: 100%;
}

button {
    padding: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d59ad8;
    border: 1px solid #b57bb3;
    color: white;
    font-size: 30px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
button:hover {
    transform: scale(1.1);
    background-color: #a44da0;
}

#task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
    width: 100%;
}

.taskitem {
    display: flex;
    padding: 10px;
    border: 1px solid #b57bb3;
    border-radius: 12px;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.taskitem:nth-child(odd) {
    background-color: #fce4ec; 
}
.taskitem:nth-child(even) {
    background-color: #e8eaf6; 
}

.taskitem:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.task {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}
.task.completed {
    text-decoration: line-through;
    color: rgb(219, 92, 92);
}

.checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.delete-btn {
    background-color: #b57bb3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.delete-btn:hover {
    background-color: #9a3b97;
    transform: scale(1.1);
}

#clear-all {
    width: 100%;
    height: auto;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    background-color: #b57bb3;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#clear-all:hover {
    background-color: #ab52a8;
    transform: scale(1.03);
}

footer {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    margin-top: 20px;
}
footer a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .list {
        width: 90%;
        padding: 20px;
    }
}

#message {
    font-size: 16px;
    font-weight: 500;
    margin-top: 5px;
    color: #6a1b9a;
    text-align: center;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #444;
}

h1 {
    font-family: 'Quicksand', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #6a1b9a;
    text-align: center;
}

#message {
    font-family: 'Dancing Script', cursive;
    font-size: 20px;
    color: #d77fb3;
    text-align: center;
    margin-bottom: 15px;
}

.task p {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #333;
    margin-left: 8px;
}

button {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

/* --- Dark Mode Styles with pastel background overlay --- */
body.dark-mode {
    background: 
        linear-gradient(rgba(26,26,26,0.85), rgba(26,26,26,0.85)),
        url("Pastel_bg.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #f5f5f5;
}

body.dark-mode .list {
    background-color: #2c2c2c;
    border-color: #555;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

body.dark-mode .stats-container {
    border-color: #777;
}

body.dark-mode .taskitem:nth-child(odd) {
    background-color: #3a3a3a;
}

body.dark-mode .taskitem:nth-child(even) {
    background-color: #444;
}

body.dark-mode .task.completed {
    color: #ff7b54; /* highlight completed tasks */
}

body.dark-mode input {
    background: #555;
    color: #f5f5f5;
    border: 1px solid #777;
}

body.dark-mode button,
body.dark-mode #clear-all {
    background-color: #666;
    border: 1px solid #777;
}

body.dark-mode button:hover,
body.dark-mode #clear-all:hover {
    background-color: #777;
}

body.dark-mode #progressBar {
    background-color: #333;
    border: 1px solid #777;
}

body.dark-mode #progress {
    background-color: #ff7b54; /* accent color */
}

body.dark-mode #numbers {
    background-color: #777;
    color: #f5f5f5;
}

body.dark-mode #message {
    color: #ffb3c6;
}

.theme-symbols {
    text-align: center;
    margin-bottom: 10px;
    font-size: 20px;
    cursor: pointer; /* clickable anywhere on symbols */
    user-select: none;
}

.theme-symbols #sun,
.theme-symbols #moon {
    display: none;
}

body.dark-mode .theme-symbols #moon {
    display: inline;
}

body.dark-mode .theme-symbols #sun {
    display: none;
}

body:not(.dark-mode) .theme-symbols #sun {
    display: inline;
}

body:not(.dark-mode) .theme-symbols #moon {
    display: none;
}
