/* ========================================
   GLOBAL STYLES & RESET
   ======================================== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	/* Colors */
	--bg-beige: #fdf5e6;
	--accent-red: #ff6d83;
	--accent-red-light: #ff9b9b;
	--text-dark: #4a4a4a;
	--text-light: #6a6a6a;
	--white: #ffffff;
	--shadow: rgba(0, 0, 0, 0.1);
	--shadow-strong: rgba(0, 0, 0, 0.2);
	--text-white: #ffffff;
	--text-black: #000000;

	/* Fonts */
	--font-handwriting: "Caveat", cursive;
	--font-body: "Poppins", sans-serif;

	/* Photo filter toggle */
	--photo-filter: sepia(20%) saturate(110%) brightness(105%);
}

body {
	font-family: var(--font-body);
	background-color: var(--bg-beige);
	color: var(--text-dark);
	overflow-x: hidden;
	line-height: 1.6;
}

/* Paper texture background */
body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: repeating-linear-gradient(
			0deg,
			transparent,
			transparent 2px,
			rgba(0, 0, 0, 0.02) 2px,
			rgba(0, 0, 0, 0.02) 4px
		),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 2px,
			rgba(0, 0, 0, 0.02) 2px,
			rgba(0, 0, 0, 0.02) 4px
		);
	pointer-events: none;
	z-index: 1;
	opacity: 0.3;
}

.hidden {
	display: none !important;
}

/* ========================================
   PASSWORD SCREEN
   ======================================== */

.password-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: var(--bg-beige);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.password-container {
	text-align: center;
	padding: 60px 40px 40px;
	background: url("../assets/doodles/window-frame.png") no-repeat center center;
	background-size: 100% 100%;
	max-width: 500px;
	width: 90%;
	position: relative;
	min-height: 400px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}

.password-icon {
	width: 80px;
	height: 80px;
	margin-bottom: 20px;
	animation: float 3s ease-in-out infinite;
}

.password-title {
	font-family: var(--font-handwriting);
	font-size: 3rem;
	color: var(--text-white);
	margin-bottom: 10px;
	font-weight: 700;
	text-shadow: 2px 2px 4px rgba(255, 109, 131, 0.2);
}

.password-subtitle {
	font-size: 1rem;
	color: var(--text-light);
	margin-bottom: 30px;
}

.password-input-wrapper {
	margin-bottom: 20px;
}

.password-input {
	width: 100%;
	padding: 15px 20px;
	border: none;
	background: url("../assets/doodles/input-bg.png") no-repeat center center;
	background-size: 100% 100%;
	font-size: 1.1rem;
	font-family: var(--font-handwriting);
	font-size: 1.3rem;
	font-weight: 600;
	outline: none;
	transition: all 0.3s ease;
	text-align: center;
	color: var(--text-dark);
	height: 60px;
}

.password-input:focus {
	border-color: var(--accent-red);
	transform: scale(1.02);
}

.password-submit {
	width: 100%;
	padding: 15px;
	background: url("../assets/doodles/button-bg.png") no-repeat center center;
	background-size: 100% 100%;
	color: var(--white);
	border: none;
	font-size: 1.2rem;
	font-family: var(--font-handwriting);
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	filter: drop-shadow(0 4px 10px rgba(255, 109, 131, 0.3));
	height: 50px;
}

.password-submit:hover {
	transform: translateY(-2px) rotate(-1deg);
	filter: drop-shadow(0 6px 15px rgba(255, 109, 131, 0.5)) brightness(1.1);
}

.password-submit:active {
	transform: translateY(0);
}

.window-close-decoration {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 35px;
	height: 35px;
	opacity: 0.7;
	transition: all 0.3s ease;
	pointer-events: none;
}

.password-error {
	color: var(--accent-red);
	font-size: 0.9rem;
	margin-top: 10px;
	font-family: var(--font-handwriting);
	font-size: 1.2rem;
}

/* ========================================
   INTRO SCREEN
   ======================================== */

.intro-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: var(--bg-beige);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 999;
	opacity: 0;
	animation: fadeIn 1s ease forwards;
}

.intro-container {
	text-align: center;
	padding: 100px 40px 40px;
	max-width: 600px;
	width: 90%;
	background: url("../assets/doodles/window-frame.png") no-repeat center center;
	background-size: contain;
	min-height: 500px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}

.intro-doodle {
	width: 150px;
	height: 150px;
	margin-bottom: 0px;
	animation: float 3s ease-in-out infinite;
}

.intro-title {
	font-family: var(--font-handwriting);
	font-size: 3.5rem;
	color: var(--accent-red);
	margin-bottom: 0px;
	margin-top: -10px;
	font-weight: 700;
	text-shadow: 3px 3px 6px rgba(255, 109, 131, 0.2);
}

.intro-message {
	font-size: 1.2rem;
	color: var(--text-dark);
	line-height: 0.8;
	margin-bottom: 10px;
	font-family: var(--font-handwriting);
	font-weight: 500;
	font-size: 1.4rem;
}

