/* Import Google Font for a clean, modern look */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(to right, #ff5b5b, #5e5bff);
    margin: 0;
}

.container {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

/* Left Section - Input Fields */
.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.left-section h1 {
    font-size: 24px;
    color: #5e5bff;
    text-align: center;
}

.input-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease-in-out;
}

input:focus {
    border-color: #5e5bff;
    box-shadow: 0px 0px 8px rgba(161, 140, 209, 0.5);
}

/* Date & Time Section */
.date-time-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.date-time-section label {
    font-weight: bold;
    color: #5e5bff;
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #5e5bff;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

button:disabled {
    background-color: #9c9c9c;
    cursor: not-allowed;
}

button:hover {
    background-color: #323189;
}

/* Right Section - Task List */
.right-section {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
}

.right-section h1 {
    font-size: 24px;
    color: #ff5b5b;
    text-align: center;
}

#taskList {
    list-style: none;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
}

/* Task List Items */
li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
    transition: transform 0.2s ease-in-out, background 0.3s ease;
    position: relative;
}

li:hover {
    transform: scale(1.02);
    background: #ff5b5b44;
}

.task-text {
    flex: 2;
    font-size: 16px;
}

.task-date {
    font-size: 12px;
    color: rgb(106, 106, 106);
    text-align: right;
}

/* Buttons inside tasks */
.task-buttons {
    display: none; 
    gap: 10px;
    height: 40px;
    position: absolute;
    right: 200px;
}

li:hover .task-buttons {
    display: flex; 
}

/* Styling for action buttons */
.complete, .edit, .delete {
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    transition: all 0.3s ease-in-out;
    width: 40px;
    height: 40px;
    display: flex;
}

.complete {
    background: #02b914;
    color: white;
}

.edit {
    background: #fabb00;
    color: white;
}

.delete {
    background: #c82333;
    color: white;
}

.complete:hover {
    background: #02850f;
}

.edit:hover {
    background: #d7a201;
}

.delete:hover {
    background: #861823;
}

/* Completed Task Styling */
.completed-task {
    text-decoration: line-through;
    color: gray;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        width: 95%;
        height: auto;
    }

    .left-section, .right-section {
        width: 100%;
    }

    #taskList {
        max-height: 40vh;
    }
}
