* { margin: 0; padding: 0; box-sizing: border-box; } html { overscroll-behavior: none; } :root { --card-bg: rgba(255, 255, 255, 0.55); --card-border: rgba(255, 255, 255, 0.45); --card-hover: rgba(255, 255, 255, 0.7); --card-shadow: 0 2px 12px rgba(60, 60, 120, 0.1); --subtask-bg: rgba(255, 255, 255, 0.14); --subtask-border: rgba(255, 255, 255, 0.12); --text-primary: #0f172a; --text-secondary: #334155; --text-muted: #475569; --accent: #6366f1; --accent-hover: #4f46e5; --accent-soft: rgba(99, 102, 241, 0.15); --green: #059669; --green-hover: #047857; --green-soft: rgba(5, 150, 105, 0.18); --amber: #f59e0b; --amber-soft: rgba(245, 158, 11, 0.15); --rose: #e11d48; --rose-soft: rgba(225, 29, 72, 0.12); --purple: #7c3aed; --purple-soft: rgba(124, 58, 237, 0.15); --sky: #0284c7; --sky-soft: rgba(2, 132, 199, 0.15); --input-bg: rgba(255, 255, 255, 0.7); --input-border: rgba(148, 163, 184, 0.4); --input-focus: #6366f1; --radius: 12px; --radius-sm: 8px; --blur: 18px; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; min-height: 100vh; padding: 16px; color: var(--text-primary); background: linear-gradient( 135deg, rgba(165, 180, 252, 0.45) 0%, rgba(196, 181, 253, 0.35) 30%, rgba(165, 243, 252, 0.3) 60%, rgba(167, 243, 208, 0.35) 100% ), url('img/background.jpg') center / cover no-repeat fixed; background-color: #c7d2fe; overscroll-behavior: none; } .container { max-width: 900px; margin: 0 auto; } /* ─── Progress Tower ─── */ .progress-tower { position: fixed; left: 46px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; z-index: 9000; transition: opacity 0.3s; } .progress-tower.hidden { opacity: 0; pointer-events: none; } .tower-percentage { font-size: 1.3em; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; margin-bottom: 6px; } /* Tower roof */ .tower-roof { width: 0; height: 0; border-left: 40px solid transparent; border-right: 40px solid transparent; border-bottom: 28px solid rgba(255, 255, 255, 0.75); margin-bottom: -1px; filter: drop-shadow(0 -2px 4px rgba(60, 60, 120, 0.1)); } .tower-body { position: relative; width: 68px; height: 550px; background: rgba(255, 255, 255, 0.35); border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 3px 3px 6px 6px; overflow: hidden; box-shadow: 0 4px 20px rgba(60, 60, 120, 0.12); } /* Floors grid overlaying the fill */ .tower-floors { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; pointer-events: none; } .tower-floor { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border-bottom: 2px solid rgba(255, 255, 255, 0.45); } .tower-floor:last-child { border-bottom: none; } .tower-window { width: 22px; height: 24px; background: rgba(255, 255, 255, 0.2); border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 2px 2px 0 0; position: relative; } /* Cross divider */ .tower-window::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1.5px; background: rgba(255, 255, 255, 0.55); transform: translateX(-50%); } .tower-window::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: rgba(255, 255, 255, 0.55); transform: translateY(-50%); } .tower-fill { position: absolute; bottom: 0; left: 0; width: 100%; height: 0%; background: linear-gradient( to top, var(--accent) 0%, #818cf8 30%, #a78bfa 50%, #7dd3fc 70%, var(--green) 100% ); z-index: 1; transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.3); } /* Base / foundation */ .tower-base { width: 80px; height: 12px; background: rgba(255, 255, 255, 0.75); border-radius: 0 0 6px 6px; border: 2px solid rgba(255, 255, 255, 0.6); border-top: none; box-shadow: 0 4px 10px rgba(60, 60, 120, 0.1); margin-top: -1px; } .tower-count { font-size: 0.88em; font-weight: 700; color: var(--text-muted); white-space: nowrap; margin-top: 8px; } .tower-count span { color: var(--text-primary); } /* ─── Greeting Banner ─── */ .greeting-banner { padding: 10px 0 2px; margin-bottom: 6px; } .greeting-banner .greeting-text { font-size: 1.2em; font-weight: 700; color: var(--text-primary); } .greeting-banner .greeting-sub { font-size: 0.85em; color: var(--text-secondary); margin-top: 2px; font-weight: 500; } /* ─── Header ─── */ header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; } h1 { font-size: 1.4em; color: var(--text-primary); font-weight: 700; letter-spacing: -0.3px; } .header-actions { display: flex; align-items: center; gap: 10px; } /* ─── View Toggle ─── */ .view-toggle { display: flex; background: rgba(255, 255, 255, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: var(--radius-sm); border: 1px solid var(--card-border); overflow: hidden; } .toggle-btn { padding: 7px 16px; font-size: 0.85em; background: transparent; color: var(--text-secondary); border: none; cursor: pointer; transition: all 0.2s; font-weight: 500; display: flex; align-items: center; gap: 6px; } .toggle-btn:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.3); } .toggle-btn.active { background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); } .archive-count { background: rgba(255, 255, 255, 0.25); padding: 1px 7px; border-radius: 10px; font-size: 0.8em; font-weight: 600; min-width: 20px; text-align: center; } .toggle-btn:not(.active) .archive-count { background: var(--accent-soft); color: var(--accent); } /* ─── Context Menu ─── */ .context-menu { position: fixed; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06); z-index: 2000; min-width: 170px; display: none; overflow: hidden; } .context-menu.show { display: block; } .context-menu-item { padding: 9px 14px; cursor: pointer; transition: background 0.15s; font-size: 0.85em; border-bottom: 1px solid rgba(0, 0, 0, 0.04); display: flex; align-items: center; gap: 8px; color: var(--text-primary); } .context-menu-item:last-child { border-bottom: none; } .context-menu-item:hover { background: var(--accent-soft); color: var(--accent); } .context-menu-item.danger:hover { background: var(--rose-soft); color: var(--rose); } /* ─── Confirm Dialog ─── */ .confirm-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 2000; align-items: center; justify-content: center; } .confirm-overlay.open { display: flex; } .confirm-dialog { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 16px; padding: 28px 32px 22px; min-width: 300px; max-width: 360px; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); border: 1px solid rgba(255, 255, 255, 0.6); animation: confirmIn 0.2s ease; } @keyframes confirmIn { from { opacity: 0; transform: scale(0.92) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } } .confirm-icon { font-size: 2.2em; margin-bottom: 10px; } .confirm-message { font-size: 0.95em; color: var(--text-primary); font-weight: 500; margin-bottom: 20px; line-height: 1.4; } .confirm-actions { display: flex; gap: 10px; justify-content: center; } .btn-confirm-cancel, .btn-confirm-delete { padding: 8px 22px; border-radius: var(--radius-sm); font-size: 0.88em; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; } .btn-confirm-cancel { background: rgba(0, 0, 0, 0.06); color: var(--text-secondary); } .btn-confirm-cancel:hover { background: rgba(0, 0, 0, 0.1); color: var(--text-primary); } .btn-confirm-delete { background: var(--rose); color: white; box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25); } .btn-confirm-delete:hover { background: #be123c; box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35); } /* ─── Modal ─── */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.3); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; } .modal.open { display: flex; } .modal-content { background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 16px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12); border: 1px solid rgba(255, 255, 255, 0.6); } .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); } .modal-header h2 { font-size: 1.1em; font-weight: 600; color: var(--text-primary); } .close-btn { background: none; border: none; font-size: 1.5em; color: var(--text-muted); cursor: pointer; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: all 0.2s; line-height: 1; } .close-btn:hover { background: var(--rose-soft); color: var(--rose); } .modal-content form { padding: 16px 20px; } /* ─── Form ─── */ .form-group { margin-bottom: 12px; } .form-row { display: grid; gap: 10px; } .form-row-2 { grid-template-columns: 1fr 1fr; } label { display: block; margin-bottom: 4px; font-weight: 500; color: var(--text-secondary); font-size: 0.82em; } input[type="text"], input[type="date"], select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--input-border); border-radius: var(--radius-sm); font-size: 0.9em; font-family: inherit; transition: all 0.2s; background: var(--input-bg); color: var(--text-primary); } input[type="text"]:focus, input[type="date"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--input-focus); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); } textarea { resize: vertical; } .checkbox-label { display: flex; align-items: center; gap: 6px; margin-top: 6px; cursor: pointer; font-size: 0.82em; color: var(--text-secondary); font-weight: 400; } .checkbox-label input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: var(--accent); } /* ─── Color Picker ─── */ .color-picker-row { display: flex; align-items: center; gap: 8px; } .color-input { width: 32px !important; height: 32px; padding: 1px !important; border: 2px solid var(--input-border) !important; border-radius: 6px !important; cursor: pointer; background: none !important; flex-shrink: 0; } .color-input::-webkit-color-swatch-wrapper { padding: 1px; } .color-input::-webkit-color-swatch { border: none; border-radius: 3px; } .color-presets { display: flex; gap: 4px; flex-wrap: wrap; } .color-dot { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; flex-shrink: 0; } .color-dot:hover { transform: scale(1.2); border-color: rgba(0, 0, 0, 0.15); } .color-dot.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8); } /* ─── Buttons ─── */ button { font-family: inherit; cursor: pointer; border: none; border-radius: var(--radius-sm); font-weight: 500; transition: all 0.2s; } .btn-primary { width: 100%; padding: 10px; font-size: 0.95em; background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25); } .btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35); } .btn-add { padding: 7px 16px; font-size: 0.85em; background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25); } .btn-add:hover { background: var(--accent-hover); } .btn-small { padding: 4px 10px; font-size: 0.78em; font-weight: 600; } .btn-complete { background: var(--green); color: white; box-shadow: 0 1px 4px rgba(5, 150, 105, 0.25); } .btn-complete:hover { background: var(--green-hover); box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35); } .btn-archive { background: var(--purple); color: white; box-shadow: 0 1px 4px rgba(124, 58, 237, 0.25); } .btn-archive:hover { background: #6d28d9; box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35); } .btn-restore { background: var(--sky-soft); color: var(--sky); } .btn-restore:hover { background: var(--sky); color: white; } .btn-delete { background: var(--rose-soft); color: var(--rose); } .btn-delete:hover { background: var(--rose); color: white; } /* ─── Tasks ─── */ .tasks-container { display: grid; gap: 8px; contain: layout style; } /* ─── Card ─── */ .task-card { backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--card-shadow); cursor: grab; transition: all 0.2s; border: 1px solid rgba(255, 255, 255, 0.35); position: relative; /* background set inline via JS using task color */ } .task-card:hover { box-shadow: 0 4px 20px rgba(60, 60, 120, 0.14); filter: brightness(1.04); } .task-card:active { cursor: grabbing; } .task-card.dragging { opacity: 0.4; } .task-card.archived-card { cursor: default; } .task-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; } .task-title { font-size: 0.95em; font-weight: 700; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .task-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; } .task-size-badge { padding: 2px 8px; border-radius: 10px; font-size: 0.7em; font-weight: 700; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.3px; } .task-size-badge.small { background: rgba(2, 132, 199, 0.22); color: #0c4a6e; } .task-size-badge.medium { background: rgba(245, 158, 11, 0.25); color: #92400e; } .task-size-badge.large { background: rgba(225, 29, 72, 0.2); color: #9f1239; } .task-description { color: var(--text-secondary); margin-bottom: 8px; font-size: 0.84em; font-weight: 500; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .task-description.expanded { -webkit-line-clamp: unset; display: block; overflow: visible; } /* ─── Due Date Badge ─── */ .due-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; font-size: 0.72em; font-weight: 700; white-space: nowrap; } .due-badge.due-ok { background: rgba(5, 150, 105, 0.25); color: #064e3b; } .due-badge.due-soon { background: rgba(245, 158, 11, 0.28); color: #92400e; } .due-badge.due-overdue { background: rgba(225, 29, 72, 0.25); color: #9f1239; } .due-badge.due-done { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); text-decoration: line-through; } /* ─── Progress ─── */ .progress-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .progress-bar { flex: 1; height: 6px; background: rgba(0, 0, 0, 0.08); border-radius: 3px; overflow: hidden; } .progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #a78bfa, var(--green)); transition: width 0.5s ease; border-radius: 3px; } .progress-text { font-size: 0.78em; font-weight: 700; color: var(--text-secondary); min-width: 32px; text-align: right; } /* ─── Reward ─── */ .reward-section { background: rgba(16, 185, 129, 0.08); padding: 5px 10px; border-radius: var(--radius-sm); margin-bottom: 6px; font-size: 0.82em; border: 1px solid rgba(16, 185, 129, 0.15); display: flex; align-items: center; gap: 6px; } .reward-hidden { color: var(--text-muted); font-style: italic; } .reward-revealed { color: #047857; font-weight: 600; animation: rewardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); } /* ─── Task Actions ─── */ .task-actions { display: flex; gap: 6px; margin-top: 6px; } /* ─── Subtask Collapse Toggle ─── */ .subtask-toggle { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 8px; cursor: pointer; border: none; background: rgba(99, 102, 241, 0.08); border-radius: var(--radius-sm); color: var(--accent); font-size: 0.78em; font-weight: 600; transition: all 0.15s; } .subtask-toggle:hover { background: var(--accent-soft); } .subtask-toggle .toggle-arrow { display: inline-block; transition: transform 0.2s; font-size: 0.8em; } .subtask-toggle.collapsed .toggle-arrow { transform: rotate(-90deg); } /* ─── Subtasks ─── */ .subtasks-container { margin-top: 6px; padding-left: 12px; border-left: 2px solid rgba(99, 102, 241, 0.25); overflow: hidden; transition: max-height 0.3s ease, opacity 0.2s ease; } .subtasks-container.collapsed { max-height: 0 !important; opacity: 0; margin-top: 0; } .subtask { background: var(--subtask-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 4px; cursor: grab; font-size: 0.85em; border: 1px solid var(--subtask-border); position: relative; transition: all 0.15s; } .subtask:last-child { margin-bottom: 0; } .subtask:hover { background: rgba(255, 255, 255, 0.28); border-color: rgba(99, 102, 241, 0.2); } .subtask:active { cursor: grabbing; } .subtask.dragging { opacity: 0.4; } .subtask-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 6px; } .subtask-title { font-weight: 700; color: var(--text-primary); font-size: 0.92em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .subtask-progress-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; } .subtask-progress { flex: 1; height: 4px; background: rgba(0, 0, 0, 0.08); border-radius: 2px; overflow: hidden; } .subtask-progress-fill { height: 100%; background: var(--green); transition: width 0.3s ease; border-radius: 2px; } .subtask-actions { display: flex; gap: 4px; margin-top: 4px; } /* ─── Drop Zone ─── */ .drop-zone { border: 2px dashed rgba(99, 102, 241, 0.3); border-radius: var(--radius-sm); text-align: center; color: var(--text-muted); font-size: 0.8em; transition: all 0.2s; opacity: 0; max-height: 0; overflow: hidden; padding: 0; margin-top: 0; } .drop-zone.visible { opacity: 1; max-height: 60px; padding: 10px; margin-top: 8px; } .drop-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); } /* ─── Completed ─── */ .completed .task-title, .completed .subtask-title { text-decoration: line-through; color: var(--text-muted); } .completed { opacity: 0.75; } /* ─── Empty / Loading ─── */ .empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); } .empty-state h2 { font-size: 1.2em; margin-bottom: 6px; color: var(--text-secondary); } .empty-state p { font-size: 0.9em; } .loading { text-align: center; padding: 50px 20px; color: var(--text-muted); } .spinner { border: 3px solid rgba(0, 0, 0, 0.08); border-top: 3px solid var(--accent); border-radius: 50%; width: 32px; height: 32px; animation: spin 1s linear infinite; margin: 0 auto 12px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* ─── Animations ─── */ @keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } } @keyframes rewardPop { 0% { transform: scale(0.8); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } } .confetti-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; } /* ─── Drop Indicator ─── */ .drop-indicator { position: fixed; height: 3px; background: var(--accent); border-radius: 2px; z-index: 100; pointer-events: none; box-shadow: 0 0 8px rgba(99, 102, 241, 0.5); transition: top 0.08s ease; } .drop-indicator::before, .drop-indicator::after { content: ''; position: absolute; top: -4px; width: 11px; height: 11px; background: var(--accent); border-radius: 50%; } .drop-indicator::before { left: -5px; } .drop-indicator::after { right: -5px; } .drop-indicator-subtask { height: 2px; box-shadow: 0 0 6px rgba(99, 102, 241, 0.4); } .drop-indicator-subtask::before, .drop-indicator-subtask::after { width: 8px; height: 8px; top: -3px; } .drop-indicator-subtask::before { left: -4px; } .drop-indicator-subtask::after { right: -4px; } .task-card.just-completed { animation: completeFlash 0.6s ease; } @keyframes completeFlash { 0% { box-shadow: var(--card-shadow); } 40% { box-shadow: 0 0 20px rgba(5, 150, 105, 0.35), 0 0 40px rgba(5, 150, 105, 0.15); } 100% { box-shadow: var(--card-shadow); } } /* ─── Responsive ─── */ @media (max-width: 640px) { body { padding: 12px; } h1 { font-size: 1.2em; } header { flex-direction: column; align-items: stretch; } .header-actions { justify-content: space-between; } .view-toggle { margin-left: auto; } .form-row-2 { grid-template-columns: 1fr; } .progress-tower { left: 8px; } .tower-body { width: 46px; height: 340px; } .tower-roof { border-left-width: 26px; border-right-width: 26px; border-bottom-width: 18px; } .tower-base { width: 54px; height: 8px; } .tower-window { width: 14px; height: 14px; } .tower-floor { gap: 0; } .tower-percentage { font-size: 0.9em; } .tower-count { font-size: 0.65em; } .subtask { backdrop-filter: none; -webkit-backdrop-filter: none; } .greeting-banner .greeting-text { font-size: 1em; } }