/* 1. 变量与重置
 * 注意：默认值与后端当前配置保持一致（primary=#7C09E1 紫色系），
 * 避免 API 异步返回前出现颜色闪烁（FOUC）
 */
:root {
	/* === 核心色（默认紫色系） === */
	--primary: #7c09e1;
	--primary-hover: #6b08d0;
	--primary-dark: #5206ad;
	--primary-light: #b08af0;
	--primary-glow: rgba(124,9,225,0.18);

	/* === 辅助色 === */
	--secondary: #c4ceff;

	/* === 预设渐变 === */
	--gradient-btn: linear-gradient(135deg, #6b08d0, #c4ceff);
	--gradient-register: linear-gradient(135deg, #7a17e3, #c4ceff);
	--gradient-avatar: linear-gradient(135deg, #7c09e1, #9945eb);
	--gradient-points: linear-gradient(135deg, #7c09e1, #8e30e8);
	--gradient-hero: linear-gradient(135deg, #5206ad 0%,#7c09e1 25%,#9945eb 55%,#b08af0 85%,#d9c8f5 100%);
	--gradient-btn-checkin: linear-gradient(135deg, #4505a0 0%,#7c09e1 30%,#9945eb 60%,#c4a8f2 100%);
	--btn-checkin-shadow: 0 6px 20px rgba(124,9,225,0.3), 0 2px 6px rgba(124,9,225,0.15), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -2px 0 rgba(80,5,160,0.08);
	--btn-checkin-hover-shadow: 0 10px 30px rgba(124,9,225,0.4), 0 4px 12px rgba(124,9,225,0.2), inset 0 1px 0 rgba(255,255,255,0.35);
	--btn-checkin-active-shadow: 0 4px 14px rgba(124,9,225,0.3);
	--btn-checkin-pulse-shadow: 0 6px 28px rgba(124,9,225,0.45), 0 2px 10px rgba(124,9,225,0.25), inset 0 1px 0 rgba(255,255,255,0.3);

	/* === 背景/装饰 === */
	--blob-color-1: #b08af0;
	--blob-color-2: #d8deff;
	--bg-light: #f5eeff;

	/* === 阴影体系 === */
	--shadow-primary: rgba(124,9,225,0.3);
	--shadow-primary-strong: rgba(124,9,225,0.4);

	/* === 功能色 === */
	--color-danger: #ff4d4f;
	--color-checkin: #5c07c2;

	/* === 基础变量（保持原有） === */
	--bg: linear-gradient(180deg, #fffefe 0%, #f8faff 100%);
	--card-bg: rgba(255, 255, 255, .82);
	--text-main: #4d4955;
	--text-sub: #9f99a8;
	--border: rgba(240, 240, 245, .95);
	--shadow: 0 10px 30px rgba(15, 23, 42, .04);
	--radius-lg: 28px;
	--radius-md: 18px;
	--transition: all .35s cubic-bezier(.22, 1, .36, 1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
	display: none;
}

body {
	font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
	background: var(--bg);
	color: var(--text-main);
	line-height: 1.6;
	overflow-x: hidden;
}

a {
	text-decoration: none;
	color: inherit;
	transition: var(--transition);
}

/* 2. 背景与动效 */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	opacity: .02;
	animation: starsMove 80s linear infinite;
	pointer-events: none;
	z-index: -3;
}

@keyframes starsMove {
	from {
		transform: translateY(0);
	}

	to {
		transform: translateY(-220px);
	}
}

.floating-blobs {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: -2;
}

.floating-blobs span {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: .22;
	animation: floatBlob 18s ease-in-out infinite;
}

.floating-blobs span:nth-child(1) {
	width: 340px;
	height: 340px;
	background: #ffd9eb;
	left: -120px;
	top: -80px;
}

.floating-blobs span:nth-child(2) {
	width: 280px;
	height: 280px;
	background: #d8deff;
	right: -100px;
	top: 20%;
}

@keyframes floatBlob {

	0%,
	100% {
		transform: translateY(0) translateX(0);
	}

	50% {
		transform: translateY(-35px) translateX(20px);
	}
}

.cursor-glow {
	position: fixed;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 195, 220, .18), transparent 72%);
	pointer-events: none;
	transform: translate(-50%, -50%);
	z-index: -1;
	transition: left .08s linear, top .08s linear;
}

/* 3. Header 导航栏 */
header {
	height: 78px;
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255, 255, 255, .75);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-bottom: 1px solid var(--border);
	box-shadow: 0 4px 20px rgba(15, 23, 42, .03);
}

.nav-container {
	max-width: 1280px;
	margin: auto;
	height: 100%;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav-left {
	display: flex;
	align-items: center;
	gap: 54px;
}

.logo {
	font-size: 28px;
	font-weight: 900;
	color: var(--primary);
	letter-spacing: 1px;
}

.lucide {
	width: 14px;
	height: 14px;
	stroke-width: 2.5px;
}

.nav-links {
	display: flex;
	gap: 30px;
}

.nav-links a {
	font-size: 14px;
	font-weight: 700;
	color: var(--text-main);
	position: relative;
	padding: 6px 16px;
	border-radius: 999px;
	transition: all .3s ease;
}

.nav-links a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 2.5px;
	border-radius: 999px;
	background: var(--primary);
	transition: .3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
	width: 100%;
}

.nav-links a.active {
	color: #fff;
	font-weight: 800;
	background: linear-gradient(135deg, var(--primary), #ff7eb3);
	box-shadow: 0 4px 15px rgba(255, 173, 201, 0.4);
}

.nav-links a.active::after {
	display: none;
}

/* 4. 用户系统与下拉菜单 */
.user-info-area {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	position: relative;
	padding: 5px 12px;
	border-radius: 999px;
	transition: var(--transition);
}

.user-info-area:hover {
	background: rgba(255, 173, 201, 0.1);
}

.user-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-nickname {
	font-size: 14px;
	font-weight: 700;
	color: var(--text-main);
}

.user-dropdown {
	position: absolute;
	top: 52px;
	right: 0;
	width: 180px;
	background: white;
	border-radius: 20px;
	box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
	padding: 12px;
	display: none;
	flex-direction: column;
	gap: 4px;
	border: 1px solid var(--border);
	animation: slideIn .3s cubic-bezier(.22, 1, .36, 1);
}

.user-dropdown::before {
	content: '';
	position: absolute;
	top: -20px;
	left: 0;
	width: 100%;
	height: 25px;
	background: transparent;
}

.user-info-area:hover .user-dropdown {
	display: flex;
}

.dropdown-item {
	padding: 12px 16px;
	border-radius: 14px;
	font-size: 14px;
	color: var(--text-main);
	transition: all .25s;
	display: flex;
	align-items: center;
	gap: 12px;
}

.dropdown-item:hover {
	background: #fff0f5;
	color: var(--primary);
	padding-left: 20px;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 5. 按钮系统 */
.nav-right {
	display: flex;
	gap: 12px;
	align-items: center;
}

/* 导航栏积分徽章 */
.nav-points-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--gradient-points);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	padding: 5px 14px;
	border-radius: 999px;
	text-decoration: none;
	transition: all .3s;
	box-shadow: 0 2px 10px var(--shadow-primary);
	white-space: nowrap;
}
.nav-points-badge:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px var(--shadow-primary-strong);
}
.nav-points-badge .points-label-text {
	font-size: 12px;
	font-weight: 700;
	opacity: 0.9;
	margin-right: 2px;
}

/* ========== 全局自定义确认弹窗 ========== */
.confirm-overlay {
	display: none; position: fixed; inset: 0; z-index: 2100;
	background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
	align-items: center; justify-content: center;
}
.confirm-modal {
	background: #fff; border-radius: 22px; width: 400px; max-width: 88vw;
	padding: 32px 28px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.2);
	text-align: center;
}
.confirm-icon-wrap {
	width: 64px; height: 64px; margin: 0 auto 18px;
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 30px;
}
.confirm-icon-gift { background: linear-gradient(135deg,#fff0f5,#ffe4ec); color: var(--primary); }
.confirm-icon-ok   { background: linear-gradient(135deg,#e8f5e9,#c8e6c9); color: #2e7d32; }
.confirm-icon-err  { background: linear-gradient(135deg,#fce4ec,#ffcdd2); color: #c62828; }
.confirm-title { font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.confirm-msg { font-size: 14px; color: #888; line-height: 1.6; margin-bottom: 8px; white-space: pre-line; }
.confirm-submsg { font-size: 12px; color: #bbb; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
.btn-confirm-cancel {
	flex:1; padding: 11px 20px; border-radius: 12px; border: 1.5px solid #eee;
	background: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
	color: #999; transition: all .25s;
}
.btn-confirm-cancel:hover { border-color:#ddd; color:#666; background:#fafafa; }
.btn-confirm-submit {
	flex:1; padding: 11px 20px; border-radius: 12px; border: none;
	background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
	transition: all .25s; box-shadow: 0 4px 16px rgba(255,173,201,.35);
}
.btn-confirm-submit:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-confirm-single {
	width:100%; padding: 11px 20px; border-radius: 12px; border: none;
	background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .25s;
}
.btn-confirm-single:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn {
	padding: 10px 20px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	transition: var(--transition);
}

.btn-login {
	background: rgba(255, 255, 255, .92);
	border: 1px solid var(--border);
	color: var(--text-main);
}

.btn-register {
	background: linear-gradient(135deg, #ffc0da, #c4ceff);
	color: white;
	box-shadow: 0 8px 20px rgba(255, 192, 218, .18);
}

.btn:hover {
	transform: translateY(-2px);
}

/* 6. Modal 弹窗系统 (含修复部分) */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(8px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	animation: fadeIn .3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.modal-content {
	background: white;
	width: 420px;
	border-radius: 32px;
	padding: 40px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.modal-close {
	position: absolute;
	right: 16px;
	top: 16px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 50%;
	background: #f0eef2;
	color: #9f99a8;
	transition: all .25s ease;
	z-index: 1;
}

.modal-close:hover {
	background: #ffadc9;
	color: #fff;
	transform: rotate(90deg);
}

.modal-close svg {
	width: 16px;
	height: 16px;
}

.modal-header {
	text-align: center;
	margin-bottom: 30px;
}

.modal-header h2 {
	font-size: 24px;
	font-weight: 900;
	color: var(--text-main);
}

.modal-tabs {
	display: flex;
	gap: 20px;
	justify-content: center;
	margin-bottom: 24px;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
}

.modal-tabs span {
	font-size: 14px;
	font-weight: 700;
	color: var(--text-sub);
	cursor: pointer;
	transition: .2s;
}

.modal-tabs span.active {
	color: var(--primary);
	border-bottom: 2px solid var(--primary);
	padding-bottom: 8px;
}

.form-group {
	margin-bottom: 18px;
}

.form-group label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
	color: var(--text-sub);
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 14px 20px;
	border-radius: 14px;
	border: 1px solid #eee;
	background: #f8fafc;
	outline: none;
	font-size: 14px;
	transition: .3s;
}

.form-group input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 4px rgba(255, 173, 201, 0.1);
}

.input-row {
	display: flex;
	gap: 10px;
}

.btn-code {
	background: var(--secondary);
	color: white;
	border: none;
	border-radius: 12px;
	padding: 0 15px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

/* 重点修复：丢失的自动登录与忘记密码 */
.modal-footer-links {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	margin-top: 12px;
}

.checkbox-group {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	color: var(--text-sub);
}

.checkbox-group input {
	accent-color: var(--primary);
}

.btn-submit {
	width: 100%;
	padding: 14px;
	border-radius: 999px;
	border: none;
	background: var(--primary);
	color: white;
	font-weight: 800;
	font-size: 16px;
	cursor: pointer;
	margin-top: 24px;
	transition: .3s;
}

.btn-submit:hover {
	transform: scale(1.02);
	background: var(--primary-hover);
}

/* 7. Footer 页脚 */
.site-footer {
	padding: 90px 20px 34px;
	background: rgba(255, 255, 255, .65);
	border-top: 1px solid var(--border);
}

.footer-content {
	max-width: 1280px;
	margin: auto;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 60px;
	margin-bottom: 50px;
}

.footer-brand p,
.footer-links a {
	font-size: 14px;
	color: var(--text-sub);
}

.footer-links h4 {
	margin-bottom: 20px;
	font-size: 16px;
}

.footer-links ul {
	list-style: none;
}

.footer-links li {
	margin-bottom: 12px;
}

.footer-bottom {
	text-align: center;
	padding-top: 30px;
	border-top: 1px solid var(--border);
	font-size: 13px;
	color: #b2acb9;
}

/* 8. 基础公共响应式 */
@media (max-width: 768px) {
	.nav-links {
		display: none;
	}

	.logo {
		font-size: 20px;
	}

	.footer-content {
		grid-template-columns: 1fr;
		text-align: center;
		gap: 30px;
	}
}

/* 9. 封面占位图 */
.no-cover-placeholder {
	width: 100%;
	aspect-ratio: 4/3;
	background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #c9a3b5;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
}