/* ============================================
   BIRTHDAY GREETING — Modern & Trendy
   Glassmorphism · Gradients · Animations
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
	--primary: #ff6b9d;
	--primary-dark: #e84393;
	--secondary: #a29bfe;
	--accent: #fdcb6e;
	--accent-glow: #f9ca24;
	--bg-dark: #0c0c1d;
	--bg-gradient: linear-gradient(135deg, #0c0c1d 0%, #1a1a3e 40%, #2d1b69 100%);
	--glass-bg: rgba(255, 255, 255, 0.08);
	--glass-border: rgba(255, 255, 255, 0.15);
	--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	--text-light: #f5f5f5;
	--text-muted: #b8b8d0;
	--transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	--bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	font-family:
		"Outfit",
		system-ui,
		-apple-system,
		sans-serif;
	background: var(--bg-gradient);
	color: var(--text-light);
	min-height: 100vh;
	overflow-x: hidden;
}

.hidden {
	display: none !important;
}

/* ---------- Glassmorphism Card ---------- */
.glass-card {
	background: var(--glass-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	box-shadow: var(--glass-shadow);
}

/* ============================================
   INTRO / ENVELOPE SCREEN
   ============================================ */
.intro-screen {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-gradient);
	z-index: 1000;
	transition: all 0.8s ease;
}

.intro-screen.fade-out {
	opacity: 0;
	transform: scale(1.1);
	pointer-events: none;
}

.envelope-wrapper {
	text-align: center;
	position: relative;
}

/* Floating emojis */
.floating-hearts span {
	position: absolute;
	font-size: clamp(1rem, 3vw, 2rem);
	animation: floatAround 6s ease-in-out infinite;
	opacity: 0.6;
}

.floating-hearts span:nth-child(1) {
	top: -60px;
	left: -80px;
	animation-delay: 0s;
}
.floating-hearts span:nth-child(2) {
	top: -40px;
	right: -60px;
	animation-delay: 0.5s;
}
.floating-hearts span:nth-child(3) {
	bottom: -50px;
	left: -40px;
	animation-delay: 1s;
}
.floating-hearts span:nth-child(4) {
	bottom: -30px;
	right: -80px;
	animation-delay: 1.5s;
}
.floating-hearts span:nth-child(5) {
	top: 20px;
	left: -120px;
	animation-delay: 2s;
}
.floating-hearts span:nth-child(6) {
	top: 60px;
	right: -110px;
	animation-delay: 2.5s;
}
.floating-hearts span:nth-child(7) {
	bottom: 40px;
	left: -100px;
	animation-delay: 3s;
}
.floating-hearts span:nth-child(8) {
	top: -80px;
	left: 40px;
	animation-delay: 3.5s;
}
.floating-hearts span:nth-child(9) {
	bottom: -60px;
	right: 20px;
	animation-delay: 4s;
}
.floating-hearts span:nth-child(10) {
	top: 100px;
	right: -40px;
	animation-delay: 4.5s;
}

@keyframes floatAround {
	0%,
	100% {
		transform: translateY(0) rotate(0deg);
	}
	25% {
		transform: translateY(-15px) rotate(10deg);
	}
	50% {
		transform: translateY(-5px) rotate(-5deg);
	}
	75% {
		transform: translateY(-20px) rotate(5deg);
	}
}

/* Envelope */
.envelope {
	width: clamp(240px, 70vw, 350px);
	height: clamp(170px, 50vw, 240px);
	position: relative;
	margin: 0 auto 40px;
	perspective: 600px;
}

.envelope-body {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
	border-radius: 12px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(255, 107, 157, 0.3);
}

.envelope-top {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 50%;
	background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
	clip-path: polygon(0 0, 50% 70%, 100% 0);
	z-index: 2;
	transform-origin: top center;
	transition: transform 0.6s var(--bounce);
}

.envelope.opened .envelope-top {
	transform: rotateX(180deg);
}

.letter {
	position: absolute;
	bottom: 20%;
	left: 10%;
	right: 10%;
	background: white;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	transform: translateY(0);
	transition: transform 0.6s var(--bounce) 0.3s;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.envelope.opened .letter {
	transform: translateY(-60%);
}

.letter-text {
	color: #333;
	font-family: "Outfit", sans-serif;
	font-size: clamp(1rem, 4vw, 1.4rem);
	font-weight: 600;
	font-style: italic;
}

/* Open Button */
.open-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 36px;
	border: none;
	border-radius: 50px;
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	color: white;
	font-family: "Outfit", sans-serif;
	font-size: clamp(0.95rem, 3vw, 1.1rem);
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 30px rgba(255, 107, 157, 0.4);
	transition: all var(--transition);
	animation: pulse 2s ease-in-out infinite;
}

