/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	color: #2a2a2a;
	background: #fffaf0;
	transition: background .3s ease, color .3s ease;
}

.app { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }

.header { text-align: center; margin-bottom: 8px; }
.header h1 { margin: 0; font-size: 32px; }
.subtitle { margin: 6px 0 0; color: #6b5b00; }

.stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin: 16px 0 12px; }
.stat { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.stat-label { color: #6b7280; font-size: 13px; }
.stat-value { font-size: 28px; margin-top: 6px; font-weight: 700; }

.progress-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.06); margin: 8px 0 16px; }
.progress-header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #6b7280; margin-bottom: 10px; }
.hint { color: #8b5cf6; }
.progress-bar { width: 100%; height: 12px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg,#f59e0b,#84cc16); width: 0; transition: width .4s ease; }

.quote-card { background: linear-gradient(135deg,#fff6d1,#ffeab4); color: #5b3800; border-radius: 14px; padding: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.quote-card blockquote { margin: 0; font-size: 16px; line-height: 1.55; }

.actions { display: flex; flex-direction: column; align-items: center; margin: 18px 0; gap: 14px; }
.bless-btn {
	appearance: none;
	border: none;
	background: radial-gradient(120px 60px at 50% 20%, #fff7cc, #ffdd57);
	color: #4a3600;
	padding: 18px 28px;
	border-radius: 18px;
	font-size: 20px;
	font-weight: 800;
	box-shadow: 0 12px 28px rgba(180,120,0,.35), inset 0 2px 4px rgba(255,255,255,.8);
	cursor: pointer;
	transform: translateY(0);
	transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
}
.bless-btn:active { transform: translateY(2px); box-shadow: 0 8px 18px rgba(180,120,0,.3); filter: brightness(.98); }
.btn-text { display: inline-block; }

.action-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.secondary, .danger {
	appearance: none; border: none; cursor: pointer; padding: 10px 14px;
	border-radius: 10px; font-weight: 600; font-size: 14px;
	box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.secondary { background: #fff; color: #374151; }
.secondary:hover { background: #f9fafb; }
.danger { background: #fee2e2; color: #991b1b; }
.danger:hover { background: #fecaca; }

.badges { margin-top: 8px; }
.badges h2 { margin: 0 0 8px; font-size: 18px; }
.badge-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 12px; }
.badge-item { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.06); display: flex; align-items: center; gap: 10px; }
.badge-emoji { font-size: 20px; }
.badge-name { font-weight: 700; }
.badge-desc { color: #6b7280; font-size: 13px; }

.footer { text-align: center; color: #6b7280; margin-top: 24px; font-size: 13px; }

/* Float +1 */
.float-container { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.float { position: absolute; font-weight: 800; color: #ffdf00; -webkit-text-stroke: 1px rgba(0,0,0,.18); text-shadow: 0 0 2px rgba(255,255,255,1), 0 0 6px rgba(255,250,160,.95), 0 0 14px rgba(255,223,0,.9), 0 0 26px rgba(255,140,0,.8); opacity: 1; transform: translate(-50%, -50%); animation: floatUp .9s ease-out forwards; }
@keyframes floatUp { to { transform: translate(-50%, -320%); opacity: 0; } }

/* Confetti */
.confetti-container { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; width: 8px; height: 14px; opacity: 0; transform: translateY(-20px) rotate(0); animation: fall 1.2s ease-out forwards; }
@keyframes fall { to { transform: translateY(-100vh) rotate(-540deg); opacity: 1; } }

/* Canvas FX */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; }

/* Fireworks */
.firework-particle {
	position: absolute;
	width: var(--size, 6px);
	height: var(--size, 6px);
	background: var(--color, #ffdd57);
	border-radius: var(--radius, 2px);
	transform: translate(-50%,-50%);
	opacity: 0.95;
	will-change: transform, opacity;
	filter: blur(var(--blur, 0px));
	mix-blend-mode: screen;
	animation: explode var(--duration, 1100ms) cubic-bezier(.22,.61,.36,1) forwards;
}
.firework-core {
	position: absolute;
	width: 14px;
	height: 14px;
	border-radius: 999px;
	background: radial-gradient(circle, #ffffff, rgba(255,255,255,.1));
	transform: translate(-50%, -50%);
	box-shadow: 0 0 24px rgba(255,255,255,.9), 0 0 48px rgba(255,230,150,.8);
	animation: flash 320ms ease-out forwards;
}
/* Shockwave ring */
.firework-ring {
	position: absolute;
	left: 0; top: 0;
	width: 8px; height: 8px;
	border-radius: 999px;
	border: 2px solid rgba(255,255,255,.9);
	box-shadow: 0 0 18px rgba(255,255,255,.8), 0 0 32px rgba(255,223,0,.7);
	transform: translate(-50%,-50%) scale(.2);
	animation: ringOut .8s ease-out forwards;
}
@keyframes ringOut {
	to { transform: translate(-50%,-50%) scale(3.2); opacity: 0; }
}
/* Bokeh glow */
.fire-bokeh {
	position: absolute;
	width: var(--b, 10px);
	height: var(--b, 10px);
	border-radius: 999px;
	background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,.0));
	filter: blur(2px);
	transform: translate(-50%,-50%);
	animation: bokehDrift var(--bd, 900ms) ease-out forwards;
	opacity: .95;
}
@keyframes bokehDrift {
	to { transform: translate(-50%,-50%) translate(var(--dx, 0), var(--dy, -24px)) scale(1.15); opacity: 0; }
}
@keyframes explode {
	0% { transform: translate(-50%,-50%) translate(0,0) scale(1); opacity: 1; }
	80% { opacity: 0.9; }
	100% { transform: translate(-50%,-50%) translate(var(--dx, 0), var(--dy, 0)) scale(0.9); opacity: 0; }
}
@keyframes flash {
	0% { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
	40% { opacity: 1; transform: translate(-50%,-50%) scale(1.2); }
	100% { opacity: 0; transform: translate(-50%,-50%) scale(0.9); }
}

/* Toast */
.toast-container { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; }
.toast { background: #111827; color: #f9fafb; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.25); font-size: 14px; }

/* Dark theme */
.dark body, body.dark { background: #0f1220; color: #e5e7eb; }
body.dark .subtitle { color: #eab308; }
body.dark .stat, body.dark .progress-card, body.dark .badge-item, body.dark .secondary { background: #111827; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
body.dark .quote-card { background: linear-gradient(135deg,#1f2937,#111827); color: #fef3c7; }
body.dark .progress-bar { background: #1f2937; }
body.dark .secondary { color: #e5e7eb; }
body.dark .footer { color: #9ca3af; }

/* Responsive */
@media (max-width: 520px) {
	.header h1 { font-size: 26px; }
	.stat-value { font-size: 24px; }
	.bless-btn { width: 100%; }
}

/* Lite fireworks (DOM/CSS, very lightweight) */
.fx-lite { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); pointer-events: none; color: #ffd166; mix-blend-mode: screen; }
.fw-ray { position: absolute; left: 0; top: 0; width: 2px; height: 22px; border-radius: 2px; background: currentColor; opacity: .95; transform-origin: 0 11px; animation: rayOut .7s ease-out forwards; will-change: transform, opacity; }
.fw-glow { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 999px; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,.05)); box-shadow: 0 0 28px rgba(255,255,255,.85), 0 0 46px rgba(255,214,102,.6); animation: flash .28s ease-out forwards; }
@keyframes rayOut {
	0% { opacity: 1; transform: rotate(var(--a)) translate3d(0,0,0) scale(1); }
	100% { opacity: 0; transform: rotate(var(--a)) translate3d(var(--d), 0, 0) scale(.9); }
}


