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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('mountain.png') center/cover no-repeat fixed;
    color: #2c3e50;
    min-height: 100vh;
}

/* ---- Login Screen ---- */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(10, 15, 25, 0.45);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-screen.hidden {
    display: none;
}

.login-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 24px;
    padding: 48px 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: loginIn 0.6s ease-out;
    margin-top: 19px;
}

@keyframes loginIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-weight: 500;
}

.login-field {
    margin-bottom: 16px;
}

.login-field input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.login-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-field input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
}

.login-btn {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    background: rgba(233, 69, 96, 0.85);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    backdrop-filter: blur(4px);
}

.login-btn:hover {
    background: rgba(233, 69, 96, 1);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    text-align: center;
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 14px;
    min-height: 18px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ---- Header / Nav ---- */
header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: none;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-btn {
    background: none;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    color: #fff;
    border-color: #5b7fe9;
    background: #5b7fe9;
}

.btn-add {
    background: #4caf50 !important;
    color: #fff !important;
    border-color: #4caf50 !important;
}

.btn-add:hover {
    background: #43a047 !important;
    border-color: #43a047 !important;
}

.nav-left {
    display: flex;
    gap: 8px;
}

.nav-right {
    display: flex;
    gap: 8px;
}

.btn-logout {
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: transparent !important;
    background: none !important;
}

.btn-logout:hover {
    color: #ff8a9e !important;
    background: rgba(233, 69, 96, 0.15) !important;
}

/* ---- Views ---- */
.view {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.view.active {
    display: block;
}

/* ---- Columns (Kanban) ---- */
.columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    min-height: calc(100vh - 100px);
}

.column {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: none;
}

.column h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#col-created h2 { color: #7ab8ff; }
#col-in-progress h2 { color: #f0c36d; }
#col-review h2 { color: #c9a0e5; }
#col-done h2 { color: #7dda82; }

.column-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 8px 0;
    min-height: 200px;
}

/* ---- Task Cards (Liquid Glass) ---- */
.bubble {
    border-radius: 14px;
    display: flex;
    align-items: flex-start;
    text-align: left;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    position: relative;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    word-break: break-word;
    padding: 14px 18px;
    line-height: 1.3;
    flex-shrink: 0;
    user-select: none;
    width: 100%;
    max-width: 260px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: none;
    overflow: visible;
    padding-left: 24px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0.06) 100%);
    backdrop-filter: blur(20px) saturate(1.4) brightness(1.05);
    -webkit-backdrop-filter: blur(20px) saturate(1.4) brightness(1.05);
    box-shadow: none;
}

.bubble:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.11) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.08) 100%);
}

.bubble:active {
    transform: translateY(0) scale(0.97);
}

/* Liquid Glass — priority sizes */
.bubble.red {
    min-height: 85px;
    padding: 18px 20px;
}

.bubble.orange {
    min-height: 85px;
    padding: 16px 18px;
}

.bubble.yellow {
    min-height: 70px;
    padding: 13px 16px;
}

.bubble.green {
    min-height: 70px;
    padding: 10px 14px;
}

/* ---- Priority color variables ---- */
.bubble.red {
    --bar-color: 255, 60, 60;
}
.bubble.orange {
    --bar-color: 255, 150, 30;
}
.bubble.yellow {
    --bar-color: 255, 220, 40;
}
.bubble.green {
    --bar-color: 60, 210, 70;
}

/* ---- Glowing capsule bar (left side) ---- */
.bubble::after {
    content: '';
    position: absolute;
    left: 0px;
    top: 14%;
    bottom: 14%;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg,
        rgba(var(--bar-color), 0.4) 0%,
        rgba(var(--bar-color), 1) 15%,
        rgba(var(--bar-color), 1) 85%,
        rgba(var(--bar-color), 0.4) 100%);
    box-shadow:
        0 0 6px rgba(var(--bar-color), 0.7),
        0 0 14px rgba(var(--bar-color), 0.4),
        0 0 24px rgba(var(--bar-color), 0.2);
    pointer-events: none;
    z-index: 2;
}

/* Soft core highlight inside the capsule */
.bubble::before {
    content: '';
    position: absolute;
    left: 0px;
    top: 18%;
    bottom: 18%;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 25%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.3) 75%,
        transparent 100%);
    filter: blur(1.5px);
    pointer-events: none;
    z-index: 3;
}

