html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* Prevent scrolling */
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

h2 {
    text-align: center;
    color: #4b4a4a;
    font-size: 1.2rem;
    margin: .3rem 0;
    font-weight: bold;
}

.modal-content {
    border-radius: 0.8rem;
}

.kanban-board {
    display: flex;
    justify-content: space-around;
    height: 100%; /* Allow the board to take full height */
    padding: 20px;
    box-sizing: border-box; /* Include padding in height calculation */
}

.column {
    background-color: white;
    border: 1px solid #ccc;
    width: 30%;
    padding: 10px;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    height: calc(100% - 55px); /* Adjust height to fit within the board */
    border-radius: 10px;
}

.task-list {
    flex-grow: 1; /* Allow task list to grow and fill available space */
    margin: 10px 0; /* Margin for spacing */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ccc; /* Optional: add a border for better visibility */
    border-radius: 5px; /* Optional: rounded corners */
    padding: 5px; /* Optional: padding for inner spacing */
    display: flex; /* Enable flexbox for task items */
    flex-direction: column; /* Stack task items vertically */
}

.task-item {
    background-color: #dfe3ff;
    border-radius: 5px;
    padding: 13px;
    margin-bottom: 5px;
    cursor: move;
    font-weight: bold;
    position: relative;
    padding-right: 50px;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #d0d6ff;
}

.task-actions {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.task-item:hover .task-actions,
.task-item.active .task-actions {
    display: flex;
}

.task-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-btn:hover {
    opacity: 1;
}

.edit-btn {
    color: #007bff;
}

.delete-btn {
    color: #dc3545;
}

.task-text {
    margin-right: 10px;
    word-break: break-word;
}

.task-edit-input {
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 3px;
    padding: 8px;
    font-weight: bold;
    font-size: inherit;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    padding: 5px 8px !important;
}

input[type="text"] {
    padding: 10px 15px; /* Add padding */
    font-size: 16px; /* Increase font size */
    border: 1px solid #ccc; /* Border color */
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: border-color 0.3s; /* Smooth transition for focus effect */
}

input[type="text"]:focus {
    border-color: #6c63ff; /* Change border color on focus */
    outline: none; /* Remove default outline */
}

.drop-target {
    background-color: #e0e7ff; /* Light blue background for drop target */
    border: 2px dashed #6c63ff; /* Dashed border to indicate drop area */
}

.navbar-dark .navbar-brand {
    font-weight: bold;
    font-size: 1rem;
}

.brand-title, .brand-title:hover {
    text-decoration: none;
    color: inherit;
}

.task-list .placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #595959;
    font-size: 1rem;
    text-align: center;
    opacity: 0.5;
    cursor: auto;
    background-color: #f1f1f1 !important;
}

#in-progress .task-list > div {
    background-color: #ffefbe;
}

#done .task-list > div {
    background-color: #c1ffc1;
}

.flex-navbar {
    display: flex;
    color: white;
    font-weight: bold;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.generic-flex {
    display: flex;
    align-items: center;
}

.header-right {
    gap: 10px;
}

.dragging {
    opacity: 0.5; /* Make the item semi-transparent while dragging */
    transition: opacity 0.2s; /* Smooth transition */
    width: 100%;
}

#mobile-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8);
    color: red;
    text-align: center;
    padding: 22px;
    z-index: 1000;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.drop-target {
    background-color: rgba(179, 216, 255, 0.2); /* Light blue background with transparency */
    border: 2px dashed rgba(0, 123, 255, 0.5); /* Dashed border for visibility */
}

.sortable-chosen {
    background-color: rgba(255, 204, 0, 0.3); /* Light yellow background with transparency */
    border: 2px solid rgba(0, 4, 216, 0.5); /* Solid border for visibility */
}

.about-button {
    padding: 0 !important;
}

.bg-dark {
    background-color: #1b222d !important;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.theme-toggle img {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.dark {
    background-color: #0b1215;
    color: #c9d1d9;
}

.dark h2 {
    color: #c9d1d9;
}

.dark .column {
    background-color: #141a22;
    border-color: #2c3642;
}

.dark .task-list {
    border-color: #2c3642;
    background-color: #0f141b;
}

.dark .task-item {
    background-color: #1f2630;
    color: #e6edf3;
}

.dark .task-item:hover {
    background-color: #2a3340;
}

.dark #in-progress .task-list > .task-item {
    background-color: #3a3120;
}

.dark #in-progress .task-list > .task-item:hover {
    background-color: #453926;
}

.dark #done .task-list > .task-item {
    background-color: #243527;
}

.dark #done .task-list > .task-item:hover {
    background-color: #2a3d2d;
}

.dark .task-list .placeholder {
    background-color: #0f141b !important;
    color: #7d8590;
}

.dark input[type="text"] {
    background-color: #0f141b;
    border-color: #2c3642;
    color: #c9d1d9;
}

.dark input[type="text"]::placeholder {
    color: #7d8590;
}

.dark input[type="text"]:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

.dark .task-edit-input {
    background-color: #0f141b;
    border-color: #58a6ff;
    color: #c9d1d9;
}

.dark .edit-btn {
    color: #58a6ff;
}

.dark .delete-btn {
    color: #ff6b6b;
}

.dark .modal-content {
    background-color: #141a22;
    border-color: #2c3642;
    color: #c9d1d9;
}

.dark .modal-header,
.dark .modal-footer {
    background-color: #1a1f29;
    border-color: #2c3642;
}

.dark .modal-body a {
    color: #58a6ff;
}

.dark .drop-target {
    background-color: rgba(88, 166, 255, 0.15);
    border: 2px dashed rgba(88, 166, 255, 0.5);
}

.dark .sortable-chosen {
    background-color: rgba(255, 206, 80, 0.2);
    border: 2px solid rgba(255, 206, 80, 0.5);
}

.dark #mobile-message {
    background-color: rgba(15, 20, 27, 0.9);
    color: #ff7b7b;
}

@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column; /* Stack columns vertically on small screens */
        gap: 10px;
    }

    .column {
        width: 100%; /* Full width on small screens */
    }
    
    .task-item {
        padding-right: 60px; /* More space for buttons on mobile */
    }
    
    .task-actions {
        gap: 5px; /* Add gap between buttons on mobile */
    }

    html, body {
        height: 100%;
        margin: 0;
        overflow: auto; /* Prevent scrolling */
    }
}