/* CSS Document */
/*@font-face {
	font-family: Minecraft;
	src: url("../css/minecraft.ttf");
}*/
@font-face {
  font-family: 'Minecraft';
  src: url("/css/minecraftfont.eot");
  src: url("/css/minecraftfont.woff") format("woff"), url("/css/minecraftfont.ttf") format("truetype");
}

html {
	height: 100%;
	overflow: hidden;
}
body {
	image-rendering: pixelated;
	background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), #866043 url("../img/dirt.png") repeat 0 0;
	background-size: 10%;
	color: #FFF;
	text-align: center;
	font-family: Minecraft;
	text-shadow: 0.12vw 0.12vw 0 #383838;
	min-height: 100%;
	margin: 0;
}
img, main, div {
	image-rendering: pixelated;
}
img {
	width: 100%
}
a {
	color: #fff;
	text-decoration: none;
}
footer {
	position: absolute;
	bottom: 0;
	width: 100%;
	font-size: 1.2vw;
	color: white;
	margin-bottom: 0.4vw;
}
#panorama {
	image-rendering: auto;
	background: #303030 url("../img/panorama_village.png") repeat-x 0 0;
	background-size: cover;
	animation: MinecraftBackground 240s linear infinite;
	backdrop-filter: blur(8px);
}
#logo {
	margin-top: 5%;
	width: 50%;
}

#language {
	margin-top: -10%;
	width: 20%;

}
/* TODO: Make the flashing text scale down as more text is added */
#flashingtext {
	margin: -7.6% 0 0 54%;
	width: 40%;
	transform: rotate(-20deg);
	animation: FlashingText 0.5s ease-in-out infinite;
	color: #FFFF00;
	font-size: 2vw;
}
#picker-menu {
	background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
	box-shadow: inset -5px 0px 20px 2px #000, inset 5px 0px 20px 2px #000;
	width: 100vw;
	padding: 20vh 0;
}
#picker-menu div {
	width: 50%;
	text-align: left;
	margin: auto;
	padding: 1% 2%;
	font-size: 1vw;
}
#picker-menu div:not(.active-world):hover, .active-world {
	border: solid #FFF 2px;
	padding: calc(1% - 2px) calc(2% - 2px);
}
#picker-title {
	font-weight: normal;
	font-size: 2vw;
}
#loading-title {
	margin-top: 45vh;
	font-size: 1.8vw;
	font-weight: normal;
}
.button-wrapper {
	margin: 8vw 30vw 0 30vw;
	width: 40vw;
}
.picker-button-wrapper {
	margin: 0 5vw;
}
.picker-buttons {
	position: absolute;
	bottom: 10%;
	width: 90vw;
}
.button {
	/* padding: 0.2% 50vw; */
	padding: 0.2vw 0 0.8vw 0;
	margin: 0 auto 2% auto;
	background: #7D7D7D url("../img/buttons.png") no-repeat center;
	background-size: 100% 300%;
	color: #E0E0E0;
	font-size: 1.2vw;
	outline: 0.2vw solid #000;
	outline-offset: -0.2vw;
}
.button_small {
	width: 49%;
	display: inline-block;
	margin-top: 5%;
}
.picker-button1 {
	display: inline-block;
	width: 40.5%;
	margin-bottom: 1.5%;
}
.picker-button2 {
	display: inline-block;
	width: 20%;
}
.picker-header {
	font-size: 1.2em;
}
.picker-text {
	color: #808080;
	font-size: 1.2em;
}
.button:hover {
	background: #7079AA url("../img/buttons.png") no-repeat bottom;
	background-size: 100% 300%;
	color: #FFFFA0;
}
.button:disabled, .button[disabled] {
	background: #272727 url("../img/buttons.png") no-repeat top;
	background-size: 100% 300%;
	color: #A9A9A9;
}
.button span {
	vertical-align: middle;
}
.left {
	float: left;
}
.right {
	float: right;
}
.bold {
	font-weight: bold;
}
.middle {
	vertical-align: middle;
}
footer .right {
	margin-right: 10px;
}
@keyframes FlashingText {
	0% {
		transform: scale(1) rotate(-20deg);
	}
	50% {
		transform: scale(1.05) rotate(-20deg);
	}
	100% {
		transform: scale(1) rotate(-20deg);
	}
}
@keyframes MinecraftBackground {
	100% {
		background-position-x: 1000%;
	}
}


/* ==========================================================================
   CHANGELOG PAGE
   Everything below only applies when <body class="changelog-page"> is used,
   so the original world-picker / index pages are not affected.
   ========================================================================== */

/* --- Page layout: title (fixed) / list (fills + scrolls) / buttons (fixed) --- */
.changelog-page {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.changelog-page #picker-title {
	flex: none;
	margin: 2vh 0;
	text-shadow: 0.2vw 0.2vw 0 #1c1c1c;
}
.changelog-page #picker-menu {
	flex: 1 1 auto;
	min-height: 0;            /* required so a flex child is allowed to shrink and scroll */
	overflow-y: auto;
	overflow-x: hidden;
	box-sizing: border-box;
	padding: 1.5vw 0;         /* replaces the 20vh padding of the original picker */
	border-top: 0.2vw solid #000;
	border-bottom: 0.2vw solid #000;
	box-shadow: inset -5px 0 20px 2px #000, inset 5px 0 20px 2px #000,
	            inset 0 10px 10px -6px #000, inset 0 -10px 10px -6px #000;
}
.changelog-page .picker-buttons {
	position: static;         /* no longer pinned, so it can't overlap the list */
	flex: none;
	width: auto;
	margin: 2vh 5vw 0 5vw;
	padding-bottom: 3vw;      /* keeps the buttons clear of the footer */
}

