@font-face {
	font-family: AlexBrush;
	src: url(./assets/fonts/AlexBrush-Regular.ttf)
}

body {
	margin: 0;
}

.container {
	max-width: 600px;
	position: relative;
	height: 100%;
	margin: auto;
	overflow: hidden;
}

img {
	object-fit: cover;
	height: 100%;
	width: 100%;
	-webkit-filter: drop-shadow(5px 5px 5px #222);
	filter: drop-shadow(5px 5px 5px #222);
}

button {
	border: 0;
	outline: 0;
	background-color: transparent;
	margin: 0;
	padding: 0;
	transition: transform 0.5s linear;
}

button:active {
	transform: scale(1.2);
}

.bg {
	z-index: 9;
	position: absolute;
	bottom: 0;
	top: 0;
}

.y {
	z-index: 99;
	position: absolute;
	bottom: 0;
}

.p {
	z-index: 9999;
	position: absolute;
	bottom: 0;
}

.s {
	z-index: 999;
	position: absolute;
	bottom: 0;
	right: 0;
	width: 50%;
}

.title {
	font-family: AlexBrush;
	position: absolute;
	top: 5%;
	left: 5%;
	z-index: 99999;
	font-size: 2.5rem;
	color: white;
	font-weight: 700;
	text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

#dialog-container {
	display: none;
	z-index: 99998;
	position: fixed;
	width: 300vw;
	top: 0;
	left: -200%;
	right: 200%;
	bottom: 0;
	background-color: #000000b9;
}

#dialog {
	display: none;
	width: min(550px, 90%);
	height: 100%;
	z-index: 99999;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 8px;
}

#dialog {
	animation: fadeIn 0.1s linear;
}

#dialog #content {
	padding: 12px;
	font-size: large;
}

@keyframes fadeIn {
	0% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

.envelope-container {
	position: fixed;
	width: 100%;
	bottom: 0;
	left: 50%;
	z-index: 9999999;
	transform: translate(-50%, 20%);
}

.envelope {
	position: relative;
	width: 100%;
	/* This makes the envelope fill its parent */
	aspect-ratio: 16 / 10;
	/* Keeps the envelope's shape */
	background-image: url('./assets/envelopes back.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	cursor: pointer;
	transition: all 0.3s ease-out;
	z-index: 999999;
	-webkit-filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
	filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
}

/* The envelope's main rectangular body - now handled by background image */

/* The flap of the envelope */
.envelope::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url('./assets/envelopes front.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1000000;
	transform-origin: top;
	-webkit-filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
	filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

/* The letter inside */
.letter {
	position: fixed;
	top: 35%;
	left: 5%;
	width: 90%;
	height: 90vh;
	background-color: #ffffff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	z-index: 999999.5;
	text-align: center;
	padding-top: 20px;
	font-family: sans-serif;
	color: #333;


	animation: letterUp 0.8s 0.1s forwards;
}

.letter-title {
	font-size: 1.1rem;
	font-family: monospace;
	margin: 0 0;
}

.letter-content {
	font-size: monospace;
	padding: 8px;
	padding-top: 0;
	text-align: justify;
	font-size: 16px;
	line-height: 1.2;
}

@keyframes letterUp {
	0% {}

	100% {
		transform: translateY(-80vh);
	}
}

@keyframes letterClose {
	0% {
		transform: translateY(-80vh) scale(1);
		height: 90vh;
		width: 90%;
		left: 5%;
		top: 35%;
		opacity: 1;
		z-index: 999999.5;
	}

	30% {
		transform: translateY(0) scale(1);
		height: 90vh;
		width: 90%;
		left: 5%;
		top: 35%;
		opacity: 1;
		z-index: 999999.5;
	}

	70% {
		transform: translateY(0) scale(0.3);
		height: 30%;
		width: 40%;
		left: 30%;
		top: 60%;
		opacity: 0.8;
		z-index: 999999;
	}

	100% {
		transform: translateY(10px) scale(0.2);
		height: 20%;
		width: 30%;
		left: 35%;
		top: 65%;
		opacity: 0.3;
		z-index: 999998;
	}
}

.heart {
	position: fixed;
	bottom: -1vh;
	width: 25px;
	height: auto;
	/* font-size: 40px; */
	transform: translateY(0);
	animation: fall 2.5s linear forwards;
	z-index: 99999;
}

@keyframes fall {
	to {
		transform: translateY(-102vh);
		opacity: 0;
	}
}