:root {
	--bg: linear-gradient(135deg, #ffe6f0, #ffd1e8);
	--card: #ffffff;
	--text: #6b1d45;
	--primary: #ff5fa2;
	--accent: #ff8fcf;
	--shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
	--glow: 0 0 25px rgba(255, 95, 162, 0.3);
}

body.dark {
	--bg: #000000;
	--card: #121212;
	--text: #ffd6e8;
	--shadow: 0 20px 60px rgba(255, 95, 162, 0.35);
	--glow: 0 0 25px rgba(255, 95, 162, 0.45);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg);
	font-family: "Comic Sans MS", cursive;
	color: var(--text);
	overflow: hidden;
	padding: 20px;
}

.bg-hearts {
	position: fixed;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}

.container {
	position: relative;
	z-index: 2;
	background: var(--card);
	padding: 34px;
	border-radius: 30px;
	width: 100%;
	max-width: 420px;
	text-align: center;
	box-shadow: var(--shadow), var(--glow);
}

.section {
	display: none;
}

.section.active {
	display: block;
	animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

h1 {
	margin-bottom: 20px;
}

input {
	width: 100%;
	padding: 14px;
	margin: 10px 0;
	border-radius: 16px;
	border: none;
	font-size: 1.05em;
	background: #f5f5f5;
	color: #333;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
	transition:
		box-shadow 0.25s ease,
		background 0.25s ease;
}

input:focus {
	outline: none;
	box-shadow:
		0 0 0 3px rgba(255, 95, 162, 0.4),
		inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

body.dark input {
	background: #1c1c1c;
	color: #ffd6e8;
	box-shadow:
		inset 0 0 0 1px rgba(255, 95, 162, 0.25),
		inset 0 4px 10px rgba(0, 0, 0, 0.6);
}

body.dark input:focus {
	box-shadow:
		0 0 0 3px rgba(255, 95, 162, 0.6),
		inset 0 4px 10px rgba(0, 0, 0, 0.8);
}

.container button {
	width: 100%;
	padding: 14px;
	border-radius: 999px;
	border: none;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	color: white;
	font-size: 1.1em;
	cursor: pointer;
	margin-top: 14px;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

#themeToggle {
	position: fixed;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	cursor: pointer;
	box-shadow: var(--shadow);
	z-index: 10;
	transition: transform 0.5s ease;
}

#themeToggle.spin {
	transform: rotate(360deg) scale(1.2);
}

#names {
	font-size: 1.4em;
	margin-bottom: 16px;
}

.qr-wrap {
	margin-top: 20px;
	padding: 18px;
	border-radius: 22px;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	box-shadow: var(--glow);
	animation: pop 0.5s ease;
}

@keyframes pop {
	from {
		opacity: 0;
		transform: scale(0.85);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.qr-wrap img {
	width: 200px;
	border-radius: 14px;
	background: white;
	padding: 10px;
}

body.dark .qr-wrap img {
	background: #000000;
}

.bg-hearts span {
	position: absolute;
	font-size: 20px;
	opacity: 0.25;
	animation: float 10s linear infinite;
}

@keyframes float {
	from {
		transform: translateY(110vh);
	}
	to {
		transform: translateY(-10vh);
	}
}

@media (max-width: 480px) {
	.container {
		padding: 26px;
		border-radius: 24px;
	}
	h1 {
		font-size: 1.4em;
	}
}
