:root {
	--primary-color: #4a6ee0;
	--secondary-color: #f5f7ff;
	--text-color: #333;
	--light-text: #666;
	--border-color: #e0e0e0;
	--shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	--border-radius: 8px;
	--transition: all 0.3s ease;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
	max-width: 1200px;
	line-height: 1.6;
	color: var(--text-color);
	font-size: 14px;
	padding: 20px;
	margin: 0 auto;
	background-color: #f9f9f9;
}

button {
	color: var(--light-text);
	padding: 5px 10px;
	background: none;
	border: none;
	border-radius: var(--border-radius);
	transition: var(--transition);
	cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bc8;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: var(--light-text);
}

.btn-secondary:hover {
    background-color: #e9ecef;
}

.btn-info {
	background-color: #f0f6ff;
	color: var(--light-text);
}

.btn-info:hover {
	background-color: #e2ebf0;
}


.expand {
	max-width: 100%;
	padding: 0;
}

.container {
	position: relative;
	padding: 15px;
	background-color: white;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
}

.header {
	text-align: center;
	margin-bottom: 15px;
}

.header h1 {
	color: var(--primary-color);
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 26px;
}

.header p {
	color: var(--light-text);
	font-size: 13px;
}

.header-btn {
	position: absolute;
	display: flex;
	top: 10px;
	right: 20px;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

.header-btn button {
	color: var(--primary-color);
	padding: 5px;
}

.toolbar-action {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
}

.toolbar-action button {
	padding: 10px;
}

.toolbar-action button:hover {
    color: var(--primary-color);
}

.action-left {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 10px;
}

.action-right {
    display: flex;
    justify-content: right;
    align-items: center;
}

.todo-input {
	display: flex;
	margin: 10px 0;
}

.todo-input input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius) 0 0 var(--border-radius);
	font-size: 15px;
	outline: none;
	transition: var(--transition);
}

.todo-input input:focus {
	border-color: var(--primary-color);
}

.todo-input button {
	padding: 0 25px;
	border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.todo-list {
	padding: 0;
	list-style-type: none;
}

.todo-item-header {
	display: flex;
	align-items: center;
	padding: 10px 0;
}

.todo-list li:nth-child(even) .todo-item-header {
	background-color: var(--secondary-color);
}

.drag-handle {
	line-height: initial;
	cursor: move;
	opacity: 0.6;
	padding: 0 8px;
	user-select: none;
}

.desc-tag {
	line-height: inherit;
	padding: 0 5px;
    cursor: pointer;
    opacity: 0.6;
}

.todo-checkbox {
	width: 18px;
	height: 18px;
	cursor: pointer;
	margin: 0 8px 0 0;
}

.todo-content {
	flex: 1;
	padding-right: 8px;
}

.todo-title {
    position: relative;
    display: flex;
    justify-content: space-between;
}

.todo-title input {
	flex: 1;
}

.todo-text {
    display:  block;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.completed .todo-text {
	text-decoration: line-through;
	color: var(--light-text);
}

.todo-description {
	padding: 0 12px 12px;
	display: none;
	border-top: 1px solid var(--border-color);
}

.todo-description.show {
	display: block;
}

.description-text {
	min-height: 16px;
	color: var(--light-text);
	margin: 8px 0;
	white-space: normal;
}

.description-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--primary-color);
	margin-top: 8px;
}

.description-actions button {
	font-size: 13px;
	color: var(--primary-color);
	background: none;
	border: none;
	cursor: pointer;
}

.description-actions button:hover {
	text-decoration: underline;
}

.todo-action {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.todo-action button {
	background: none;
	border: none;
}

.todo-action button:hover {
	color: var(--primary-color);
}

.todo-action button.delete:hover {
	color: #dc3545;
}

.footer {
	margin-top: 25px;
	text-align: center;
	font-size: 13px;
	color: var(--light-text);
}

.footer a {
	color: var(--primary-color);
	text-decoration: none;
}

.footer a:hover {
	text-decoration: underline;
}

.edit-mode {
	background-color: #fff3cd;
}

/* 登录注册弹窗样式 */
.modal {
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
	width: 300px;
	padding: 20px;
	margin: 15% auto;
	background-color: #fefefe;
	border: 1px solid #888;
	border-radius: var(--border-radius);
}

.modal-content .colse {
	float: right;
	cursor: pointer;
}

.modal-content input {
	width: 100%;
	padding: 10px;
	margin: 10px 0;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
}

.modal-content .pass-link {
	float: right;
    font-size: 12px;
    color: var(--primary-color);
	text-decoration: none;
    cursor: pointer;
}

.modal-content button {
	width: 100%;
	padding: 10px;
	margin: 10px 0;
	border: none;
	border-radius: var(--border-radius);
	cursor: pointer;
}

/* 确认弹窗样式 */
.modal-content p {
	margin-bottom: 15px;
}

.confirm-btn {
	display: flow-root;
}

.confirm-btn button {
	float: right;
    width: auto;
    padding: 5px 10px;
    margin: 0 0 0 10px;
}

/* 操作结果提示样式 */
.message-modal {
	position: fixed;
    top: 20px;
    right: 10px;
	color: white;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    z-index: 1000;
}

.message-modal.success {
	background-color: #28a745;
}

.message-modal.error {
	background-color: #dc3545;
}

@media (max-width: 768px) {
	body {
		padding: 0;
	}
	.container {
		padding: 15px;
		border-radius: unset;
	}
	.todo-item-header {
		padding: 8px 0;
	}
	.toolbar-action {
		flex-direction: column;
	}
	.todo-action button {
		padding: 4px 6px;
		font-size: 12px;
	}
}

