:root {
	--bg: #e9e2d1;
	--paper: #fbf8f3;
	--rule: rgba(0,176,215,0.25);
	--margin: #d23b2d;
	--text: #222;
	--shadow: 0 4px 12px rgba(0,0,0,0.15);
	--paper-shadow: 0 10px 24px rgba(0,0,0,0.15);
	--tab-bg: #f4e4a2;
	--tab-border: #cbb874;
	--link: #0033aa;
	--link-hover: #b03000;
}

*, *::before, *::after { box-sizing: border-box; }

/* Body centering */
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Schoolbell", cursive;
	line-height: 1.1;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	text-align: center;
	padding: 20px;
}

/* Notebook paper main */
main {
	width: 800px; /* bigger main for desktop */
	max-width: 90%;
	background: repeating-linear-gradient(to bottom, var(--paper) 0px, var(--paper) 28px, var(--rule) 29px);
	position: relative;
	padding: 80px 60px 100px 80px;
	border-radius: 8px;
	box-shadow: var(--paper-shadow);
	filter: brightness(0.98) contrast(1.04);
	overflow: hidden;
}

/* Red margin line */
main::before {
	content: "";
	position: absolute;
	top: 0;
	left: 40px;
	width: 3px;
	height: 100%;
	background: var(--margin);
}

/* Heading */
h1 {
	margin-top: 0;
	font-size: 70px;
	color: #333;
}

/* Paragraphs */
p { font-size: 40px; }

/* Buttons */
.button {
  	font-family: "Schoolbell", cursive;
	width: 200px;         /* fixed width */
	height: 80px;         /* optional fixed height */
	font-size: 50px;
	cursor: pointer;
	border: none;
	border-radius: 8px;
	background-color: #ff66b2;
	color: white;
}


.button:hover {
	background-color: #ff3385;
}

/* Popup overlay */
#popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Popup box */
#popup .popup-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    max-width: 90vw;    /* container max width */
    max-height: 90vh;   /* container max height */
    overflow: auto;     /* scroll if image is too big */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Images inside popup */
#popup #popup-text img {
    max-width: 100%;   /* image fits container width */
    max-height: 80vh;  /* image fits viewport height */
    height: auto;
    width: auto;
    border-radius: 12px;
}

#popup .close-btn {
	margin-top: 20px;
	padding: 8px 16px;
	cursor: pointer;
	border: none;
	border-radius: 6px;
	background-color: #ff66b2;
	color: white;
	font-size: 1rem;
}

#popup .close-btn:hover {
	background-color: #ff3385;
}

/* Footer with inline links */
footer {
	margin-top: 20px;
	text-align: center;
	font-size: 0.9rem;
	color: #555;
	border-top: 1px solid rgba(0,0,0,0.1);
	padding-top: 10px;
}

footer .footer-links a {
	display: inline-block;
	margin: 0 10px;
	color: var(--link);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
}

footer .footer-links a:hover {
	color: var(--link-hover);
}

/* Article styling */
article {
	font-size: 1.1rem;
	word-break: break-word;
}

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;  /* hearts don’t block clicks */
    overflow: hidden;
    z-index: 0;  /* behind main content */
}

.heart {
    position: absolute;
    width: 30px;
    height: 30px;
    background: url('heart.png') no-repeat center center;
    background-size: contain;
    opacity: 0.8;
    animation: fall 5s linear infinite;
}

/* Falling animation */
@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}


/* Responsive adjustments */
@media (max-width: 768px) {
	main {
		width: 100%;
		padding: 40px 20px 60px 40px;
	}
	main::before {
		left: 20px;
	}

	/* Make buttons larger on mobile */
	.button {
		padding: 16px 28px;
		font-size: 50px;
	}
}
