* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	color: rgba(255, 255, 255, 0.92);
	background: #120018;
	overflow: hidden;
}

:root {
	--bg1: #120018;
	--bg2: #2c003a;
	--ink: rgba(255, 255, 255, 0.92);
	--muted: rgba(255, 255, 255, 0.72);

	/* Opaque surfaces (no glass transparency) */
	--surfaceTop: #3b0046;
	--surfaceBottom: #1b0022;
	--surfaceElev: #24002d;
	--stroke: rgba(255, 215, 168, 0.22);
	--shadow: 0 28px 90px rgba(0, 0, 0, 0.55);

	--pink: #ff4d8d;
	--hot: #ff2e6d;
	--peach: #ffb3c7;
	--gold: #ffd7a8;
	--yes: linear-gradient(135deg, #ff2e6d, #ff7aa6 55%, #ffd7a8);
	--no: linear-gradient(180deg, #2a0036, #1b0022);
	--ring: 0 0 0 5px rgba(255, 77, 141, 0.22);
}

.bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	background:
		radial-gradient(1100px 680px at 18% 22%, #ff2e6d22, transparent 62%),
		radial-gradient(1100px 680px at 82% 20%, #ffd7a81c, transparent 62%),
		radial-gradient(900px 520px at 50% 82%, #ffb3c71a, transparent 62%),
		linear-gradient(180deg, var(--bg1), var(--bg2));
}

.bg__glow {
	position: absolute;
	inset: -30% -30%;
	background:
		radial-gradient(circle at 30% 30%, #ff2e6d18, transparent 58%),
		radial-gradient(circle at 70% 20%, #ffd7a812, transparent 60%),
		radial-gradient(circle at 50% 80%, #ffb3c712, transparent 60%);
	filter: blur(18px);
	opacity: 0.95;
	animation: breathe 7.5s ease-in-out infinite;
}

.bg__twinkle {
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
		radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.14) 0 1px, transparent 2px),
		radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
		radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.10) 0 1px, transparent 2px);
	background-size: 420px 420px;
	opacity: 0.55;
	animation: twinkle 7.5s ease-in-out infinite;
}

@keyframes twinkle {
	0%,
	100% {
		transform: translateY(0);
		opacity: 0.45;
		filter: blur(0px);
	}
	50% {
		transform: translateY(-12px);
		opacity: 0.7;
		filter: blur(0.15px);
	}
}

@keyframes breathe {
	0%,
	100% {
		transform: scale(1);
		opacity: 0.85;
	}
	50% {
		transform: scale(1.05);
		opacity: 1;
	}
}

.wrap {
	position: relative;
	height: 100%;
	display: grid;
	place-items: center;
	padding: 24px;
}

.card {
	width: min(720px, 100%);
	border-radius: 22px;
	background:
		linear-gradient(180deg, var(--surfaceTop), var(--surfaceBottom)) padding-box,
		linear-gradient(135deg, rgba(255, 77, 141, 0.7), rgba(255, 215, 168, 0.45), rgba(255, 179, 199, 0.6)) border-box;
	border: 1px solid transparent;
	box-shadow: var(--shadow);
	padding: 28px 22px;
	position: relative;
	overflow: hidden;
}

.card::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(900px 300px at 20% 0%, rgba(255, 77, 141, 0.22), transparent 60%),
		radial-gradient(900px 300px at 80% 0%, rgba(255, 215, 168, 0.14), transparent 55%),
		linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 40%, rgba(255, 255, 255, 0.04));
	opacity: 0.9;
	pointer-events: none;
}

.card::after {
	content: "";
	position: absolute;
	inset: -2px;
	background: radial-gradient(700px 240px at 40% -10%, rgba(255, 77, 141, 0.22), transparent 60%);
	opacity: 0.6;
	filter: blur(12px);
	pointer-events: none;
}

.card > * {
	position: relative;
}

.card__header {
	text-align: center;
}

.kicker {
	margin: 0 0 8px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
	font-size: 12px;
}

.title {
	margin: 0;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.subtitle {
	margin: 10px auto 0;
	max-width: 52ch;
	color: var(--muted);
	font-size: 16px;
}

.seal {
	width: 54px;
	height: 54px;
	margin: 10px auto 10px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background:
		radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), transparent 60%),
		linear-gradient(135deg, rgba(255, 77, 141, 0.85), rgba(255, 215, 168, 0.35));
	border: 1px solid rgba(255, 255, 255, 0.24);
	box-shadow: 0 18px 45px rgba(255, 61, 127, 0.14), 0 12px 30px rgba(0, 0, 0, 0.28);
	color: rgba(255, 255, 255, 0.92);
	font-size: 20px;
	transform: translateY(0);
	animation: sealFloat 3.6s ease-in-out infinite;
}