.intro-message p {
	margin-bottom: 15px;
}

.start-button {
	padding: 15px 40px;
	background: url("../assets/doodles/button-bg.png") no-repeat center center;
	background-size: 100% 100%;
	color: var(--white);
	border: none;
	font-size: 1.3rem;
	font-family: var(--font-handwriting);
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	filter: drop-shadow(0 4px 10px rgba(255, 109, 131, 0.3));
	height: 50px;
	min-width: 200px;
}

.start-button:hover {
	transform: translateY(-3px) rotate(1deg) scale(1.05);
	filter: drop-shadow(0 6px 15px rgba(255, 109, 131, 0.5)) brightness(1.1);
}

/* ========================================
   MAIN TIMELINE CONTENT
   ======================================== */

.main-content {
	position: relative;
	min-height: 100vh;
	padding: 60px 20px 100px;
	z-index: 2;
	opacity: 0;
	animation: fadeIn 1s ease forwards;
}

.timeline-line {
	position: absolute;
	left: 50%;
	top: 0;
	width: 8px;
	height: 100%;
	background: url("../assets/doodles/timeline-line.png") repeat-y center center;
	background-size: 8px auto;
	transform: translateX(-50%);
	z-index: 1;
	filter: drop-shadow(0 2px 4px rgba(255, 109, 131, 0.3));
}

.background-doodles {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 1;
}

.bg-doodle {
	position: absolute;
	width: 60px;
	height: 60px;
	opacity: 0.3;
	animation: float 4s ease-in-out infinite;
}

.heart-1 {
	top: 10%;
	left: 10%;
	animation-delay: 0s;
}

.heart-2 {
	top: 50%;
	right: 15%;
	animation-delay: 1s;
}

.heart-3 {
	top: 20%;
	right: 25%;
	animation-delay: 2s;
}

.heart-4 {
	top: 65%;
	left: 8%;
	animation-delay: 0.8s;
}

.heart-5 {
	top: 85%;
	right: 20%;
	animation-delay: 1.8s;
}

.heart-6 {
	top: 40%;
	left: 5%;
	animation-delay: 2.5s;
}

.star-1 {
	top: 30%;
	right: 10%;
	animation-delay: 0.5s;
}

.star-2 {
	top: 70%;
	left: 15%;
	animation-delay: 1.5s;
}

.star-3 {
	top: 15%;
	left: 12%;
	animation-delay: 1.2s;
}

.star-4 {
	top: 55%;
	right: 8%;
	animation-delay: 0.3s;
}

.star-5 {
	top: 80%;
	left: 22%;
	animation-delay: 2.2s;
}

.star-6 {
	top: 45%;
	right: 18%;
	animation-delay: 1.7s;
}

/* ========================================
   TIMELINE CONTAINER
   ======================================== */

.timeline-container {
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	z-index: 3;
}

.month-section {
	margin-bottom: 80px;
	opacity: 0;
	transform: translateY(30px);
	animation: slideUp 0.8s ease forwards;
}

.month-header {
	text-align: center;
	margin-bottom: 50px;
	position: relative;
}

.month-title {
	font-family: var(--font-handwriting);
	font-size: 3rem;
	color: var(--accent-red);
	font-weight: 700;
	display: inline-block;
	padding: 15px 40px;
	background: var(--white);
	border-radius: 50% 45% 48% 52% / 45% 50% 50% 55%;
	box-shadow: 0 5px 20px var(--shadow);
	border: 4px solid var(--accent-red-light);
	position: relative;
	z-index: 2;
	transform: rotate(-2deg);
	filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

.events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 30px;
	padding: 0 20px;
}

/* ========================================
   EVENT CARDS (POLAROID STYLE)
   ======================================== */

.event-card {
	background: var(--white);
	padding: 12px;
	border-radius: 3px;
	box-shadow: 0 6px 20px var(--shadow);
	cursor: pointer;
	transition: all 0.3s ease;
	transform: rotate(var(--rotation, 0deg));
	position: relative;
	border: 3px solid var(--white);
	filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.15));
}

.event-card:nth-child(odd) {
	--rotation: -2deg;
}

.event-card:nth-child(even) {
	--rotation: 2deg;
}

.event-card.highlight {
	border: 4px solid var(--accent-red);
	padding: 15px;
	border-radius: 5px 3px 4px 3px;
}

.event-card.highlight::before {
	content: "";
	position: absolute;
	top: -15px;
	right: -15px;
	width: 40px;
	height: 40px;
	background: var(--accent-red);
	border-radius: 50%;
	box-shadow: 0 4px 10px var(--shadow-strong);
	z-index: 10;
}

.event-card:hover {
	transform: rotate(0deg) scale(1.08) translateY(-8px);
	filter: drop-shadow(4px 8px 12px rgba(0, 0, 0, 0.25)) brightness(1.02);
	z-index: 10;
}

.event-image-container {
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 3px;
	margin-bottom: 15px;
	background: var(--bg-beige);
}

.event-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--photo-filter);
	transition: transform 0.3s ease;
}

