:root {
	--primary: #1677ff;
	--card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	--card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
	--transition: all 0.2s ease-in-out;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--text-dark);
	line-height: 1.5;
	margin: 0;
	background-color: #f8f9fa;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 15px 10px;
}

header {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center; /* 确保标题和按钮垂直居中对齐 */
	padding: 10px 0 15px;
	margin-bottom: 15px;
	border-bottom: 1px solid #f0f0f0;
}

.title-with-bar {
	position: relative;
	padding-left: 12px;
}

.title-with-bar::before {
	content: '';
	position: absolute;
	left: 0;
	top: 5px;
	bottom: 5px;
	width: 4px;
	background-color: var(--primary);
	border-radius: 2px;
}

/* 统一头部按钮样式 */
.header-actions {
	display: flex;
	gap: 15px; /* 增加按钮间距 */
	align-items: center;
}

.header-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	border: 1px solid var(--primary);
	color: var(--primary);
	background: rgba(255, 255, 255, 0.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
}

.header-btn:hover {
	border-color: var(--primary);
	color: var(--primary);
	background: rgba(59, 130, 246, 0.1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transform: translateY(-1px);
}

/* 卡片容器样式 */
.cards-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 8px;
	margin-bottom: 30px;
}

/* 卡片样式 */
.pic-card {
	background-color: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--card-shadow);
	transition: var(--transition);
	cursor: pointer;
	position: relative;
	aspect-ratio: 2/3;
	transform-origin: center center;
	-webkit-tap-highlight-color: transparent;
	border: 1px solid #f0f0f0;
}

.pic-card:hover {
	box-shadow: var(--card-shadow-hover);
}

.pic-card.selected {
	transform: translateY(-1px) scale(1.005);
	box-shadow:
		0 0 0 2px rgba(22, 119, 255, 0.45),
		0 10px 28px rgba(22, 119, 255, 0.25),
		0 12px 30px rgba(0, 0, 0, 0.18);
	transition:
		transform 0.22s cubic-bezier(.22,.61,.36,1),
		box-shadow 0.22s ease;
	z-index: 20;
	border-color: rgba(22, 119, 255, 0.3);
}

/* 图片样式 */
.pic-image {
	width: 100%;
	height: calc(100% - 40px);
	object-fit: cover;
	border-radius: 8px 8px 0 0;
	display: block;
}

/* 标题文本样式 */
.pic-title {
	padding: 3px 1px;
	font-size: 1rem;
	color: #151517;
	background-color: #fafafa;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 40px;
	line-height: 28px;
	text-align: center;
	border-radius: 0 0 8px 8px;
	border-top: 1px solid #f0f0f0;
}

/* 上传模态框 */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1001;
	opacity: 0;
	visibility: hidden;
	transition: var(--transition);
}

.modal-overlay.show {
	opacity: 1;
	visibility: visible;
}

.modal-content {
	background-color: white;
	border-radius: 12px;
	width: 90%;
	max-width: 450px;
	padding: 20px;
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
	transform: translateY(0);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.modal-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: #333;
}

.close-modal {
	background: none;
	border: none;
	font-size: 1.4rem;
	cursor: pointer;
	color: #999;
}

.form-group {
	margin-bottom: 15px;
}

.form-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 0.9rem;
	color: #333;
}

.form-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	font-size: 0.9rem;
}

.file-input {
	display: none;
}

.file-upload-label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	border: 2px dashed #e0e0e0;
	border-radius: 6px;
	cursor: pointer;
	transition: var(--transition);
	text-align: center;
	color: #999;
	font-size: 0.9rem;
}

.file-upload-label:hover {
	border-color: var(--primary);
	color: var(--primary);
	background-color: rgba(59, 130, 246, 0.03);
}

.file-upload-icon {
	font-size: 1.8rem;
	margin-right: 8px;
}

.modal-footer {
	display: flex;
	gap: 8px;
	margin-top: 20px;
}

.modal-btn {
	flex: 1;
	padding: 10px;
	border-radius: 6px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--transition);
	font-size: 0.9rem;
}

.cancel-btn {
	background-color: #f5f5f5;
	border: none;
	color: #666;
}

.cancel-btn:hover {
	background-color: #eee;
}

.submit-btn {
	background-color: var(--primary);
	border: none;
	color: white;
}

.submit-btn:hover {
	background-color: #2563eb;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.cards-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
		padding: 0 4px;
	}

	.pic-card {
		aspect-ratio: 2/3;
	}

	h1 {
		font-size: 1.3rem;
	}
}

@media (max-width: 480px) {
	.cards-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 5px;
	}

	.pic-card {
		aspect-ratio: 2/3;
	}

	.modal-content {
		padding: 15px;
	}
}

@media (min-width: 769px) {
	.cards-container {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 10px;
	}

	.pic-card {
		aspect-ratio: 2/3;
	}
}

.copy-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: -50px; /* 确保覆盖到底部 */
	margin: -1px;
	padding: 1px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;

	background:
		linear-gradient(
			180deg,
			rgba(255,255,255,0.65),
			rgba(255,255,255,0.45)
		);
	backdrop-filter: blur(8px) saturate(1.2);
	-webkit-backdrop-filter: blur(8px) saturate(1.2);

	color: #1677ff;
	font-weight: 600;
	letter-spacing: 0.04em;

	opacity: 0;
	transform: scale(1.06);
	transition:
		opacity 0.25s ease,
		transform 0.25s cubic-bezier(.22,.61,.36,1);

	pointer-events: none;
	border-radius: 8px; /* 添加圆角匹配卡片 */
}


.copy-overlay i {
	font-size: 2.2rem;
	filter: drop-shadow(0 6px 12px rgba(22,119,255,0.35));
}

.copy-overlay span {
	font-size: 1.15rem;
}

.pic-card.copied .copy-overlay {
	opacity: 1;
	transform: scale(1) translateY(-30px);
}

@supports not (backdrop-filter: blur(8px)) {
	.copy-overlay {
		background: rgba(255,255,255,0.85);
	}
}




.pic-image {
	opacity: 0;
	transition: opacity 0.3s ease;
}
.pic-image.loaded {
	opacity: 1;
}
/* 占位符样式，优化加载体验 */
.image-placeholder {
	background: #f0f0f0;
	border-radius: 4px;
	width: 100%;
	height: 0;
	padding-bottom: 75%; /* 16:9比例占位 */
}
