:root {
	--theme-blue: #4990e2;
	--global-padding: 8px;
	--gap: 8px;
	--bg-color: rgb(250, 250, 250);
}

/* Typography */
body {
	font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

li {
	margin-left: 1em;
}

/* Layout and Structure */
html,
body {
	height: 100svh;
	width: 100svw;
	overflow: hidden;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	-webkit-tap-highlight-color: transparent;
	align-content: center;
	user-select: none;
	/*background-image: url("../images/bg.gif");*/
	background-size: cover;
	background-color: var(--bg-color);
}
body.dark {
	background-color: rgb(43, 43, 43) !important;
}

.fade-out {
	opacity: 0 !important;
}

.fade-in {
	opacity: 1 !important;
}

.invisible {
	visibility: hidden !important;
}

.visible {
	visibility: visible !important;
}

#tooltip {
	width: 100%;
	padding: 12px;
	/*background: linear-gradient(to bottom, #65a7fc 0%, #4d91ff 50%, #4385ee 100%);*/
	background-color: #4d91ff;
	border: var(--gap) solid white;
	border-bottom: 0;
	transition:
		opacity 0.3s linear;
	opacity: 0;
	color: white;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
	flex-shrink: 0;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	z-index: 1;
}
#score-counter {
	font-size: 1.1rem;
	width: 100%;
	padding-right: 10px;
	text-align: right;
	font-family: "Tiny5", monospace;
	transition: transform 0.3s linear;
}
#score-counter.enlarge {
	transform: scale(1.4);
}

#life-counter {
	font-size: 70px;
}

#tooltip-right {
	margin-left: auto;
	display: flex;
	flex-shrink: 1;
	flex-direction: column;
	align-items: center;
}

#lives-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.life-slot {
	position: relative;
	height: 24px;
	width: 24px;
	/* match your image's aspect ratio */
}

.life-slot .life {
	position: absolute;
	top: 0;
	left: 0;
	height: 24px;
	transition: 0.5s linear;
}

#tooltip-right img {
	
	height: 56px;
	margin-bottom: -5px;
	cursor: pointer;
}

#grid-container {
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	/*width: min(100%, 1000px);*/
	width: 100%;
	height: 100%;
}

#grid {
	border: var(--gap) solid transparent;
	aspect-ratio: 1 / 1;
	gap: var(--gap);
	display: grid;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	transition: background-color 0.3s linear;
	z-index: 2;
}

#grid.active {
	background-color: rgba(255, 255, 255, 1);
	box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
#tooltip.active {
	opacity: 1 !important;
}
#continue-prompt {
	z-index: 5;
	position: absolute;
	top: 57%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-3deg);
	text-align: center;
	opacity: 0;
	will-change: transform, opacity;
	pointer-events: none;
	font-family: "Tiny5";
	font-size: min(18vw, 7rem);
	color: white;
	line-height: 120%;
	text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
	transition: 
		transform 1s,
		opacity 0.5s linear;
}
#continue-prompt.fade-in {
	opacity: 0.8 !important;
}
#continue-prompt.breathing {
	animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
	0%,
	100% {
		opacity: 0.8;
		transform: translate(-50%, -50%) scale(1) rotate(-3deg);
	}
	50% {
		opacity: 0.9;
		transform: translate(-50%, -50%) scale(1.05) rotate(-3deg);
	}
}
#splash-container {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	transform: translate(-50%, -50%) scale(0.1);
	text-align: center;
	opacity: 1;
	visibility: hidden;
	will-change: transform, opacity;
	transition:
		transform 1.6s cubic-bezier(0.25, 1, 0.5, 1),
		opacity 1.7s linear;
	pointer-events: none;
}

#splash-text {
	display: inline-block;
	text-align: center;
	font-family: "Coral Pixels";
}

#splash-container.expand {
	visibility: visible;
	opacity: 0;
	transform: translate(-50%, -50%) scale(5);
	will-change: transform, opacity;
}

@media (max-width: 600px) {
	#splash-container {
		width: 6em;
	}

	#splash-container.expand {
		transform: translate(-50%, -50%) scale(3.6);
	}
}

.notransition {
	-webkit-transition: none !important;
	-moz-transition: none !important;
	-o-transition: none !important;
	transition: none !important;
}

/* Buttons */
.button {
	display: inline-block;
	color: inherit !important;
	text-align: center;
	text-decoration: none;
	box-sizing: content-box;
	font-size: min(15px, max(4.4vw, 12px));
	padding: 10px 18px 10px 18px;
	margin: 12px 5px 12px 5px;
	width: 10ch;
	background-color: transparent;
	outline: none;
	border-radius: 8px;
	border: 1.5px solid;
	border-color: black;
}

.button:hover,
.button:active,
.button.active {
	background-color: var(--theme-blue);
	color: white !important;
	text-decoration: none;
	border-color: transparent;
}

.button:hover,
.button:active {
	cursor: pointer;
}

.button.auto {
	width: auto;
}

input {
	color: inherit !important;
	text-align: center;
	box-sizing: content-box;
	font-size: min(15px, max(4.4vw, 12px));
	padding: 10px 18px 10px 18px;
	margin: 12px 5px 12px 5px;
	background-color: transparent;
	outline: none;
	border-radius: 8px;
	border: 1.5px solid;
	border-color: black;
}

.button.active,
input:focus {
	opacity: 0.7;
}

a img {
	display: block;
	text-decoration: none;
}

span.half-line-break {
	width: 100%;
	display: block;
	height: 0.5em;
}