.open-btn:hover {
	transform: translateY(-3px) scale(1.05);
	box-shadow: 0 12px 40px rgba(255, 107, 157, 0.6);
}

.open-btn:active {
	transform: translateY(0) scale(0.98);
}

.btn-icon {
	font-size: 1.4em;
}

@keyframes pulse {
	0%,
	100% {
		box-shadow: 0 8px 30px rgba(255, 107, 157, 0.4);
	}
	50% {
		box-shadow: 0 8px 50px rgba(255, 107, 157, 0.7);
	}
}

/* ============================================
   MAIN BIRTHDAY SCREEN
   ============================================ */
.main-screen {
	position: relative;
	min-height: 100vh;
}

/* Confetti Canvas */
#confettiCanvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 100;
}

/* Floating Particles */
.particles {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

.particle {
	position: absolute;
	border-radius: 50%;
	animation: particleFloat linear infinite;
	opacity: 0;
}

@keyframes particleFloat {
	0% {
		opacity: 0;
		transform: translateY(100vh) scale(0);
	}
	10% {
		opacity: 0.8;
	}
	90% {
		opacity: 0.6;
	}
	100% {
		opacity: 0;
		transform: translateY(-10vh) scale(1);
	}
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	position: relative;
	z-index: 1;
}

.hero-content {
	text-align: center;
	padding: clamp(30px, 8vw, 60px) clamp(20px, 6vw, 50px);
	max-width: 600px;
	width: 100%;
	animation: fadeInUp 1s ease forwards;
}

.animated-cake {
	font-size: clamp(3rem, 12vw, 6rem);
	animation: cakeBounce 2s ease-in-out infinite;
	filter: drop-shadow(0 10px 20px rgba(255, 107, 157, 0.3));
}

@keyframes cakeBounce {
	0%,
	100% {
		transform: translateY(0) rotate(0deg);
	}
	25% {
		transform: translateY(-12px) rotate(-3deg);
	}
	50% {
		transform: translateY(-6px) rotate(0deg);
	}
	75% {
		transform: translateY(-15px) rotate(3deg);
	}
}

.title {
	margin: 20px 0;
}

.title-line {
	display: block;
	font-family: "Playfair Display", serif;
	font-weight: 900;
	line-height: 1.1;
	background: linear-gradient(
		135deg,
		var(--primary),
		var(--accent),
		var(--secondary)
	);
	background-size: 200% 200%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: gradientShift 4s ease infinite;
}

.line-1 {
	font-size: clamp(2rem, 8vw, 3.5rem);
	opacity: 0;
	animation: slideInLeft 0.8s ease forwards 0.3s;
}

.line-2 {
	font-size: clamp(2.5rem, 10vw, 4.5rem);
	opacity: 0;
	animation: slideInRight 0.8s ease forwards 0.6s;
}

@keyframes gradientShift {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Name Badge */
.name-badge {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 24px 0 16px;
	padding: 12px 28px;
	background: linear-gradient(
		135deg,
		rgba(255, 107, 157, 0.2),
		rgba(162, 155, 254, 0.2)
	);
	border: 1px solid rgba(255, 107, 157, 0.3);
	border-radius: 50px;
	animation: fadeInUp 0.8s ease forwards 0.9s;
	opacity: 0;
}

.badge-decorator {
	color: var(--accent);
	font-size: 0.8rem;
	animation: sparkle 1.5s ease-in-out infinite;
}

.badge-decorator.right {
	animation-delay: 0.75s;
}

@keyframes sparkle {
	0%,
	100% {
		opacity: 0.5;
		transform: scale(1);
	}
	50% {
		opacity: 1;
		transform: scale(1.3);
	}
}

.name {
	font-family: "Outfit", sans-serif;
	font-size: clamp(1.6rem, 6vw, 2.5rem);
	font-weight: 700;
	color: var(--accent);
	letter-spacing: 1px;
}

.subtitle {
	font-size: clamp(0.95rem, 3vw, 1.2rem);
	color: var(--text-muted);
	margin-top: 8px;
	opacity: 0;
	animation: fadeInUp 0.8s ease forwards 1.2s;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 32px;
}

.section-header h3 {
	font-family: "Playfair Display", serif;
	font-size: clamp(1.3rem, 5vw, 1.8rem);
	font-weight: 700;
	white-space: nowrap;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.header-line {
	flex: 1;
	max-width: 80px;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* ============================================
   WISHES SECTION
   ============================================ */
.wishes-section {
	padding: 60px 20px 80px;
	position: relative;
	z-index: 1;
}

.wishes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
}

.wish-card {
	padding: 28px 24px;
	text-align: center;
	transition: all var(--transition);
	opacity: 0;
	transform: translateY(40px);
}

.wish-card.visible {
	opacity: 1;
	transform: translateY(0);
}

.wish-card:hover {
	transform: translateY(-8px) scale(1.02);
	border-color: rgba(255, 107, 157, 0.4);
	box-shadow: 0 12px 40px rgba(255, 107, 157, 0.2);
}

.wish-icon {
	font-size: 2.5rem;
	margin-bottom: 16px;
	animation: iconWiggle 3s ease-in-out infinite;
}

.wish-card:nth-child(2) .wish-icon {
	animation-delay: 0.5s;
}
.wish-card:nth-child(3) .wish-icon {
	animation-delay: 1s;
}
.wish-card:nth-child(4) .wish-icon {
	animation-delay: 1.5s;
}

@keyframes iconWiggle {
	0%,
	100% {
		transform: rotate(0deg);
	}
	25% {
		transform: rotate(8deg);
	}
	75% {
		transform: rotate(-8deg);
	}
}

.wish-card p {
	color: var(--text-muted);
	line-height: 1.7;
	font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* ============================================
   CANDLES SECTION
   ============================================ */
.candles-section {
	padding: 60px 20px 80px;
	text-align: center;
	position: relative;
	z-index: 1;
}

.candle-instruction {
	color: var(--text-muted);
	margin-bottom: 30px;
	font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.cake-display {
	max-width: 500px;
	margin: 0 auto;
	padding: 40px 30px 30px;
}

.candles-row {
	display: flex;
	justify-content: center;
	gap: clamp(12px, 4vw, 24px);
	margin-bottom: 20px;
}

.candle {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	transition: transform 0.3s var(--bounce);
}

.candle:hover {
	transform: scale(1.15);
}

.candle-body {
	width: clamp(14px, 3vw, 20px);
	height: clamp(50px, 12vw, 70px);
	background: linear-gradient(180deg, #ffeaa7, #fdcb6e, #f39c12);
	border-radius: 4px 4px 6px 6px;
	box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
	position: relative;
}

.candle-body::after {
	content: "";
	position: absolute;
	top: -4px;
	left: 50%;
	transform: translateX(-50%);
	width: 3px;
	height: 8px;
	background: #ddd;
	border-radius: 2px;
}

.flame {
	font-size: clamp(1.2rem, 4vw, 1.8rem);
	transition: all 0.4s ease;
	animation: flicker 0.3s ease-in-out infinite alternate;
}

.flame.active {
	opacity: 1;
	transform: scale(1);
}

.flame.blown {
	opacity: 0;
	transform: scale(0) translateY(10px);
	animation: none;
}

@keyframes flicker {
	from {
		transform: scale(1) rotate(-3deg);
	}
	to {
		transform: scale(1.1) rotate(3deg);
	}
}

.cake-base {
	font-size: clamp(3rem, 10vw, 5rem);
	margin: 10px 0;
}

.candle-status {
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* Wish Reveal */
.wish-reveal {
	margin-top: 30px;
}

.wish-reveal-content {
	max-width: 400px;
	margin: 0 auto;
	padding: 30px;
	animation: wishPop 0.6s var(--bounce) forwards;
}

.sparkle-burst {
	font-size: 1.5rem;
	letter-spacing: 8px;
	margin-bottom: 12px;
	animation: sparkleRotate 2s linear infinite;
}

@keyframes sparkleRotate {
	from {
		filter: hue-rotate(0deg);
	}
	to {
		filter: hue-rotate(360deg);
	}
}

@keyframes wishPop {
	from {
		opacity: 0;
		transform: scale(0.5);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.wish-reveal-content h3 {
	font-family: "Playfair Display", serif;
	font-size: 1.4rem;
	margin-bottom: 8px;
	color: var(--accent);
}

.wish-message {
	color: var(--text-muted);
	font-size: 1rem;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery-section {
	padding: 60px 20px 80px;
	position: relative;
	z-index: 1;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
}

.gallery-card {
	padding: 0;
	text-align: center;
	transition: all var(--transition);
	cursor: pointer;
	overflow: hidden;
	aspect-ratio: 1;
}

.gallery-card:hover {
	transform: translateY(-6px) scale(1.03);
	border-color: rgba(162, 155, 254, 0.4);
	box-shadow: 0 12px 40px rgba(162, 155, 254, 0.2);
}

.gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 24px;
	transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
	transform: scale(1.08);
}

/* Video in gallery */
.gallery-video {
	position: relative;
	grid-column: span 2;
	aspect-ratio: auto;
}

.video-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 50px;
	height: 50px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.2rem;
	pointer-events: none;
	transition: all 0.3s ease;
	backdrop-filter: blur(4px);
}

.gallery-video.playing .video-play-icon {
	opacity: 0;
}

.gallery-placeholder {
	font-size: 3.5rem;
	margin-bottom: 12px;
	transition: transform 0.3s var(--bounce);
}

.gallery-card:hover .gallery-placeholder {
	transform: scale(1.2) rotate(-5deg);
}

.gallery-card p {
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* ============================================
   MUSIC TOGGLE
   ============================================ */
.music-toggle {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	border: 1px solid var(--glass-border);
	border-radius: 50%;
	background: var(--glass-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	cursor: pointer;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	transition: all var(--transition);
}

.music-toggle:hover {
	transform: scale(1.1);
	border-color: var(--primary);
}

.music-toggle.playing .music-icon {
	animation: musicPulse 0.6s ease-in-out infinite alternate;
}

.music-icon {
	font-size: 1.5rem;
}

@keyframes musicPulse {
	from {
		transform: scale(1);
	}
	to {
		transform: scale(1.2);
	}
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
	text-align: center;
	padding: 30px 20px;
	margin: 0 20px 20px;
	position: relative;
	z-index: 1;
}

.footer p {
	color: var(--text-muted);
	font-size: 0.9rem;
}

.heart-beat {
	display: inline-block;
	animation: heartBeat 1.2s ease-in-out infinite;
}

@keyframes heartBeat {
	0%,
	100% {
		transform: scale(1);
	}
	15% {
		transform: scale(1.3);
	}
	30% {
		transform: scale(1);
	}
	45% {
		transform: scale(1.2);
	}
}

.footer-year {
	margin-top: 6px;
	font-size: 0.8rem;
	opacity: 0.5;
}

.dev-credit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 20px 0 12px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dev-photo {
	width: 200px;
	height: 200px;
	border-radius: 24px;
	object-fit: cover;
	border: 2px solid var(--primary);
	box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
	transition: transform 0.3s var(--bounce);
}

.dev-photo:hover {
	transform: scale(1.1) rotate(5deg);
}

.dev-credit p {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.dev-credit strong {
	color: var(--primary);
	font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Small phones */
@media (max-width: 380px) {
	.hero-content {
		padding: 24px 16px;
	}
	.wishes-grid {
		grid-template-columns: 1fr;
	}
	.gallery-grid {
		grid-template-columns: 1fr 1fr;
	}
	.candles-row {
		gap: 8px;
	}
}

/* Tablets */
@media (min-width: 768px) {
	.wishes-grid {
		grid-template-columns: 1fr 1fr;
	}
	.gallery-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Desktop */
@media (min-width: 1024px) {
	.hero-content {
		padding: 70px 60px;
	}
	.wishes-section,
	.candles-section,
	.gallery-section {
		padding: 80px 40px 100px;
	}
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ============================================
   SCROLL ANIMATIONS (intersection observer)
   ============================================ */
.scroll-reveal {
	opacity: 0;
	transform: translateY(30px);
	transition:
		opacity 0.8s ease,
		transform 0.8s ease;
}

.scroll-reveal.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ============================================
   SCROLL DOWN INDICATOR
   ============================================ */
.scroll-indicator {
	margin-top: 32px;
	text-align: center;
	opacity: 0;
	animation: fadeInUp 0.8s ease forwards 1.6s;
}

.scroll-text {
	color: var(--text-muted);
	font-size: clamp(0.8rem, 2.5vw, 0.95rem);
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.scroll-arrow {
	display: flex;
	justify-content: center;
}

.scroll-arrow span {
	display: inline-block;
	color: var(--primary);
	font-size: 1.2rem;
	animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
	0%,
	100% {
		transform: translateY(0);
		opacity: 0.4;
	}
	50% {
		transform: translateY(12px);
		opacity: 1;
	}
}

/* ============================================
   PERSONAL LETTERS SECTION
   ============================================ */
.letters-section {
	padding: 60px 20px 80px;
	position: relative;
	z-index: 1;
}

.letters-subtitle {
	text-align: center;
	color: var(--text-muted);
	margin-bottom: 32px;
	font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.letters-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
	max-width: 700px;
	margin: 0 auto;
}

.letter-card {
	padding: 36px 28px;
	text-align: center;
	cursor: pointer;
	transition: all var(--transition);
	position: relative;
	overflow: hidden;
}

.letter-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(255, 107, 157, 0.08),
		rgba(162, 155, 254, 0.08)
	);
	opacity: 0;
	transition: opacity var(--transition);
}

.letter-card:hover::before {
	opacity: 1;
}

.letter-card:hover {
	transform: translateY(-10px) scale(1.03);
	border-color: rgba(255, 107, 157, 0.5);
	box-shadow: 0 16px 50px rgba(255, 107, 157, 0.25);
}

.letter-card-front {
	position: relative;
	z-index: 1;
}

.letter-avatar {
	font-size: 3.5rem;
	margin-bottom: 16px;
	animation: gentleFloat 3s ease-in-out infinite;
}

#letterAsiyah .letter-avatar {
	animation-delay: 1.5s;
}

@keyframes gentleFloat {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-8px);
	}
}

.letter-card h4 {
	font-family: "Playfair Display", serif;
	font-size: clamp(1.2rem, 4vw, 1.5rem);
	font-weight: 700;
	margin-bottom: 8px;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.letter-preview {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-bottom: 20px;
	font-style: italic;
}

.letter-open-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	border: 1px solid rgba(255, 107, 157, 0.4);
	border-radius: 50px;
	background: linear-gradient(
		135deg,
		rgba(255, 107, 157, 0.15),
		rgba(162, 155, 254, 0.15)
	);
	color: var(--text-light);
	font-family: "Outfit", sans-serif;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all var(--transition);
}

.letter-open-btn:hover {
	background: linear-gradient(
		135deg,
		rgba(255, 107, 157, 0.3),
		rgba(162, 155, 254, 0.3)
	);
	border-color: var(--primary);
	box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
}

/* ============================================
   LETTER MODAL
   ============================================ */
.letter-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: modalFadeIn 0.4s ease forwards;
}

.letter-modal.hidden {
	display: none !important;
}

.letter-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.letter-modal-content {
	position: relative;
	max-width: 520px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	padding: 40px 32px;
	animation: modalSlideUp 0.5s var(--bounce) forwards;
	background: rgba(20, 20, 50, 0.9);
	border: 1px solid rgba(255, 107, 157, 0.3);
}

.letter-modal-content::-webkit-scrollbar {
	width: 6px;
}

.letter-modal-content::-webkit-scrollbar-track {
	background: transparent;
}

.letter-modal-content::-webkit-scrollbar-thumb {
	background: rgba(255, 107, 157, 0.3);
	border-radius: 3px;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes modalSlideUp {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.letter-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: 1px solid var(--glass-border);
	border-radius: 50%;
	background: var(--glass-bg);
	color: var(--text-light);
	font-size: 1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all var(--transition);
	z-index: 10;
}

.letter-modal-close:hover {
	background: rgba(255, 107, 157, 0.3);
	border-color: var(--primary);
	transform: rotate(90deg);
}

.letter-modal-header {
	text-align: center;
	margin-bottom: 24px;
}

.letter-modal-avatar {
	font-size: 3rem;
	margin-bottom: 12px;
}

.letter-modal-header h3 {
	font-family: "Playfair Display", serif;
	font-size: 1.5rem;
	font-weight: 700;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.letter-modal-body {
	font-family: "Outfit", sans-serif;
	font-size: clamp(1.15rem, 3vw, 1.35rem);
	line-height: 1.9;
	color: var(--text-muted);
	text-align: center;
	padding: 20px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.letter-modal-footer {
	text-align: center;
	padding-top: 20px;
}

.letter-heart {
	font-size: 2rem;
	display: inline-block;
	animation: heartBeat 1.2s ease-in-out infinite;
}

/* Responsive for letters */
@media (max-width: 380px) {
	.letters-grid {
		grid-template-columns: 1fr;
	}
	.letter-modal-content {
		padding: 30px 20px;
	}
}

@media (min-width: 1024px) {
	.letters-section {
		padding: 80px 40px 100px;
	}
}
