/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #111, #222);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

/* Main Container */
.container {
    width: 380px;
    background: rgba(255, 255, 255, 0.07);
    padding: 35px;
    border-radius: 22px;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.4);
    animation: fadeIn 0.4s ease-out;
}

/* Fade Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    font-size: 30px;
    margin-bottom: 25px;
    text-align: center;
}

/* Input Box */
.todo-input {
    display: flex;
    margin-bottom: 25px;
}

.todo-input input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 12px 0 0 12px;
    border: none;
    outline: none;
    font-size: 16px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    transition: 0.2s;
}

.todo-input input:focus {
    background: rgba(255,255,255,0.25);
}

.todo-input input::placeholder {
    color: #ccc;
}

/* Add Button */
.todo-input button {
    width: 55px;
    background: #4CAF50;
    border: none;
    font-size: 26px;
    color: #fff;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    transition: 0.25s ease;
}

.todo-input button:hover {
    background: #42a047;
    transform: scale(1.05);
}

.todo-input button:active {
    transform: scale(0.95);
}

/* Task List */
#todo-list {
    list-style: none;
}

#todo-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.12);
    margin-bottom: 14px;
    padding: 14px 15px;
    border-radius: 12px;
    transition: background 0.25s ease;
}

#todo-list li:hover {
    background: rgba(255,255,255,0.20);
}

/* Completed Task */
#todo-list li.completed {
    text-decoration: line-through;
    color: #e8e8e8;
    opacity: 0.65;
    background: rgba(255,255,255,0.20);
}

#todo-list li.completed:hover {
    background: rgba(255,255,255,0.26);
}

/* Delete Button */
.delete {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #ff6666;
    cursor: pointer;
    transition: 0.2s ease;
}

.delete:hover {
    transform: scale(1.25);
}

/* Responsive */
@media (max-width: 450px) {
    .container {
        width: 92%;
        padding: 28px;
    }/* ============================
   📱 MOBILE RESPONSIVE DESIGN
   ============================ */

@media (max-width: 480px) {

    body {
        padding: 15px;
        align-items: flex-start;  /* Prevents tight top fit */
    }

    .container {
        width: 100%;
        padding: 20px 18px;
        border-radius: 18px;
    }

    .title {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .todo-input {
        flex-direction: row;
        gap: 8px;
    }

    .todo-input input {
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .todo-input button {
        width: 45px;
        font-size: 22px;
        border-radius: 10px;
    }

    #todo-list li {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 10px;
    }

    #todo-list li span {
        max-width: 70%;
        word-wrap: break-word;
    }

    .delete {
        font-size: 20px;
        padding: 5px;
    }
}

/* Super small devices (<360px like older Android phones) */
@media (max-width: 360px) {
    
    .title {
        font-size: 22px;
    }

    .todo-input input {
        font-size: 13px;
    }

    .todo-input button {
        width: 40px;
        font-size: 20px;
    }

    #todo-list li {
        padding: 8px 10px;
        font-size: 13px;
    }
}

}


