:root{
    --background: #101114;
    --primary-color: #1C1D20;
    --secondary-color: #4A4D57;
    --accent-color: #00A8E8;
    --text-color: #F9F9F9;

}
*{
    margin: 0;
    padding: 0;
}
html{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16pt;
    color: var(--text-color);
}
body{
    min-height: 100vh;
    padding: 10px;
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
}
h1{
    margin-top: 100px;
    margin-bottom: 20px;
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    color: var(--accent-color);
}
.wrapper{
    width: 700px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#todo-input{
    box-sizing: border-box;
    padding: 12px 20px;
    width: 100%;
    background: none;
    border: 2px solid var(--secondary-color);
    border-radius: 1000px;
    font: inherit;
    color: var(--text-color);
    caret-color: var(--accent-color);
}
#todo-input:focus{
    outline: none;
}
form{
    position: relative;
}
#add-button{
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background-color: var(--accent-color);
    padding: 0 30px;
    border: none;
    border-radius: 1000px;
    font: inherit;
    font-weight: 600;
    color: var(--background);
    cursor: pointer;
}
.todo{
    margin-bottom: 10px;
    padding: 0 16px;
    background-color: var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
}
.todo .todo-text{
    padding: 15px;
    padding-right: 0;
    flex-grow: 1;
    transition: 1000ms ease;
}
.delete-button{
    padding: 3px;
    background: none;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--secondary-color);
}
.delete-button span{
    transition: 200ms ease;
}
.delete-button:hover span{
    color: #ff0033;
}
.custom-checkbox{
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    min-height: 20px;
    min-width: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    color: transparent;
    cursor: pointer;
    transition: 200ms ease;
}
input[type="checkbox"]:checked ~ .custom-checkbox{
    color: var(--primary-color);
    background-color: var(--accent-color);
}
input[type="checkbox"]:checked ~ .todo-text{
    text-decoration: line-through;
    color: var(--secondary-color);
}
input[type="checkbox"]{
    display: none;
}
/* Progress bar styles */
.progress-container {
    margin-bottom: 15px;
}

.progress-bar {
    position: relative;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
}

.progress-fill {
    height: 100%;
    width: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: white; /* Changed from var(--accent-color) to white for better contrast on both filled and unfilled areas */
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); /* Added text shadow for better readability */
}

/* Celebration animation styles */
.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.celebration-container.active {
    display: block;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    border-radius: 0;
    animation: spread 3s ease-out forwards; /* Changed from 1s to 3s for slower animation */
    transform-origin: center;
}

@keyframes spread {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(0);
        opacity: 0;
    }
    5% {
        transform: translate(-50%, -50%) rotate(0deg) scale(0.2);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(-50% + (var(--random-x) * 2 - 1) * 60vw),
            calc(-50% + (var(--random-y) * 2 - 1) * 60vh)
        ) rotate(calc(var(--random-rotate) * 360deg)) scale(1);
        opacity: 0;
    }
}

@media(max-width: 500px) {
    html{
        font-size: 12pt;
    }
    #add-button{
        position: unset;
        width: 100%;
        margin-top: 10px;
        padding: 15px;
        height: auto;
    }
    h1{
        margin-top: 50px;
        font-size: 15vw;
    }
}