/* 基础样式 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
	background-color: #f5f7fa;
	color: #333;
	line-height: 1.6;
}

.container,
.admin-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

/* 头部样式 */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eaeaea;
}

h1 {
	color: #2c3e50;
	display: flex;
	align-items: center;
	gap: 10px;
}

h1 i {
	color: #3498db;
}

.admin-btn,
.back-btn,
.logout-btn {
	background-color: #3498db;
	color: white;
	padding: 10px 20px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 500;
	transition: background-color 0.3s;
}

.admin-btn:hover,
.back-btn:hover {
	background-color: #2980b9;
}

.logout-btn {
	background-color: #e74c3c;
}

.logout-btn:hover {
	background-color: #c0392b;
}

/* 搜索栏 */
.search-bar {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 16px;
	flex-grow: 1;
	min-width: 200px;
}

.search-bar button {
	background-color: #3498db;
	color: white;
	border: none;
	padding: 12px 20px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	transition: background-color 0.3s;
}

.search-bar button:hover {
	background-color: #2980b9;
}

/* 卡片容器 */
.cards-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 25px;
	margin-bottom: 40px;
}

/* 卡片样式 */
.card {
	background-color: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s, box-shadow 0.3s;
	cursor: pointer;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.media-container {
	height: 200px;
	overflow: hidden;
	position: relative;
}

.media-container img,
.media-container video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}

.card:hover .media-container img,
.card:hover .media-container video {
	transform: scale(1.05);
}

.media-type {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 5px 10px;
	border-radius: 3px;
	font-size: 12px;
}

.card-content {
	padding: 20px;
}

.card-content h3 {
	color: #2c3e50;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 15px;
}

.tag {
	background-color: #e1f5fe;
	color: #0277bd;
	padding: 5px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.info-line {
	margin-bottom: 8px;
	display: flex;
}

.info-label {
	font-weight: 600;
	min-width: 120px;
	color: #555;
}

/* 分页样式 */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 30px;
	flex-wrap: wrap;
}

.page-btn {
	padding: 10px 15px;
	background-color: white;
	border: 1px solid #ddd;
	border-radius: 5px;
	cursor: pointer;
	transition: all 0.3s;
}

.page-btn:hover {
	background-color: #f8f9fa;
}

.page-btn.active {
	background-color: #3498db;
	color: white;
	border-color: #3498db;
}

/* 移动端上传按钮 */
.mobile-upload-btn {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 60px;
	height: 60px;
	background-color: #3498db;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	color: white;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
	z-index: 100;
	transition: transform 0.3s, background-color 0.3s;
}

.mobile-upload-btn:hover {
	background-color: #2980b9;
	transform: scale(1.1);
}

/* 模态框样式 */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 1000;
	justify-content: center;
	align-items: center;
}

.modal-content {
	background-color: white;
	border-radius: 10px;
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	padding: 30px;
}

.close {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 28px;
	cursor: pointer;
	color: #777;
}

.close:hover {
	color: #333;
}

/* 上传区域 */
.upload-area {
	border: 2px dashed #3498db;
	border-radius: 10px;
	padding: 40px 20px;
	text-align: center;
	margin: 20px 0;
	cursor: pointer;
	transition: border-color 0.3s, background-color 0.3s;
}

.upload-area:hover,
.upload-area.dragover {
	border-color: #2980b9;
	background-color: #f8fafc;
}

.upload-area i {
	font-size: 48px;
	color: #3498db;
	margin-bottom: 15px;
}

.upload-hint {
	color: #777;
	font-size: 14px;
	margin-top: 10px;
}

.upload-area input[type="file"] {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	opacity: 0;
	cursor: pointer;
}

/* 后台管理样式 */
.admin-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eaeaea;
}

.admin-content {
	display: flex;
	gap: 30px;
}

.sidebar {
	width: 250px;
	background-color: white;
	border-radius: 10px;
	padding: 20px 0;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
	height: fit-content;
}

.sidebar ul {
	list-style: none;
}

.sidebar li {
	padding: 15px 25px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: background-color 0.3s;
	border-left: 4px solid transparent;
}

