* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #1c1509;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem;
    border-radius: 15px;
    background-color: #f4f4f6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 25px;
    font-family: 'Inter', sans-serif;
}

h1 span {
    color: #1a54c0;
    font-family: 'Zalando Sans Expanded', sans-serif;
}

.task-form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    gap: 12px;
    flex-wrap: wrap;
}

.task-form input {
    padding: 12px 16px;
    font-family: "Poppins";
    font-weight: 300;
    width: 300px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: #222;
    transition: border 0.2s, box-shadow 0.2s;
}

.task-form input::placeholder {
    color: #888;
}

.task-form input:focus {
    border: 1px solid rgba(100, 130, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(100, 130, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.select-wrap {
    position: relative;
    display: inline-block;
}

.select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #555;
    pointer-events: none;
}

.task-form select {
    font-family: "Poppins", sans-serif;
    padding: 12px 42px 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: #222;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s;
}

.task-form select:focus {
    border: 1px solid rgba(100, 130, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(100, 130, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.task-form button {
    padding: 12px 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(40, 40, 60, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: background 0.25s, transform 0.15s, box-shadow 0.2s;
}

.task-form button:hover {
    background: rgba(20, 20, 40, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.task-form button:active {
    transform: scale(0.97);
}

.board {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.list {
    background-color: #333;
    padding: 1rem;
    border-radius: 12px;
    width: 30%;
    min-height: 450px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.list:hover {
    transform: translateY(-5px);
}

.list h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-family: "Poppins";
    color: #f7f7f7;
    text-align: center;
}

.list.over {
    background-color: #5b5fcf44;
    box-shadow: 0 0 0 2px #7b7ef8, 0 8px 24px rgba(91, 95, 207, 0.25);
}

/* Card */
.card {
    position: relative;
    background-color: #ffffff;
    color: #333;
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s, border 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card:active {
    cursor: grabbing;
}

.card.dragging {
    transform: scale(1.04) rotate(1.5deg);
    box-shadow: 0 12px 32px rgba(91, 95, 207, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
    border: 2px solid #7b7ef8;
    background: #f5f5ff;
}

/* Badge */
.priority-badge {
    align-self: flex-end;
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.high .priority-badge {
    background: #fde8e8;
    color: #c0392b;
}

.medium .priority-badge {
    background: #fff4e0;
    color: #b07800;
}

.low .priority-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Card text */
.card-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    word-break: break-word;
}

.card-text[contenteditable="true"] {
    outline: none;
    border-bottom: 1.5px dashed #1a54c0;
    padding-bottom: 2px;
    cursor: text;
}

/* Card actions */
.card-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.card-btn {
    padding: 3px 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.edit-btn {
    background: rgba(26, 84, 192, 0.1);
    color: #1a54c0;
}

.edit-btn:hover {
    background: rgba(26, 84, 192, 0.2);
}

.edit-btn.saving {
    background: rgba(26, 84, 192, 0.85);
    color: #fff;
}

.delete-btn {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
}

.delete-btn:hover {
    background: rgba(192, 57, 43, 0.2);
}

/* Clear board button */
#clearBoardBtn {
    padding: 12px 22px;
    border: 1px solid rgba(192, 57, 43, 0.35);
    border-radius: 10px;
    background: rgba(192, 57, 43, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #c0392b;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
}

#clearBoardBtn:hover {
    background: rgba(192, 57, 43, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .board {
        flex-direction: column;
        align-items: center;
    }

    .list {
        width: 90%;
        margin-bottom: 20px;
    }

    .task-form {
        flex-direction: column;
        align-items: center;
    }

    .task-form input,
    .task-form button,
    .select-wrap {
        width: 80%;
    }

    .task-form select {
        width: 100%;
    }
}