:root {
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --primary: #0f172a;
    --primary-hover: #1e293b;
    
    --priority-high: #ef4444;
    --priority-mid: #f59e0b;
    --priority-low: #10b981;

    /* Premium Sticky Note Colors */
    --note-yellow: #FFE58F;
    --note-blue: #91D5FF;
    --note-pink: #FFADD2;
    --note-green: #B7EB8F;
    --note-purple: #D3ADF7;

    --brand-color: #6C36FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-layout { display: flex; height: 100vh; }

.sidebar {
    width: 280px; background-color: var(--sidebar-bg); border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem; display: flex; flex-direction: column; flex-shrink: 0; z-index: 10;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02); overflow-y: auto;
}

.sidebar-header { margin-bottom: 1.5rem; }

/* Lobster Typography for Brand Title */
.brand-title { 
    font-family: 'Lobster', cursive; 
    color: var(--brand-color); 
    font-size: 2.1rem; 
    font-weight: 400; 
    letter-spacing: 1px; 
    margin-bottom: 0.25rem; 
    line-height: 1.1;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.05);
}

.sidebar-header p { font-size: 0.85rem; color: var(--text-muted); }

.minimal-form { display: flex; flex-direction: column; gap: 1rem; flex-grow: 1; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }

input[type="text"], textarea { width: 100%; border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6rem; font-size: 0.85rem; color: var(--text-main); background: #f8fafc; transition: all 0.2s; outline: none; }
input::placeholder, textarea::placeholder { color: #d1d5db; }
textarea { resize: vertical; min-height: 60px; }
input[type="text"]:focus, textarea:focus { border-color: var(--primary); background: #ffffff; box-shadow: 0 0 0 3px rgba(108, 54, 255, 0.1); }

.segmented-control { display: flex; background: #f1f5f9; padding: 4px; border-radius: 8px; border: 1px solid var(--border-color); }
.segmented-control input { display: none; }
.segmented-control label { flex: 1; text-align: center; padding: 0.4rem 0; font-size: 0.75rem; font-weight: 500; border-radius: 6px; cursor: pointer; transition: all 0.2s; color: var(--text-muted); }
#priority-low:checked + label { background: #fff; color: var(--priority-low); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
#priority-mid:checked + label { background: #fff; color: var(--priority-mid); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
#priority-high:checked + label { background: #fff; color: var(--priority-high); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.color-picker { display: flex; gap: 0.6rem; margin-top: 0.25rem; }
.color-picker input { display: none; }
.swatch { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 2px solid transparent; display: inline-block; }
.swatch.yellow { background-color: var(--note-yellow); }
.swatch.blue { background-color: var(--note-blue); }
.swatch.pink { background-color: var(--note-pink); }
.swatch.green { background-color: var(--note-green); }
.swatch.purple { background-color: var(--note-purple); }
.color-picker input:checked + .swatch { transform: scale(1.15); box-shadow: 0 0 0 2px white, 0 0 0 3px var(--primary); }

.submit-btn { background: var(--primary); color: white; border: none; padding: 0.75rem; border-radius: 2px; font-weight: 500; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; margin-top: 0.5rem; display: flex; justify-content: center; gap: 0.5rem; align-items: center; }
.submit-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }

.sidebar-footer { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 2rem; display: flex; flex-direction: column; gap: 0.5rem;}
.creator-mark { margin-top: 1rem; font-size: 0.7rem; color: var(--text-muted); opacity: 0.5; font-weight: 500; letter-spacing: 0.5px; transition: opacity 0.2s; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.creator-mark:hover { opacity: 1; }
.creator-mark span { font-weight: 400; font-style: italic; margin-right: 2px; }
.social-links { display: flex; gap: 0.6rem; font-size: 0.85rem; }
.social-links a { color: var(--text-muted); transition: color 0.2s; text-decoration: none; }
.social-links a:hover { color: var(--brand-color); }
.bin-toggle-btn { background: none; border: 1px dashed var(--border-color); color: var(--text-muted); padding: 0.5rem; border-radius: 8px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.85rem;}
.bin-toggle-btn:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

.main-content { flex-grow: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.view-header { padding: 1.5rem 2rem; display: flex; justify-content: flex-end; z-index: 10; pointer-events: none; }
.view-toggles { display: flex; background: var(--sidebar-bg); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.02); pointer-events: auto; }
.toggle-btn { background: none; border: none; padding: 0.5rem 1.2rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.2s; display: flex; gap: 0.5rem; align-items: center; }
.toggle-btn:hover { background: #f8fafc; }
.toggle-btn.active { background: var(--primary); color: white; }

.view-container { flex-grow: 1; position: relative; width: 100%; height: 100%; top: -75px;}
.view-panel { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; display: flex; flex-direction: column; }
.view-panel.active { opacity: 1; pointer-events: auto; }

#board-view { background-image: radial-gradient(var(--border-color) 1px, transparent 1px); background-size: 24px 24px; }
#sticky-board { position: relative; width: 100%; height: 100%; overflow: hidden; }

/* Interactive Trash Bin (Board) */
.trash-bin {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
}
.trash-bin:hover .trash-icon-wrap {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}
.trash-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}
.trash-icon-wrap {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.trash-svg {
    color: #94a3b8;
    transition: color 0.3s;
}
.trash-lid {
    transform-origin: 80px 25px;
    transition: transform 0.1s ease-out;
}

/* State when actively dragging a note anywhere */
.trash-bin.active-drag .trash-text {
    opacity: 1;
    transform: translateX(0);
}
.trash-bin.active-drag .trash-icon-wrap {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

/* State when completely hovering/dropping over the bin */
.trash-bin.highlight .trash-icon-wrap {
    background: #fee2e2;
    border-color: #ef4444;
    transform: scale(1.15);
}
.trash-bin.highlight .trash-svg { color: #ef4444; }
.trash-bin.highlight .trash-text { color: #ef4444; }


/* Sticky Notes */
.sticky-note {
    position: absolute;
    width: 200px;
    height: 200px;
    padding: 1.25rem 1rem 1rem 1.25rem;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.08);
    cursor: grab;
    display: flex;
    flex-direction: column;
    transition: transform 0.1s;
    user-select: none;
    overflow: hidden;
}
.sticky-note:active { cursor: grabbing; box-shadow: 5px 10px 25px rgba(0,0,0,0.15); }
.sticky-note.dragging { opacity: 0.95; z-index: 1000 !important; }

/* Accomplished state */
.sticky-note.accomplished { opacity: 0.65; filter: grayscale(0.5); }
.sticky-note.accomplished::after { content: '\f00c'; font-family: 'FontAwesome'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); font-size: 5rem; color: rgba(0, 0, 0, 0.12); pointer-events: none; z-index: 10; }
.sticky-note.accomplished .note-title { text-decoration: line-through; color: rgba(0,0,0,0.5); }
.sticky-note::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 60px; height: 25px; background-color: rgba(255, 255, 255, 0.4); box-shadow: 0 1px 3px rgba(0,0,0,0.05); z-index: 2; }

.note-title { font-family: 'Kalam', cursive; font-size: 1.35rem; font-weight: 700; color: #1a1a1a; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none; }
.note-desc { font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 400; color: rgba(0,0,0,0.6); margin-top: 0.5rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none; line-height: 1.4; }

.note-priority { position: absolute; bottom: 12px; right: 12px; width: 12px; height: 12px; border-radius: 50%; pointer-events: none; }
.note-priority.high { background: var(--priority-high); }
.note-priority.mid { background: var(--priority-mid); }
.note-priority.low { background: var(--priority-low); }

/* Sticky Note Actions Hover */
.note-actions { position: absolute; bottom: 10px; left: 10px; display: flex; gap: 0.5rem; opacity: 0; transition: opacity 0.2s; z-index: 20; }
.sticky-note:hover .note-actions { opacity: 1; }
.mini-btn { background: rgba(255, 255, 255, 0.6); border: none; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; color: var(--text-main); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: all 0.2s; }
.mini-btn:hover { background: white; transform: scale(1.1); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.mini-btn.quick-done:hover { color: var(--priority-low); }
.mini-btn.quick-cal:hover { color: var(--primary-blue); }

.bg-yellow { background-color: var(--note-yellow); }
.bg-blue { background-color: var(--note-blue); }
.bg-pink { background-color: var(--note-pink); }
.bg-green { background-color: var(--note-green); }
.bg-purple { background-color: var(--note-purple); }

/* List View */
#list-view { padding: 40px 3rem 3rem 3rem; overflow-y: auto; align-items: center; }
.list-instructions { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; opacity: 0.6; }
.task-list { width: 100%; max-width: 750px; display: flex; flex-direction: column; gap: 0; margin: 0 auto; }
.empty-list { text-align: center; color: var(--text-muted); font-size: 0.95rem; padding: 3rem; background: white; border: 1px dashed var(--border-color); border-radius: 12px; }

/* Notion-like Task Card for List View */
.task-card { 
    background: transparent; 
    border-bottom: 1px solid var(--border-color); 
    padding: 0.75rem 0.25rem; 
    display: flex; align-items: center; gap: 0.8rem;
    transition: background 0.1s; cursor: grab; position: relative;
    user-select: none;
}
.task-card:last-child { border-bottom: none; }
.task-card:active { cursor: grabbing; background: #e2e8f0; z-index: 10;}
.task-card:hover { background: #f8fafc; border-radius: 6px; }
.task-card.dragging { opacity: 0.5; }

/* Drag Handle */
.drag-handle { color: var(--text-muted); cursor: grab; font-size: 1rem; padding: 0.2rem 0.35rem; transition: 0.1s; opacity: 0; border-radius: 4px; }
.task-card:hover .drag-handle { opacity: 0.4; }
.drag-handle:hover { background: #cbd5e1 !important; opacity: 1 !important; }

/* Checklist toggle */
.task-checklist {
    width: 18px; height: 18px; border: 1.5px solid #cbd5e1; border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.1s;
    color: transparent; background: transparent;
}
.task-card.accomplished .task-checklist {
    background: var(--brand-color); border-color: var(--brand-color); color: white;
}
.task-card.accomplished .task-checklist i { font-size: 0.65rem; }
.task-checklist:hover { background: rgba(0,0,0,0.05); }

.task-details { flex-grow: 1; display: flex; flex-direction: column; gap: 0.2rem;}
.task-details h3 { font-size: 0.95rem; font-weight: 500; color: var(--text-main); display: flex; align-items: center; margin: 0;}
.list-color-indicator { width: 10px; height: 10px; border-radius: 50%; margin-right: 0.6rem; display: inline-block; }
.task-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 1rem; }

/* Secondary Actions on Hover */
.list-actions { display: flex; gap: 0.2rem; opacity: 0; transition: 0.1s; }
.task-card:hover .list-actions { opacity: 1; }
.list-action-btn { background: transparent; border: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; color: var(--text-muted); transition: 0.1s; display: flex; align-items: center; justify-content: center; }
.list-action-btn:hover { background: #e2e8f0; color: var(--text-main); }
.list-action-btn.del-btn:hover { background: #fee2e2; color: var(--priority-high); }
.list-action-btn.cal-btn:hover { color: var(--primary-blue); }

/* List Section Headers */
.list-section-header { width: 100%; max-width: 750px; margin: 0 auto 0.5rem auto; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.25rem; user-select: none; }
.list-section-header i { font-size: 0.75rem;}

/* Completed List Section */
.completed-section { width: 100%; max-width: 750px; margin: 2rem auto 0 auto; }
.toggle-completed-btn { background: transparent; border: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.25rem; border-radius: 6px; transition: 0.2s; margin-bottom: 0.5rem; user-select: none; }
.toggle-completed-btn:hover { background: #f1f5f9; color: var(--text-main); }
.toggle-completed-btn i { transition: transform 0.2s; font-size: 0.75rem;}
.toggle-completed-btn.collapsed i { transform: rotate(-90deg); }
#completed-list { transition: all 0.3s; overflow: hidden; }

/* Accomplished Tasks Styling */
.task-card.accomplished { opacity: 0.5; background: transparent; }
.task-card.accomplished h3 { text-decoration: line-through; color: var(--text-muted); }

/* Modals */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal.visible { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); }
.modal-content { background: white; border-radius: 16px; width: 100%; max-width: 450px; padding: 2.5rem; position: relative; z-index: 1; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); max-height: 90vh; overflow-y: auto;}
.modal.visible .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: 0.2s; z-index: 10; }
.modal-close:hover { background: #e2e8f0; color: var(--primary); }

.modal-header { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.modal-badge { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 6px; letter-spacing: 0.5px; }
.badge-high { background: #fee2e2; color: var(--priority-high); }
.badge-mid { background: #fef3c7; color: var(--priority-mid); }
.badge-low { background: #d1fae5; color: var(--priority-low); }
.badge-done { background: #d1fae5; color: var(--priority-low); border: 1px solid #10b981; }
.hidden { display: none !important; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }

.modal h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--primary); line-height: 1.3; }
.modal.accomplished h2 { text-decoration: line-through; color: var(--text-muted); }
.modal-meta { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.modal-desc-box { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; margin-bottom: 2rem; min-height: 60px; }
.modal-desc-box p { font-size: 0.95rem; color: #334155; line-height: 1.5; white-space: pre-wrap; }

.modal-actions { display: flex; gap: 0.75rem; }
.btn { flex: 1; padding: 0.75rem; border-radius: 8px; font-weight: 500; font-size: 0.95rem; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: 0.2s; }
.btn.secondary { background: #f1f5f9; color: var(--primary); border: 1px solid var(--border-color); flex: 0.4;}
.btn.secondary:hover { background: #e2e8f0; }
.btn.danger { background: white; color: var(--priority-high); border: 1px solid #fecaca; flex: 0.4;}
.btn.danger:hover { background: #fee2e2; }
.btn.success { background: #ecfdf5; color: #10b981; border: 1px solid #a7f3d0; }
.btn.success:hover { background: #d1fae5; }
.btn.success.undo { background: #fff7ed; color: #f59e0b; border: 1px solid #fde68a; }
.btn.success.undo:hover { background: #fef3c7; }

/* Recycle Bin Modal Specifics */
.bin-content { max-width: 500px; }
.bin-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.bin-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; max-height: 300px; overflow-y: auto; }
.bin-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; background: #f8fafc; }
.bin-item-title { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); text-decoration: line-through; }
.bin-item-actions { display: flex; gap: 0.5rem; }
.bin-actions { justify-content: flex-end; }
