/* ===== CSS Variables & Reset ===== */ :root { --bg-primary: #0f0f1a; --bg-secondary: #1a1a2e; --bg-card: #16213e; --bg-card-hover: #1a2744; --bg-input: #0d1b36; --border-color: #2a2a4a; --border-focus: #6c63ff; --text-primary: #e8e8f0; --text-secondary: #9898b0; --text-muted: #6868880; --accent: #6c63ff; --accent-hover: #5a52e0; --accent-glow: rgba(108, 99, 255, 0.3); --success: #2ecc71; --success-bg: rgba(46, 204, 113, 0.12); --danger: #e74c3c; --danger-hover: #c0392b; --warning: #f39c12; --gradient-1: linear-gradient(135deg, #6c63ff 0%, #3f8efc 100%); --gradient-2: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%); --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2); --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3); --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4); --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.15); --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1); } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; } /* ===== App Container ===== */ .app-container { max-width: 800px; margin: 0 auto; padding: 0 20px; min-height: 100vh; display: flex; flex-direction: column; } /* ===== Header ===== */ .app-header { padding: 32px 0 24px; border-bottom: 1px solid var(--border-color); margin-bottom: 32px; } .header-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; } .logo { display: flex; align-items: center; gap: 12px; } .logo-icon { width: 48px; height: 48px; background: var(--gradient-1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; box-shadow: var(--shadow-glow); } .logo h1 { font-size: 1.75rem; font-weight: 700; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .header-stats { display: flex; gap: 20px; } .stat { text-align: center; padding: 8px 16px; background: var(--bg-secondary); border-radius: var(--radius-sm); border: 1px solid var(--border-color); min-width: 70px; transition: var(--transition); } .stat:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); } .stat-value { display: block; font-size: 1.25rem; font-weight: 700; color: var(--accent); } .stat-label { display: block; font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; } /* ===== Add Task Form ===== */ .add-task-section { margin-bottom: 24px; } .add-task-form { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-md); transition: var(--transition); } .add-task-form:focus-within { border-color: var(--accent); box-shadow: var(--shadow-glow), var(--shadow-md); } .form-row { display: flex; gap: 12px; align-items: stretch; } .input-group { flex: 1; } .input-group-title { flex: 2; } .input-group input { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; font-size: 0.95rem; transition: var(--transition); outline: none; } .input-group input::placeholder { color: var(--text-secondary); } .input-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); } .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; } .btn-add { background: var(--gradient-1); color: white; box-shadow: var(--shadow-sm); } .btn-add:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow), var(--shadow-md); } .btn-add:active { transform: translateY(0); } /* ===== Filter Tabs ===== */ .filter-section { margin-bottom: 20px; } .filter-tabs { display: flex; background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 4px; border: 1px solid var(--border-color); gap: 4px; } .filter-tab { flex: 1; padding: 10px 16px; background: transparent; border: none; border-radius: 6px; color: var(--text-secondary); font-family: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: var(--transition); } .filter-tab:hover { color: var(--text-primary); background: rgba(108, 99, 255, 0.08); } .filter-tab.active { background: var(--accent); color: white; box-shadow: var(--shadow-sm); } /* ===== Task List ===== */ .task-list { display: flex; flex-direction: column; gap: 12px; } .task-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); transition: var(--transition); animation: slideIn 0.3s ease-out; } @keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .task-item:hover { background: var(--bg-card-hover); border-color: rgba(108, 99, 255, 0.3); box-shadow: var(--shadow-sm); transform: translateX(4px); } .task-item.completed { opacity: 0.6; } .task-item.completed .task-title { text-decoration: line-through; color: var(--text-secondary); } /* Checkbox */ .task-checkbox { position: relative; width: 24px; height: 24px; flex-shrink: 0; } .task-checkbox input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; } .task-checkbox .checkmark { width: 24px; height: 24px; border: 2px solid var(--border-color); border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: var(--transition); } .task-checkbox input:hover + .checkmark { border-color: var(--accent); } .task-checkbox input:checked + .checkmark { background: var(--success); border-color: var(--success); } .task-checkbox .checkmark svg { opacity: 0; transform: scale(0.5); transition: var(--transition); color: white; } .task-checkbox input:checked + .checkmark svg { opacity: 1; transform: scale(1); } /* Task Content */ .task-content { flex: 1; min-width: 0; } .task-title { font-size: 1rem; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; word-break: break-word; } .task-description { font-size: 0.85rem; color: var(--text-secondary); word-break: break-word; } .task-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; } /* Task Actions */ .task-actions { display: flex; gap: 8px; flex-shrink: 0; opacity: 0; transition: var(--transition); } .task-item:hover .task-actions { opacity: 1; } .btn-icon { width: 36px; height: 36px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); } .btn-icon:hover { background: rgba(231, 76, 60, 0.15); color: var(--danger); } /* ===== Empty State ===== */ .empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); } .empty-state svg { margin-bottom: 16px; opacity: 0.3; } .empty-state p { font-size: 1rem; } /* ===== Loading State ===== */ .loading-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); } .spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 16px; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ===== Toast Notification ===== */ .toast { position: fixed; bottom: 24px; right: 24px; padding: 14px 24px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow-lg); transform: translateY(100px); opacity: 0; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; max-width: 360px; } .toast.show { transform: translateY(0); opacity: 1; } .toast.success { border-left: 4px solid var(--success); } .toast.error { border-left: 4px solid var(--danger); } .toast.info { border-left: 4px solid var(--accent); } /* ===== Footer ===== */ .app-footer { margin-top: auto; padding: 24px 0; border-top: 1px solid var(--border-color); text-align: center; } .app-footer p { font-size: 0.8rem; color: var(--text-secondary); } /* ===== Responsive ===== */ @media (max-width: 640px) { .header-content { flex-direction: column; align-items: flex-start; } .header-stats { width: 100%; justify-content: space-between; } .stat { min-width: 0; flex: 1; padding: 6px 8px; } .form-row { flex-direction: column; } .btn-add { width: 100%; justify-content: center; } .task-actions { opacity: 1; } .logo h1 { font-size: 1.4rem; } }