/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #153677, #4e085f);
    background-size: 200% 200%; /* Membuat area gradien lebih besar untuk efek gerakan */
    animation: gradientAnimation 8s ease infinite; /* Menggunakan animasi */
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%; /* Awal animasi */
    }
    50% {
        background-position: 100% 50%; /* Gerakan ke kanan */
    }
    100% {
        background-position: 0% 50%; /* Kembali ke awal */
    }
}

/* Main Container */
.main-container {
    display: flex;
    justify-content: space-between;
    width: 70%;
    max-width: 1000px;
    background: transparent;
    flex-wrap: wrap; /* Agar elemen berbaris pada perangkat kecil */
}

/* To-Do App and Countdown */
.todo-app, .countdown-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.todo-app {
    flex: 2;
    margin-right: 20px;
}

.countdown-container {
    flex: 1;
}

/* Headings */
.todo-app h2, .countdown-container h2 {
    color: #002765;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.todo-app h2 img {
    width: 30px;
    margin-left: 10px;
}

.countdown-container h2 img {
    width: 30px;
    margin-left: 10px;
}

/* To-Do List Row */
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #edeef0;
    border-radius: 30px;
    padding-left: 20px;
    margin-bottom: 25px;
}

/* Input Fields */
input[type="text"], input[type="number"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
}

/* Time Inputs */
.time-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.time-inputs input {
    width: 30%;
    text-align: center;
}

/* Buttons */
.timer-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    border: none;
    outline: none;
    padding: 16px 50px;
    background: #ff5945;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 40px;
    width: 150px;
    text-align: center;
}

button:hover {
    background-color: #d94636;
}

/* To-Do List Items */
ul li {
    list-style: none;
    font-size: 17px;
    padding: 12px 8px 12px 50px;
    user-select: none;
    cursor: pointer;
    position: relative;
}

ul li::before {
    content: '';
    position: absolute;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background-image: url(images/unchecked.png);
    background-size: cover;
    background-position: center;
    top: 12px;
    left: 8px;
}

ul li.checked {
    color: #555;
    text-decoration: line-through;
}

ul li.checked::before {
    background-image: url(images/checked.png);
}

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%;
}

ul li span:hover {
    background: #edeef0;
}

#timer-display {
    font-size: 48px;
    margin-top: 20px;
    color: #333;
    text-align: center;
}

/* Media Query untuk Tampilan Mobile */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
        font-family: 'Poppins', sans-serif;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, #153677, #4e085f);
        background-size: 150% 150%; /* Membuat gradasi lebih besar */
        animation: gradientAnimation 8s ease infinite; /* Animasi berjalan terus-menerus */
    }
    
    @keyframes gradientAnimation {
        0% {
            background-position: 0% 50%; /* Awal animasi */
        }
        50% {
            background-position: 100% 50%; /* Gerakan ke kanan */
        }
        100% {
            background-position: 0% 50%; /* Kembali ke awal */
        }
    }

    .main-container {
        flex-direction: column;
        align-items: center;
        width: 90%;
        max-width: none;
    }

    .todo-app, .countdown-container {
        padding: 20px;
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .todo-app {
        margin-bottom: 20px;
    }

    .row {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    input[type="text"], input[type="number"] {
        width: 100%;
        font-size: 16px;
        margin-bottom: 10px;
    }

    .time-inputs {
        gap: 5px;
    }

    .time-inputs input {
        width: 30%; 
        font-size: 12px; 
        padding: 5px; 
        max-width: 40px; 
    }

    .timer-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    button {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }

    ul li {
        font-size: 16px;
        padding: 12px 8px 12px 40px;
    }

    ul li::before {
        height: 24px;
        width: 24px;
        top: 14px;
        left: 8px;
    }

    ul li span {
        width: 30px;
        height: 30px;
        font-size: 18px;
        line-height: 30px;
    }

    #timer-display {
        font-size: 36px;
    }
}