.sidebar li:hover {
	background-color: #f8f9fa;
}

.sidebar li.active {
	background-color: #e1f5fe;
	border-left-color: #3498db;
	color: #0277bd;
	font-weight: 600;
}

.main-content {
	flex-grow: 1;
}

.section {
	display: none;
	background-color: white;
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section.active {
	display: block;
}

.section h2 {
	margin-bottom: 25px;
	color: #2c3e50;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* 表格样式 */
.records-table-container {
	overflow-x: auto;
	margin-bottom: 20px;
}

.records-table {
	width: 100%;
	border-collapse: collapse;
}

.records-table th,
.records-table td {
	padding: 12px 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.records-table th {
	background-color: #f8f9fa;
	font-weight: 600;
	color: #2c3e50;
}

.records-table tr:hover {
	background-color: #f8f9fa;
}

.action-btn {
	padding: 5px 10px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	margin-right: 5px;
	transition: background-color 0.3s;
}

.edit-btn {
	background-color: #3498db;
	color: white;
}

.edit-btn:hover {
	background-color: #2980b9;
}

.delete-btn {
	background-color: #e74c3c;
	color: white;
}

.delete-btn:hover {
	background-color: #c0392b;
}

/* 表单样式 */
.person-form {
	max-width: 800px;
}

.form-group {
	margin-bottom: 20px;
}

.form-row {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
}

.form-row .form-group {
	flex: 1;
	margin-bottom: 0;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 16px;
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

.submit-btn {
	background-color: #2ecc71;
	color: white;
	border: none;
	padding: 12px 30px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	transition: background-color 0.3s;
}

.submit-btn:hover {
	background-color: #27ae60;
}

/* 标签管理 */
.add-tag-form {
	display: flex;
	gap: 15px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.add-tag-form input,
.add-tag-form button {
	padding: 12px 15px;
	border-radius: 5px;
	font-size: 16px;
}

.add-tag-form input[type="text"] {
	flex-grow: 1;
	min-width: 200px;
	border: 1px solid #ddd;
}

.add-tag-form input[type="color"] {
	width: 60px;
	padding: 5px;
	height: 46px;
}

.add-tag-form button {
	background-color: #3498db;
	color: white;
	border: none;
	cursor: pointer;
	padding: 12px 25px;
}

.tags-container {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.tag-item {
	background-color: #f8f9fa;
	padding: 10px 15px;
	border-radius: 5px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-left: 4px solid;
}

.tag-color {
	width: 20px;
	height: 20px;
	border-radius: 50%;
}

.tag-name {
	font-weight: 500;
}

.tag-actions {
	display: flex;
	gap: 5px;
	margin-left: 10px;
}

.tag-edit,
.tag-delete {
	background: none;
	border: none;
	cursor: pointer;
	color: #777;
	font-size: 14px;
}

.tag-edit:hover {
	color: #3498db;
}

.tag-delete:hover {
	color: #e74c3c;
}

.tags-select {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.tag-option {
	padding: 8px 15px;
	border-radius: 20px;
	cursor: pointer;
	border: 2px solid #ddd;
	transition: all 0.3s;
	font-size: 14px;
}

.tag-option:hover {
	border-color: #aaa;
}

.tag-option.selected {
	border-color: #3498db;
	background-color: #e1f5fe;
	color: #0277bd;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.cards-container {
		grid-template-columns: 1fr;
	}

	.admin-content {
		flex-direction: column;
	}

	.sidebar {
		width: 100%;
	}

	.form-row {
		flex-direction: column;
		gap: 0;
	}

	.search-bar input,
	.search-bar select {
		min-width: 100%;
	}

	.mobile-upload-btn {
		bottom: 20px;
		right: 20px;
		width: 50px;
		height: 50px;
		font-size: 20px;
	}
}

@media (max-width: 480px) {

	.container,
	.admin-container {
		padding: 15px;
	}

	header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.admin-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.records-table th,
	.records-table td {
		padding: 8px 10px;
		font-size: 14px;
	}

	.modal-content {
		padding: 20px;
		width: 95%;
	}
}