@keyframes sealFloat {
	0%,
	100% {
		transform: translateY(0) rotate(-3deg);
	}
	50% {
		transform: translateY(-6px) rotate(3deg);
	}
}



.actions {
	margin-top: 18px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.btn {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--ink);
	font-weight: 700;
	letter-spacing: 0.01em;
	border-radius: 999px;
	padding: 13px 20px;
	cursor: pointer;
	transition: transform 170ms ease, filter 170ms ease, background 170ms ease, box-shadow 170ms ease;
	user-select: none;
}

.btn:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

.btn:active {
	transform: translateY(1px) scale(0.99);
}

.btn--yes {
	position: relative;
	overflow: hidden;
	background: var(--yes);
	border-color: rgba(255, 255, 255, 0.22);
	box-shadow: 0 14px 42px rgba(255, 61, 127, 0.25), 0 10px 25px rgba(0, 0, 0, 0.22);
	transform: translateY(0) scale(var(--yesScale, 1));
	animation: yesPulse 2.8s ease-in-out infinite;
}

.btn--yes::after {
	content: "";
	position: absolute;
	inset: -40% -80%;
	background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28), transparent 60%);
	transform: translateX(-30%);
	animation: shimmer 2.6s ease-in-out infinite;
	pointer-events: none;
}

@keyframes shimmer {
	0% {
		transform: translateX(-30%);
		opacity: 0.15;
	}
	50% {
		transform: translateX(30%);
		opacity: 0.3;
	}
	100% {
		transform: translateX(65%);
		opacity: 0.12;
	}
}

@keyframes yesPulse {
	0%,
	100% {
		filter: brightness(1);
	}
	50% {
		filter: brightness(1.06);
	}
}

.btn--yes:hover {
	filter: brightness(1.05);
	transform: translateY(-2px) scale(var(--yesScale, 1));
}

.btn--no {
	background: var(--no);
	border-color: rgba(255, 215, 168, 0.22);
}

.btn--no:hover {
	filter: brightness(1.08);
}