.bubble .bubble-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 100%;
    z-index: 1;
}

.bubble .bubble-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.bubble .bubble-desc {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ---- Completed View ---- */
.completed-list {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: none;
}

.completed-list h2 {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.completed-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: background 0.2s;
    cursor: pointer;
}

.completed-item:hover {
    background: rgba(255, 255, 255, 0.18);
}

.completed-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.completed-dot::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 2px;
    width: 60%;
    height: 45%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    pointer-events: none;
}

.completed-dot.red {
    background: radial-gradient(circle at 35% 35%, #ff7b8e, #e94560);
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.completed-dot.orange {
    background: radial-gradient(circle at 35% 35%, #ffab6b, #ff8c42);
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.completed-dot.yellow {
    background: radial-gradient(circle at 35% 35%, #ffe566, #fdd835);
    box-shadow: 0 2px 8px rgba(253, 216, 53, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.completed-dot.green {
    background: radial-gradient(circle at 35% 35%, #6bcf6f, #4caf50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.completed-item-name {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}

.completed-item-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    flex-shrink: 0;
}

.completed-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 60px 20px;
    font-size: 16px;
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: rgba(20, 30, 50, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    animation: modalIn 0.2s ease-out;
    border: none;
}

.modal-detail {
    max-width: 660px;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-header h2 {
    font-size: 18px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.modal-body input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.modal-body input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
}

/* Priority picker */
.priority-picker {
    display: flex;
    gap: 12px;
    margin: 8px 0 6px;
}

.priority-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.priority-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50% 50% 0 0;
    pointer-events: none;
}

.priority-btn:hover {
    transform: scale(1.2);
}

.priority-btn.selected {
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.priority-btn.red {
    background: radial-gradient(circle at 35% 35%, rgba(255, 107, 107, 0.8), rgba(233, 69, 96, 0.9));
    box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(233, 69, 96, 0.3);
}

.priority-btn.orange {
    background: radial-gradient(circle at 35% 35%, rgba(255, 179, 71, 0.8), rgba(255, 140, 66, 0.9));
    box-shadow: 0 4px 14px rgba(255, 140, 66, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(255, 140, 66, 0.3);
}

.priority-btn.yellow {
    background: radial-gradient(circle at 35% 35%, rgba(255, 241, 118, 0.8), rgba(253, 216, 53, 0.9));
    box-shadow: 0 4px 14px rgba(253, 216, 53, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(253, 216, 53, 0.3);
}

.priority-btn.green {
    background: radial-gradient(circle at 35% 35%, rgba(129, 199, 132, 0.8), rgba(76, 175, 80, 0.9));
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(76, 175, 80, 0.3);
}

.priority-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

/* Buttons */
.btn-save {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #43a047;
}

/* Detail title editing */
.detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.detail-title-input {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px 8px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.detail-title-input:disabled {
    color: #fff;
    cursor: default;
    opacity: 1;
}

.detail-title-input:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.detail-title-input:not(:disabled):focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-edit-title {
    background: none;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.btn-edit-title:hover {
    color: #ff8a9e;
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.3);
}

.btn-edit-title.active {
    color: #7dda82;
    border-color: rgba(125, 218, 130, 0.3);
    background: rgba(125, 218, 130, 0.1);
}

/* Detail modal */
.detail-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

#detail-description,
#detail-progress {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
    line-height: 1.6;
}

#detail-description:focus,
#detail-progress:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
}

.detail-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.detail-actions select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.detail-actions select option {
    background: #2c3e50;
    color: #fff;
}

.detail-actions select:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.detail-actions .btn-save {
    width: auto;
    flex: 1;
    padding: 10px 20px;
}

.btn-delete {
    padding: 10px 16px;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    border-color: #ff8a9e;
    color: #ff8a9e;
    background: rgba(233,69,96,0.15);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .columns {
        grid-template-columns: 1fr;
    }

    .column {
        min-height: auto;
    }

    .column-body {
        flex-direction: column;
        align-items: stretch;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }
}

/* Codeword modal */
.modal-codeword {
    max-width: 400px;
}

.codeword-error {
    color: #ff6b6b;
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 12px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Empty state */
.column-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    text-align: center;
    padding: 40px 10px;
}
