* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f0f2f5; color: #2d3436; min-height: 100vh; }
.app { display: flex; max-width: 1280px; margin: 0 auto; padding: 20px; gap: 20px; min-height: 100vh; }
.main { flex: 2; background: white; border-radius: 20px; padding: 24px 28px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 2px solid #f0f2f5; flex-wrap: wrap; gap: 10px; }
.weather { font-size: 17px; font-weight: 500; color: #2d3436; }
.meridian { font-size: 14px; color: #6c5ce7; background: #f3f0ff; padding: 5px 16px; border-radius: 30px; font-weight: 500; }
.calendar-section { margin-top: 16px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.calendar-header h2 { font-size: 18px; font-weight: 600; color: #2d3436; }
.calendar-header button { background: #f0f2f5; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; transition: background 0.2s; color: #2d3436; }
.calendar-header button:hover { background: #dfe6e9; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-grid .weekday { text-align: center; font-size: 12px; font-weight: 600; color: #b2bec3; padding: 6px 0 4px 0; }
.calendar-grid .day { text-align: center; padding: 8px 0 6px 0; border-radius: 10px; cursor: pointer; transition: all 0.2s; position: relative; min-height: 46px; }
.calendar-grid .day:hover { background: #f0f2f5; }
.calendar-grid .day.other-month { color: #b2bec3; }
.calendar-grid .day.today { background: #6c5ce7; color: white; font-weight: 600; }
.calendar-grid .day .day-number { font-size: 15px; display: block; line-height: 1.3; }
.calendar-grid .day .day-badge { position: absolute; top: 1px; right: 3px; background: #e17055; color: white; font-size: 9px; border-radius: 50%; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-weight: 600; line-height: 1; }
.calendar-grid .day .lunar-date { font-size: 9px; color: #b2bec3; margin-top: 1px; line-height: 1.2; }
.calendar-grid .day.today .lunar-date { color: rgba(255,255,255,0.7); }
.todo-section { margin-top: 20px; }
.todo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.todo-header h3 { font-size: 16px; font-weight: 600; color: #2d3436; }
.todo-actions { display: flex; gap: 6px; }
.todo-actions button { padding: 5px 14px; border: none; border-radius: 20px; cursor: pointer; font-size: 12px; transition: all 0.2s; font-weight: 500; }
#addTodoBtn { background: #6c5ce7; color: white; }
#addTodoBtn:hover { background: #5f3dc4; }
#uploadBtn { background: #00b894; color: white; }
#uploadBtn:hover { background: #00a381; }
.todo-list { display: flex; flex-direction: column; gap: 5px; max-height: 280px; overflow-y: auto; }
.todo-list::-webkit-scrollbar { width: 4px; }
.todo-list::-webkit-scrollbar-thumb { background: #dfe6e9; border-radius: 4px; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f8f9fa; border-radius: 8px; transition: all 0.2s; flex-wrap: wrap; font-size: 13px; }
.todo-item:hover { background: #f0f2f5; }
.todo-item .todo-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #b2bec3; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.todo-item .todo-check.done { background: #00b894; border-color: #00b894; }
.todo-item .todo-check.done::after { content: "✓"; color: white; font-size: 11px; }
.todo-item .todo-title { flex: 1; font-size: 13px; min-width: 60px; color: #2d3436; }
.todo-item .todo-title.done { text-decoration: line-through; color: #b2bec3; }
.todo-item .todo-deadline { font-size: 11px; color: #e17055; background: #fde8e5; padding: 1px 10px; border-radius: 12px; flex-shrink: 0; }
.todo-item .todo-deadline.overdue { background: #ff7675; color: white; }
.todo-item .todo-file-link { color: #6c5ce7; text-decoration: none; font-size: 14px; flex-shrink: 0; }
.todo-item .todo-file-link:hover { color: #5f3dc4; }
.todo-item .todo-actions { display: flex; gap: 3px; flex-shrink: 0; }
.todo-item .todo-adjust { background: none; border: none; color: #0984e3; cursor: pointer; font-size: 14px; padding: 0 3px; }
.todo-item .todo-adjust:hover { color: #0652DD; }
.todo-item .todo-delete { background: none; border: none; color: #dfe6e9; cursor: pointer; font-size: 14px; padding: 0 3px; }
.todo-item .todo-delete:hover { color: #e17055; }
.sidebar { flex: 1; background: white; border-radius: 20px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); min-width: 220px; max-height: 90vh; overflow-y: auto; display: none; }
.sidebar.active { display: block; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sidebar-header h3 { font-size: 16px; font-weight: 600; color: #2d3436; }
#closeSidebar { background: none; border: none; font-size: 18px; cursor: pointer; color: #b2bec3; }
.sidebar-todos { display: flex; flex-direction: column; gap: 6px; }
.sidebar-todo-item { padding: 10px 14px; background: #f8f9fa; border-radius: 8px; font-size: 13px; border-left: 3px solid #6c5ce7; }
.sidebar-todo-item.done { border-left-color: #b2bec3; text-decoration: line-through; color: #b2bec3; }
.sidebar-todo-item a { color: #6c5ce7; text-decoration: none; }
.sidebar-todo-item a:hover { text-decoration: underline; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); align-items: center; justify-content: center; z-index: 999; }
.modal.active { display: flex; }
.modal-content { background: white; border-radius: 24px; padding: 28px 32px; max-width: 400px; width: 90%; box-shadow: 0 30px 80px rgba(0,0,0,0.2); }
.modal-content h3 { margin-bottom: 14px; font-size: 18px; color: #2d3436; }
.modal-content p { font-size: 13px; color: #888; margin-bottom: 12px; }
.modal-content input[type="text"],
.modal-content input[type="date"],
.modal-content input[type="file"] { width: 100%; padding: 9px 14px; border: 2px solid #dfe6e9; border-radius: 10px; font-size: 14px; margin-bottom: 10px; transition: border 0.2s; background: white; }
.modal-content input:focus { outline: none; border-color: #6c5ce7; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.modal-actions button { padding: 8px 22px; border: none; border-radius: 20px; cursor: pointer; font-size: 14px; font-weight: 500; }
#saveTodo, #uploadFileBtn { background: #6c5ce7; color: white; }
#saveTodo:hover, #uploadFileBtn:hover { background: #5f3dc4; }
#cancelTodo, #cancelUpload { background: #f0f2f5; color: #2d3436; }
#cancelTodo:hover, #cancelUpload:hover { background: #dfe6e9; }
.progress-bar { width: 100%; height: 6px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.progress-bar #progressFill { height: 100%; background: #6c5ce7; transition: width 0.3s; }
#uploadProgress { margin-top: 10px; }
#uploadProgress span { font-size: 13px; color: #888; display: block; margin-top: 4px; }
.preview-modal-content { max-width: 500px; max-height: 90vh; }
.preview-modal-content #previewList { max-height: 320px; overflow-y: auto; }
.preview-modal-content #previewList::-webkit-scrollbar { width: 4px; }
.preview-modal-content #previewList::-webkit-scrollbar-thumb { background: #dfe6e9; border-radius: 4px; }
.preview-modal-content .preview-checkbox { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; accent-color: #6c5ce7; }
#selectAllPreview { width: 16px; height: 16px; cursor: pointer; accent-color: #6c5ce7; margin-right: 4px; }
@media (max-width: 768px) { .app { flex-direction: column; padding: 12px; } .main { padding: 16px; } .sidebar { min-width: unset; max-height: unset; } .header { flex-direction: column; align-items: stretch; text-align: center; } .calendar-grid .day { min-height: 38px; padding: 5px 0; } .calendar-grid .day .day-number { font-size: 13px; } .calendar-grid .day .day-badge { width: 15px; height: 15px; font-size: 8px; top: 0px; right: 1px; } .todo-item { font-size: 12px; padding: 6px 10px; } .preview-modal-content { max-width: 95%; padding: 20px; } }
