body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #fbcfe8, #c7d2fe);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 28px;
    width: 380px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin: 0 0 20px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #c084b6;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.emoji {
    font-size: 20px;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

input {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid #eaddea;
    outline: none;
    font-size: 15px;
    transition: 0.2s;
    background: #fffdfd;
}

input:focus {
    border-color: #d9b3c7;
    box-shadow: 0 0 0 3px rgba(231, 198, 217, 0.35);
}

button {
    padding: 12px 16px;
    border: none;
    background: #e8a9c4;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: 0.2s;
}

button:hover {
    background: #d990b3;
}

/* IMPORTANT: remove default ul spacing */
#taskList {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8f7ff;
    border-radius: 14px;
    border: 2px dashed #e7c6d9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

li:hover {
    background: #f3efff;
    transform: translateY(-1px);
}

li.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

li {
    cursor: grab;
}

li:active {
    cursor: grabbing;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom:12px;
}

.theme-toggle {
    background: #d6c6f0;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 16px;
}

.theme-toggle:hover {
    background: #b9a0df;
}

/* DARK MODE*/
body.dark-mode {
    background: rgba(38, 38, 50, 0.92);
    color: #f3eaf2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode input,
body.dark-mode .edit-input,
body.dark-mode .edit-note-input {
    background: #2f2f3d;
    color: #f3eaf2;
    border: 2px solid #5c5166;
}

body.dark-mode input::placeholder,
body.dark-mode .edit-note-input::placeholder {
    color: #b9aebd;
}

body.dark-mode li {
    background: #312b3a;
    border: 2px dashed #8e6f8f;
}

body.dark-mode li:hover {
    background: #3a3145;
}

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

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

body.dark-mode .completed-note {
    color: #a793a3;
}

.task-buttons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.task-buttons button {
    padding: 6px 8px;
    font-size: 14px;
    border-radius: 8px;
}

.task-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-text {
    flex: 1;
    cursor: pointer;
    word-break: break-word;
    color: #5a5560;
}

.task-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #9a8f98;
    word-break: break-word;
}

.completed-note {
    opacity: 0.7;
}

.edit-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.edit-note-input {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid #e6cfe0;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: #fffdfd;
    box-sizing: border-box;
}

.edit-note-input:focus {
    border-color: #d8b7c9;
    box-shadow: 0 0 0 3px rgba(216, 183, 201, 0.25);
}

.task-text {
    flex: 1;
    cursor: pointer;
    word-break: break-word;
    color: #5a5560;
}

.task-text.completed {
    text-decoration: line-through;
    color: #c2a8b8;
    opacity: 0.8;
}

.edit-btn {
    background: #d6c6f0;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.edit-btn:hover {
    background: #b9a0df;
}

.save-btn {
    background: #c8e6d4;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.save-btn:hover {
    background: #9fd3b2;
}

.cancel-btn {
    background: #f2c9d8;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn:hover {
    background: #ddb0c3;
}

.edit-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    border: 2px solid #e6cfe0;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: #fffdfd;
}

.edit-input:focus {
    border-color: #d8b7c9;
    box-shadow: 0 0 0 3px rgba(216, 183, 201, 0.25);
}

.delete-btn {
    background: #f5b7c8;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.delete-btn:hover {
    background: #e7a3bc;
}