.btn--ghost {
	background: linear-gradient(180deg, #24002d, #18001f);
	border-color: rgba(255, 215, 168, 0.18);
	color: rgba(255, 255, 255, 0.9);
}

.btn:disabled {
	opacity: 0.72;
	cursor: not-allowed;
}

.response {
	margin-top: 16px;
	text-align: center;
	min-height: 60px;
	display: grid;
	gap: 10px;
	place-items: center;
}

.response__text {
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
	font-size: 16px;
}

.card__footer {
	margin-top: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.hint {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
}

.chip {
	appearance: none;
	border: 1px solid rgba(255, 215, 168, 0.18);
	background: linear-gradient(180deg, #24002d, #18001f);
	color: rgba(255, 255, 255, 0.78);
	border-radius: 999px;
	padding: 8px 12px;
	font-weight: 700;
	font-size: 12px;
	cursor: pointer;
	transition: transform 170ms ease, filter 170ms ease, background 170ms ease;
}

.chip:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.chip:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

.chip[aria-pressed="true"] {
	background: rgba(255, 77, 141, 0.14);
	border-color: rgba(255, 77, 141, 0.28);
	color: rgba(255, 255, 255, 0.88);
}

.letter {
	margin: 14px auto 2px;
	max-width: 560px;
	padding: 14px 14px;
	border-radius: 16px;
	border: 1px solid rgba(255, 215, 168, 0.16);
	background:
		radial-gradient(circle at 30% 10%, rgba(255, 215, 168, 0.12), transparent 55%),
		linear-gradient(180deg, #24002d, #16001d);
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.30);
}

.letter__to {
	margin: 0;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.9);
}

.letter__body {
	margin: 8px 0 0;
	color: rgba(255, 255, 255, 0.78);
	line-height: 1.5;
}

.letter__actions {
	margin-top: 10px;
	display: flex;
	justify-content: center;
}

.confetti {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Bouquet overlay */
.bouquetOverlay {
	position: fixed;
	right: 18px;
	bottom: 18px;
	display: none;
	place-items: end;
	padding: 0;
	background: none;
	z-index: 50;
	animation: overlayIn 220ms ease both;
}

.bouquetOverlay:not([hidden]) {
	display: grid;
}

.bouquetOverlay[hidden] {
	display: none !important;
}

@keyframes overlayIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.bouquetCard {
	width: min(420px, calc(100vw - 36px));
	max-height: min(74vh, 560px);
	overflow: auto;
	border-radius: 22px;
	border: 1px solid rgba(255, 215, 168, 0.18);
	background:
		radial-gradient(circle at 30% 0%, rgba(255, 215, 168, 0.12), transparent 55%),
		linear-gradient(180deg, #3a0047, #1b0022);
	box-shadow: 0 30px 110px rgba(0, 0, 0, 0.55);
	padding: 14px 14px 12px;
	text-align: center;
	position: relative;
	overflow: hidden;
	transform: translateY(14px) scale(0.94);
	opacity: 0;
	animation: bouquetPop 540ms cubic-bezier(.2,.9,.2,1) 60ms both;
}

@keyframes bouquetPop {
	0% {
		opacity: 0;
		transform: translateY(18px) scale(0.92);
	}
	70% {
		opacity: 1;
		transform: translateY(-2px) scale(1.02);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.bouquetCard::before {
	content: "";
	position: absolute;
	inset: -40% -40%;
	background: radial-gradient(circle at 50% 40%, rgba(255, 77, 141, 0.18), transparent 55%);
	filter: blur(12px);
	opacity: 0.7;
	pointer-events: none;
}

.bouquetClose {
	appearance: none;
	position: absolute;
	top: 10px;
	right: 10px;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(0, 0, 0, 0.18);
	color: rgba(255, 255, 255, 0.85);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: transform 160ms ease, filter 160ms ease;
}

.bouquetClose:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

.bouquetClose:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

.bouquetTitle {
	margin: 6px 0 0;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 22px;
	letter-spacing: -0.01em;
}

.bouquetSub {
	margin: 4px 0 8px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 13px;
}

.bouquetSvg {
	width: min(280px, 100%);
	max-height: 280px;
	height: auto;
	margin: 0 auto;
	display: block;
	transform-origin: 50% 75%;
	animation: bouquetSway 4.5s ease-in-out 600ms infinite;
}

@keyframes bouquetSway {
	0%,
	100% {
		transform: rotate(-1.2deg) translateY(0);
	}
	50% {
		transform: rotate(1.2deg) translateY(-2px);
	}
}

.bouquetSvg .spark {
	transform-origin: center;
	animation: sparkle 1.8s ease-in-out infinite;
}

.bouquetSvg .spark:nth-child(2) {
	animation-delay: 0.35s;
}

.bouquetSvg .spark:nth-child(3) {
	animation-delay: 0.7s;
}

.bouquetSvg .spark:nth-child(4) {
	animation-delay: 1.05s;
}

@keyframes sparkle {
	0%,
	100% {
		opacity: 0.35;
		transform: scale(0.92);
	}
	50% {
		opacity: 0.85;
		transform: scale(1.18);
	}
}

.bouquetPetals {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.bouquetActions {
	margin-top: 8px;
	display: flex;
	justify-content: center;
}

/* Love letter overlay */
.letterOverlay {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	padding: 22px;
	background: radial-gradient(900px 600px at 50% 25%, rgba(255, 179, 199, 0.12), transparent 60%),
		linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.52));
	z-index: 60;
	animation: overlayIn 220ms ease both;
}

.letterOverlay:not([hidden]) {
	display: grid;
}

.letterOverlay[hidden] {
	display: none !important;
}

.loveLetterCard {
	width: min(820px, 100%);
	max-height: min(78vh, 720px);
	overflow: auto;
	border-radius: 22px;
	border: 1px solid rgba(255, 215, 168, 0.18);
	background: linear-gradient(180deg, #3a0047, #1b0022);
	box-shadow: 0 36px 130px rgba(0, 0, 0, 0.65);
	padding: 18px 18px 16px;
	position: relative;
}

.loveLetterClose {
	appearance: none;
	position: sticky;
	top: 10px;
	margin-left: auto;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 1px solid rgba(255, 215, 168, 0.18);
	background: linear-gradient(180deg, #24002d, #18001f);
	color: rgba(255, 255, 255, 0.9);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: transform 160ms ease, filter 160ms ease;
}

.loveLetterClose:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.loveLetterClose:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

.loveLetterTitle {
	margin: 6px 0 10px;
	text-align: center;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 28px;
	letter-spacing: -0.01em;
}

.loveLetterText {
	max-width: 72ch;
	margin: 0 auto;
	color: rgba(255, 255, 255, 0.84);
	line-height: 1.65;
	font-size: 16px;
}

.loveLetterText p {
	margin: 0 0 12px;
}

.loveLetterSign {
	margin-top: 14px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.92);
}

.bouquetPetals .petal {
	position: absolute;
	left: 50%;
	top: 40%;
	width: 18px;
	height: 26px;
	border-radius: 999px 999px 999px 0;
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.62), transparent 55%),
		linear-gradient(135deg, rgba(255, 241, 166, 0.95), rgba(255, 210, 74, 0.92), rgba(255, 159, 46, 0.90));
	opacity: 0;
	filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.3));
	transform: translate(-50%, -50%) rotate(20deg) scale(0.9);
	animation: petalFall 1.6s ease-in-out 240ms both;
}

.bouquetPetals .petal:nth-child(1) {
	margin-left: -120px;
	animation-delay: 120ms;
}

.bouquetPetals .petal:nth-child(2) {
	margin-left: -40px;
	animation-delay: 260ms;
}

.bouquetPetals .petal:nth-child(3) {
	margin-left: 40px;
	animation-delay: 340ms;
}

.bouquetPetals .petal:nth-child(4) {
	margin-left: 120px;
	animation-delay: 200ms;
}

.bouquetPetals .petal:nth-child(5) {
	margin-left: 0px;
	margin-top: -70px;
	animation-delay: 420ms;
}

@keyframes petalFall {
	0% {
		opacity: 0;
		transform: translate(-50%, -70%) rotate(25deg) scale(0.85);
	}
	25% {
		opacity: 0.9;
	}
	100% {
		opacity: 0;
		transform: translate(-50%, 120%) rotate(220deg) scale(1);
	}
}

/* Floating hearts */
.hearts {
	position: absolute;
	inset: 0;
}

.heart {
	position: absolute;
	width: var(--s, 18px);
	height: var(--s, 18px);
	transform: rotate(45deg);
	opacity: var(--o, 0.8);
	filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25));
	animation: floatUp var(--d, 10s) linear infinite;
}

.heart::before,
.heart::after {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 55%),
		linear-gradient(135deg, rgba(255, 77, 141, 0.98), rgba(255, 179, 199, 0.88));
	border-radius: 50%;
}

.heart::before {
	left: -50%;
}

.heart::after {
	top: -50%;
}

@keyframes floatUp {
	0% {
		transform: translateY(110vh) rotate(45deg) translateX(0);
	}
	100% {
		transform: translateY(-20vh) rotate(45deg) translateX(var(--x, 0px));
	}
}

/* Prefer-reduced-motion: keep things calm */
@media (prefers-reduced-motion: reduce) {
	.bg__glow,
	.bg__twinkle,
	.heart {
		animation: none !important;
	}
	.bouquetOverlay,
	.bouquetCard,
	.bouquetSvg,
	.bouquetSvg .spark,
	.bouquetPetals .petal {
		animation: none !important;
	}
	.bouquetCard {
		opacity: 1 !important;
		transform: none !important;
	}
	.btn {
		transition: none;
	}
}

@media (max-width: 560px) {
	body {
		overflow: auto;
	}
}