.event-card:hover .event-image {
	transform: scale(1.1);
}

.event-info {
	text-align: center;
}

.event-title {
	font-family: var(--font-handwriting);
	font-size: 1.4rem;
	color: var(--text-dark);
	margin-bottom: 5px;
	font-weight: 700;
	line-height: 1.2;
}

.event-date {
	font-size: 0.9rem;
	color: var(--text-light);
	font-weight: 300;
}

/* ========================================
   FINAL MESSAGE SECTION
   ======================================== */

.final-message {
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 60px 20px;
	position: relative;
	z-index: 3;
}

.final-content {
	text-align: center;
	max-width: 600px;
	background: var(--white);
	padding: 60px 40px;
	border-radius: 50% 45% 52% 48% / 48% 52% 48% 52%;
	box-shadow: 0 10px 40px var(--shadow);
	border: 5px solid var(--accent-red-light);
	transform: rotate(-1deg);
	filter: drop-shadow(4px 6px 10px rgba(0, 0, 0, 0.15));
}

.final-doodle {
	width: 120px;
	height: 120px;
	margin-bottom: 30px;
	animation: float 3s ease-in-out infinite;
}

.final-title {
	font-family: var(--font-handwriting);
	font-size: 3.5rem;
	color: var(--accent-red);
	margin-bottom: 30px;
	font-weight: 700;
	text-shadow: 3px 3px 6px rgba(255, 109, 131, 0.2);
}

.final-text {
	font-size: 1.4rem;
	line-height: 1.8;
	color: var(--text-dark);
	font-family: var(--font-handwriting);
	font-weight: 500;
}

.final-text p {
	margin-bottom: 20px;
}

.final-signature {
	font-family: var(--font-handwriting);
	font-size: 2rem;
	color: var(--accent-red);
	margin-top: 40px !important;
	font-weight: 600;
}

/* ========================================
   PHOTO MODAL
   ======================================== */

.photo-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0, 0, 0, 0.9);
	z-index: 2000;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	opacity: 0;
	animation: fadeIn 0.3s ease forwards;
}

.modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 2001;
	transition: transform 0.3s ease;
}

.modal-close img {
	width: 50px;
	height: 50px;
	filter: brightness(0) invert(1);
}

.modal-close:hover {
	transform: rotate(90deg) scale(1.1);
}

.modal-content {
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	background: var(--white);
	border-radius: 20px;
	overflow: hidden;
	padding: 30px;
}

.modal-carousel {
	position: relative;
	margin-bottom: 30px;
}

.carousel-container {
	overflow: hidden;
	border-radius: 10px;
	background: var(--bg-beige);
}

.carousel-track {
	display: flex;
	transition: transform 0.4s ease;
}

.carousel-image {
	min-width: 100%;
	aspect-ratio: 4/3;
	object-fit: contain;
	filter: var(--photo-filter);
}

.carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 109, 131, 0.8);
	color: var(--white);
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	font-size: 1.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10;
}

.carousel-nav:hover {
	background: var(--accent-red);
	transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
	left: 10px;
}

.carousel-nav.next {
	right: 10px;
}

.carousel-nav:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.modal-info {
	text-align: center;
	margin-bottom: 20px;
}

.modal-title {
	font-family: var(--font-handwriting);
	font-size: 2.5rem;
	color: var(--accent-red);
	margin-bottom: 10px;
	font-weight: 700;
}

.modal-date {
	font-size: 1rem;
	color: var(--text-light);
	margin-bottom: 20px;
}

.modal-annotation {
	font-family: var(--font-handwriting);
	font-size: 1.5rem;
	color: var(--text-dark);
	line-height: 1.6;
}

.carousel-dots {
	display: flex;
	justify-content: center;
	gap: 10px;
}

.carousel-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--accent-red-light);
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
}

.carousel-dot.active {
	background: var(--accent-red);
	transform: scale(1.3);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

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

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

@media (max-width: 768px) {
	.password-title,
	.intro-title {
		font-size: 2.5rem;
	}

	.month-title {
		font-size: 2.2rem;
	}

	.events-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 25px;
	}

	.final-title {
		font-size: 2.5rem;
	}

	.final-text {
		font-size: 1.1rem;
	}

	.modal-content {
		padding: 20px;
	}

	.modal-title {
		font-size: 2rem;
	}

	.modal-annotation {
		font-size: 1.2rem;
	}

	.carousel-nav {
		width: 40px;
		height: 40px;
		font-size: 1.2rem;
	}
}

@media (max-width: 480px) {
	.main-content {
		padding: 40px 10px 60px;
	}

	.events-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.month-title {
		font-size: 1.8rem;
		padding: 8px 20px;
	}

	.event-title {
		font-size: 1.2rem;
	}

	.timeline-line {
		width: 6px;
	}

	.password-container,
	.intro-container {
		padding: 50px 30px 30px;
		min-height: 350px;
	}

	.window-close-decoration {
		width: 30px;
		height: 30px;
		top: 10px;
		right: 10px;
	}
}