/* --- Minecraft-style scrollbar --- */
.changelog-page #picker-menu::-webkit-scrollbar {
	width: 1.2vw;
	min-width: 10px;
}
.changelog-page #picker-menu::-webkit-scrollbar-track {
	background: #000;
}
.changelog-page #picker-menu::-webkit-scrollbar-thumb {
	background: #8B8B8B;
	border: 2px solid;
	border-color: #C6C6C6 #373737 #373737 #C6C6C6;
}
@supports not selector(::-webkit-scrollbar) {
	.changelog-page #picker-menu {
		scrollbar-color: #8B8B8B #000;   /* Firefox */
	}
}

/* --- Entry block --- */
.entry {
	box-sizing: border-box;
	width: 75%;
	margin: 0 auto 0.8vw auto;
	padding: 0.8vw 1.5vw;
	border: 2px solid transparent;   /* always present, so selecting doesn't shift the layout */
	text-align: center;
	cursor: pointer;
	font-size: 1vw;
}
.entry:hover,
.entry.selected {
	border-color: #FFF;
}
.entry:focus-visible {
	outline: 2px dashed #FFFF55;
	outline-offset: 2px;
}
.entry-title {
	margin: 0;
	font-size: 1.2em;
	font-weight: normal;
	color: #FFF;
}
.entry-version {
	margin: 0.2vw 0 0.6vw 0;
	color: #808080;
	font-size: 1em;
}
.entry-body {
	color: #AAAAAA;
	font-size: 1em;
}
.entry-body p {
	margin: 0 0 0.5vw 0;
}
.entry-body p:last-child,
.entry-body ul:last-child {
	margin-bottom: 0;
}

/* --- Bullet list with a pixel "item" icon per entry --- */
.entry-body ul {
	list-style: none;
	width: fit-content;       /* shrink-wrap and centre the list as a block... */
	max-width: 100%;
	margin: 0 auto 0.5vw auto;
	padding: 0;
	text-align: left;         /* ...but keep the bullets aligned with each other */
}
.entry-body li,
.legend li {
	position: relative;
	padding-left: 1.6vw;
	margin-bottom: 0.3vw;
	--bullet: #FFFFFF;
}
/* 30px gap between list items in changelog entries */
.entry-body li {
	margin-bottom: 18px;
}
.entry-body li:last-child {
	margin-bottom: 0;   /* no extra gap after the final item */
}
.entry-body li::before,
.legend li::before {
	content: "";
	position: absolute;
	left: 0.3vw;
	top: 0.25vw;
	width: 0.6vw;
	height: 0.6vw;
	background: var(--bullet);
	/* light top-left edge + dark bottom-right edge = chunky 3D pixel look */
	box-shadow: inset 0.15vw 0.15vw 0 rgba(255,255,255,0.55),
	            inset -0.15vw -0.15vw 0 rgba(0,0,0,0.35),
	            0.15vw 0.15vw 0 #383838;
}
/* Optional bullet colours: <li class="add"> etc. */
.entry-body li.add,    .legend li.add    { --bullet: #55FF55; }
.entry-body li.fix,    .legend li.fix    { --bullet: #FFAA00; }
.entry-body li.change, .legend li.change { --bullet: #55FFFF; }
.entry-body li.remove, .legend li.remove { --bullet: #FF5555; }

/* --- Legend row under the list (centred) --- */
.legend {
	flex: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5vw 2.5vw;
	list-style: none;
	margin: 0;
	padding: 1vw 0 0 0;
	text-align: left;
	font-size: 1vw;
	color: #AAAAAA;
}
.legend li {
	margin: 0;
}

/* --- Text highlights (Minecraft colour codes) ---
   Usage: <span class="hl">gold</span>, <span class="hl hl-green">green</span>
   Each colour also sets the matching dark Minecraft text shadow.            */
.hl {
	--c: #FFAA00;
	--s: #2A2A00;
	color: var(--c);
	text-shadow: 0.2vw 0.2vw 0 var(--s);
}
.hl-yellow { --c: #FFFF55; --s: #3F3F15; }
.hl-green  { --c: #55FF55; --s: #153F15; }
.hl-aqua   { --c: #55FFFF; --s: #153F3F; }
.hl-red    { --c: #FF5555; --s: #3F1515; }
.hl-pink   { --c: #FF55FF; --s: #3F153F; }
.hl-blue   { --c: #5555FF; --s: #15153F; }
.hl-white  { --c: #FFFFFF; --s: #3F3F3F; }

/* --- Narrow screens: the vw-based sizes get tiny, so give the list more room --- */
@media (max-width: 800px) {
	.entry { width: 90%; font-size: 3vw; }
	.entry-body li, .legend li { padding-left: 5vw; }
	.entry-body li::before, .legend li::before { left: 1vw; top: 0.8vw; width: 1.8vw; height: 1.8vw; }
	.legend { font-size: 3vw; gap: 1vw 4vw; }
	.changelog-page #picker-title { font-size: 5vw; }
	.changelog-page .picker-buttons .button { font-size: 3vw; }
	footer { font-size: 2.4vw; }
}
