* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
}

:root {
    /* Background Color */
    --bg-color: #0a0808;
    --bg-button-color: #7000ff;
    --bg-column-color: #964cf7;
    --bg-task-color: #b681fc;
    --bg-addTask-color: #7048a5;

    /* Text Color */
    --primary-text-color: #f4f4f4;

    /* Padding */
    --nav-padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
    --section-padding: clamp(2rem, 8vh, 5rem) clamp(1rem, 5vw, 3rem);

    --padding-s: 0.25rem;
    --padding-m: 0.5rem;
    --padding-l: 0.75rem;
    --padding-xl: clamp(1rem, 2vw, 1.25rem);
    --padding-xxl: clamp(1.5rem, 5vw, 2.5rem);

    /* Border Radius */
    --border-radius-s: 5px;
    --border-radius-m: 10px;
    --border-radius-l: 15px;
    --border-radius-xl: 20px;
    --border-radius-xxl: 30px;
    --border-radius-round: 50%;
}

body {
    background-color: #3f2446;
    color: var(--primary-text-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* ---------------- CUSTOM SCROLLBAR ---------------- */

/* Target the scrollbar for the task columns */
section .task-column::-webkit-scrollbar {
    width: 8px;
}

section .task-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 var(--border-radius-m) var(--border-radius-m) 0;
}

section .task-column::-webkit-scrollbar-thumb {
    background: var(--bg-task-color);
    border-radius: 10px;
}

section .task-column::-webkit-scrollbar-thumb:hover {
    background: white;
}

/* ---------------- MAIN LAYOUT ---------------- */

main {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ---------------- NAVBAR ---------------- */

nav {
    background-color: var(--bg-color);
    padding: var(--nav-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav button {
    background-color: var(--bg-button-color);
    border: none;
    outline: none;
    color: var(--primary-text-color);
    padding: var(--padding-m) var(--padding-l);
    cursor: pointer;
    border-radius: var(--border-radius-m);
}

/* ---------------- BOARD SECTION ---------------- */

section {
    padding: var(--section-padding);
    display: flex;
    justify-content: space-between;
    gap: var(--border-radius-xxl);
    flex-wrap: wrap;
}

/* ---------------- TASK COLUMN ---------------- */

section .task-column {
    background-color: var(--bg-column-color);
    flex: 1;
    min-width: 280px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: var(--padding-m);
    border-radius: var(--border-radius-m);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    overflow-y: auto;
    max-height: 75vh;
    min-height: 25vh;
}

/* Ensures there is space at the bottom when scrolling */
section .task-column::after {
    content: "";
    display: block;
    height: var(--padding-m);
    width: 100%;
    flex-shrink: 0;
}

section .task-column .heading {
    padding: var(--padding-m);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ---------------- TASK CARD ---------------- */

section .task-column .task {
    width: 94%;
    background-color: var(--bg-task-color);
    border-radius: var(--border-radius-m);
    padding: var(--padding-m);
    display: flex;
    flex-direction: column;
    gap: var(--padding-s);
    transition: all 0.2s ease;
    cursor: grab;
    flex-shrink: 0; /* Prevents vertical squishing */
}

section .task-column.hover-over {
    border: 2px dashed var(--primary-text-color);
    transform: scale(1.03);
}

section .task-column .task:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

section .task-column .task button {
    cursor: pointer;
    padding: var(--padding-s) var(--padding-m);
    border-radius: var(--border-radius-s);
    border: none;
    outline: none;
    width: 3.5rem;
    height: 1.6em;
}

/* ---------------- TASK ACTIONS ---------------- */

.task-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.editBtn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.deleteBtn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.editBtn:hover {
    background: #4f46e5;
}

.deleteBtn:hover {
    background: #dc2626;
}

/* ---------------- MODAL ---------------- */

.modal {
    position: fixed;
    height: 100vh;
    width: 100vw;
    top: 0;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal .bg {
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: #b681fc8f;
    backdrop-filter: blur(5px);
}

.modal .center {
    background-color: #3b0a7a;
    padding: var(--padding-xxl);
    border-radius: var(--border-radius-l);
    display: flex;
    flex-direction: column;
    gap: var(--padding-m);
    z-index: 10;
    width: min(90%, 400px);
}

.modal .center input,
.modal .center textarea {
    background-color: #c084fc;
    border: none;
    outline: none;
    color: #2e1065;
    padding: var(--padding-m);
    border-radius: var(--border-radius-s);
}

.modal .center button {
    background-color: #7c3aed;
    border: none;
    outline: none;
    color: var(--primary-text-color);
    padding: var(--padding-m) var(--padding-l);
    cursor: pointer;
    border-radius: var(--border-radius-m);
    width: fit-content;
    align-self: center;
}

.modal .center button:hover {
    background-color: #6d28d9;
}

/* ---------------- RESPONSIVE BREAKPOINTS ---------------- */

@media (max-width: 1024px) {
    section { gap: 20px; }
    section .task-column { flex: 1 1 45%; }
}

@media (max-width: 768px) {
    nav { flex-direction: column; gap: 10px; align-items: flex-start; }
    section { flex-direction: column; }
    section .task-column { width: 100%; max-height: none; }
}

@media (max-width: 480px) {
    nav button { width: 100%; }
    .task-actions { justify-content: space-between; }
    section { padding: 20px 12px; }
    .task { font-size: 0.9rem; }
}

/* ---------------- DEVELOPER CREDITS ---------------- */

.developerCredits {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.dcBody {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    font-size: 14px;
}

.dcBody span { font-weight: 500; }
.dcBody a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dcBody a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.dcBody i { font-size: 16px; }
.nav-btn { background: #7c3aed; padding: 6px 12px; }
.nav-btn:hover { background: #6d28d9; }