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

/* Body and font settings */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
}

/* Header section */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    margin-bottom: 20px;
}

.header h2 {
    font-size: 24px;
    font-weight: 600;
}

.dark-mode-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Main app container */
.app-container {
    display: flex;
    background-color: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-direction: column;
}

/* Main content area */
.main-content {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
}

/* Task list container */
.todo-list {
    flex-grow: 1;
    max-height: 400px;  /* Set max-height to make sure it doesn't overflow beyond a certain limit */
    overflow-y: auto;
    margin-top: 10px;  /* Space above task list */
}

.todo-list ul {
    list-style: none;
    padding-left: 0;
}

.todo-list li {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    margin: 10px 0;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.todo-list li:hover {
    background-color: #f1f1f1;
}

.todo-list li.completed .task-text {
    text-decoration: line-through;
    color: #888;
}

/* Task text and icons */
.task-text {
    font-size: 16px;
    font-weight: normal;
    flex-grow: 1;
    cursor: pointer;
    margin-left: 10px;
}

.delete-icon {
    font-size: 20px;
    color: #ff5252;
    cursor: pointer;
}

/* Task input section */
.task-input {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

#task-input {
    width: 85%;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
}

#task-input:focus {
    border-color: #3a3a3a;
}

#add-task {
    width: 15%;
    padding: 12px 20px;
    background-color: #4CAF50; /* Green color */
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px; /* Space between input and button */
}

#add-task:hover {
    background-color: #45a049;
}

/* Footer section */
.footer {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

.footer p {
    margin: 10px 0;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #fff;
}

body.dark-mode .app-container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .todo-list li {
    background-color: #2c2c2c;
}

body.dark-mode .task-text {
    color: #fff;
}

body.dark-mode .task-input input {
    background-color: #333;
    border-color: #444;
    color: white;
}

body.dark-mode .task-input button {
    background-color: #444;
}

body.dark-mode .delete-icon {
    color: #ff5252;
}

body.dark-mode .footer {
    color: #aaa;
}

/* Task checkbox styles */
.task-checkbox {
    margin-right: 15px;
    cursor: pointer;
}

.task-time {
    font-size: 12px;
    color: #888;
    margin-left: 10px;
    margin-right: 10px; /* Space between time and delete icon */
}