.game-minigame {
	overscroll-behavior-y: contain;
}
/* ----------------------------------------------
 * Generated by Animista on 2024-7-30 23:31:44
 * Licensed under FreeBSD License.
 * See http://animista.net/license for more info. 
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */
@keyframes jello {	0%  {		transform: scale3d(1, 1, 1);	}	15% {		transform: scale3d(1.25, 0.75, 1);	}	20% {		transform: scale3d(0.75, 1.25, 1);	}	25% {		transform: scale3d(1.15, 0.85, 1);	}	32% {		transform: scale3d(0.95, 1.05, 1);	}	37% {		transform: scale3d(1.05, 0.95, 1);	}	50% {		transform: scale3d(1, 1, 1);	}	100% {		transform: scale3d(1, 1, 1);	}}
@-webkit-keyframes scale-down-center{0%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(.7);transform:scale(.7)}}@keyframes scale-down-center{0%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(.7);transform:scale(.7)}}
@-webkit-keyframes shake-bottom{0%,100%{-webkit-transform:rotate(0deg);transform:rotate(0deg);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}10%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}20%,40%,60%{-webkit-transform:rotate(-4deg);transform:rotate(-4deg)}30%,50%,70%{-webkit-transform:rotate(4deg);transform:rotate(4deg)}80%{-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}90%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}}@keyframes shake-bottom{0%,100%{-webkit-transform:rotate(0deg);transform:rotate(0deg);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}10%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}20%,40%,60%{-webkit-transform:rotate(-4deg);transform:rotate(-4deg)}30%,50%,70%{-webkit-transform:rotate(4deg);transform:rotate(4deg)}80%{-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}90%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}}
@-webkit-keyframes slide-out-elliptic-bottom-bck{0%{-webkit-transform:translateY(0) rotateX(0) scale(1);transform:translateY(0) rotateX(0) scale(1);-webkit-transform-origin:50% -1400px;transform-origin:50% -1400px;opacity:1}100%{-webkit-transform:translateY(600px) rotateX(30deg) scale(0);transform:translateY(600px) rotateX(30deg) scale(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:1}}@keyframes slide-out-elliptic-bottom-bck{0%{-webkit-transform:translateY(0) rotateX(0) scale(1);transform:translateY(0) rotateX(0) scale(1);-webkit-transform-origin:50% -1400px;transform-origin:50% -1400px;opacity:1}100%{-webkit-transform:translateY(600px) rotateX(30deg) scale(0);transform:translateY(600px) rotateX(30deg) scale(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:1}}
@keyframes game-fallitem-goBottom {	0% {		opacity: 1;		translate: 0 0;	}	90% {		opacity: 0.7;		translate: 0 18px;	}	100% {		opacity: 0;		translate: 0 50px;	}}
@keyframes heartbeat{from{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}10%{-webkit-transform:scale(.91);transform:scale(.91);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}17%{-webkit-transform:scale(.98);transform:scale(.98);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}33%{-webkit-transform:scale(.87);transform:scale(.87);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}45%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}
@keyframes puff-in-center{0%{transform:scale(2);filter:blur(4px);opacity:0}100%{transform:scale(1);filter:blur(0);opacity:1}}
@keyframes fade-in{0%{opacity:0}100%{opacity:1}}
body[data-ready] > * {
	filter: unset;
	transition: filter .4s ease-in 1s;
}
body[data-ready="false"] > *:not(#hello) {
	filter: opacity(0);
}
#hello {
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  max-width: 512px;
  width: 50vw;
  max-height: 512px;
  height: 50vw;
  position: absolute;
  background: url("img/favicon512.png") no-repeat scroll center center / contain transparent;
  animation: heartbeat 2.5s ease-in-out infinite both;
  z-index: 99;
}
body[data-ready="true"] #hello {
	animation: slide-out-elliptic-bottom-bck .7s ease-in .7s both;
}

.game-minigame {
	width: 100vw;
	height: 100dvh;
	overflow-y: auto;
	z-index: 10;
	position: absolute;
	display: none;
	color: black;
	background-color: #000d;
	font-size: 20px;
}
.game-minigame .close {
	position: fixed;
	z-index: 99;
}
.game-minigame-send {
	display: none;
	position: fixed;
	bottom: 0;
	right: 25px;
	cursor: pointer;
	z-index: 98;
	font-size: 24px;
	white-space: nowrap;
	overflow: hidden;
	background-color: var(--colorButtonInner);
	box-shadow: inset 0px -4px 0px 4px var(--colorButtonShadow), 0 3px 0 3px var(--colorShadow);
	border-radius: 10px;
	margin-bottom: 14px;
	padding: 4px 30px 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: white;
}
.game-minigame-send-disabled, button[disabled] {
	filter: grayscale(1);
	cursor: no-drop;
	transform: scale(0.8);
	opacity: 0.6;
}
.game-minigame-send:not(.game-minigame-send-disabled) {
	animation: jello 2s infinite;
}



#game-joinpair {
	width: 90vw;
	min-height: 90dvh;
	overflow-x: hidden;
	overflow-y: auto;
	margin: 5dvh 5vw;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	align-content: center;
}
.game-joinpair-box, .game-fillgaps-options {
	cursor: pointer;
	width: 116px;
	height: 96px;
	margin: 4px 6px;
	background: url("img/tile-l.png") no-repeat scroll 0 0 / auto 100%, url("img/tile-p.png") no-repeat scroll right 0 / auto 100%, url("img/tile-s.png") no-repeat scroll 40px 0 / calc(100% - 70px) 100% transparent;
	padding: 7px 27px 11px;
	font-size: 14px;
	color: var(--colorTextShadow);
	font-weight: 400;
	overflow: hidden;
	align-items: center;
	line-height: 1em;
	display: inline-grid;
	vertical-align: middle;
}
@media (max-width: 640px) or (max-height: 640px) {
	.game-joinpair-box {
		margin: 0px;
		padding: 2px 16px 7px;
	}
}
.game-joinpair-box-img div {
	width: calc(100% - 16px);
	height: calc(100% - 16px);
	background: no-repeat scroll center center / contain white;
	border: 2px solid black;
	padding: 6px;
	background-origin: content-box;
}
.game-joinpair-select {
	-webkit-animation: scale-down-center 0.25s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
	animation: scale-down-center 0.25s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
.game-joinpair-wrong {
	cursor: default;
	-webkit-animation: shake-bottom 0.8s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
	animation: shake-bottom 0.8s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}
.game-joinpair-ok {
	cursor: default;
	-webkit-animation: slide-out-elliptic-bottom-bck 0.7s ease-in both;
	animation: slide-out-elliptic-bottom-bck 0.7s ease-in both;
}
.game-joinpair-used {
	cursor: default;
	opacity: 0.01;
	color: transparent;
	text-shadow: unset;
}
#game-joinpair-errors {
	position: fixed;
	bottom: 10px;
	left: 10px;
	margin: 0;
	font-size: 14px;
	letter-spacing: 0;
	font-weight: 600;
	padding: 5px 15px 6px;
}




#game-fillgaps {
	position: absolute;
	width: calc(100vw - 50px);
	color: white;
	text-shadow: 0 0 5px black;
	margin: 40px 25px 20px;
	line-height: 1.5em;
}
.game-fillgaps-gaps-check::after {
	content: " ✅";
}
.game-fillgaps-gaps {
	display: inline-block;
	min-width: 60px;
	text-align: center;
	vertical-align: baseline;
	cursor: pointer;
	margin: 4px 4px -2px;
	font-size: 0.8em;
	min-height: 20px;
	font-weight: 400;
	color: var(--colorTextShadow);
	background: url("img/bt-l.png") no-repeat scroll left center / contain, url("img/bt-p.png") no-repeat scroll right center / contain, url("img/bt-s.png") repeat-x scroll center center / contain transparent;
	border-radius: 25px;
	box-shadow: 0 4px 0 4px var(--colorShadow);
	padding: 0px 22px 2px;
	text-shadow: none;
}
#game-fillgaps-input {
	width: 100vw;
	height: 100dvh;
	background: #000b;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99;
	display: none;
}
/*
	tak, jak w krzyżówce
	#game-fillgaps-input text {
	}
	#game-fillgaps-input input {
	}
*/
#game-fillgaps-select {
	width: 100vw;
	height: 100dvh;
	background: #000c;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99;
	display: none;
}
#game-fillgaps-select-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}
#game-fillgaps-select text {
	width: 70vw;
	margin: 20px auto;
	text-align: center;
	font-weight: bold;
	display: block;
	color: white;
	text-shadow: 0 0 10px black;
	letter-spacing: 0.5px;
}
/*
jest już wyżej
.game-fillgaps-options {
	display: inline-grid;
	vertical-align: middle;
}
*/
#game-crossword {
	position: absolute;
	z-index: 52;
	margin: 20px;
}
.game-crossword-centerTop {
	top: 50%;
	transform: translateY(-50%);
}
.game-crossword-centerLeft {
	left: 50%;
	transform: translateX(-50%);
}
.game-crossword-centerTop.game-crossword-centerLeft {
	transform: translate(-50%, -50%);
}
.game-crossword-words {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
}
.game-crossword-words div {
	position: absolute;
	z-index: 51;
	width: 28px;
	height: 28px;
	display: inline-block;
	margin: 3px;
	padding: 2px;
	line-height: 28px;
	box-shadow: 0 0 3px 0 white;
}
.game-crossword-words-correct div {
	box-shadow: 0 0 0px 1px green;
}
.game-crossword-words-wrong div {
	box-shadow: 0 0 0px 1px red;
}
.game-crossword-words div:not(.game-crossword-repeat) {
	border: 1px solid #333;
	border-radius: 3px;
	background-color: #ffffffe5;
	text-shadow: 0 0 2px white;
}
.game-crossword-repeat {
	color: transparent;
}
#game-crossword-input {
	width: 100vw;
	height: 100dvh;
	background: #000b;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 53;
	display: none;
}
#game-crossword-input text, #game-fillgaps-input text {
	width: 60vw;
	margin: calc(50dvh - 90px) auto 20px;
	text-align: center;
	font-weight: bold;
	display: block;
	color: white;
	text-shadow: 0 0 10px black;
	letter-spacing: 1px;
}
#game-crossword-input input, #game-fillgaps-input input {
	width: 70vw;
	height: 40px;
	margin: 0 auto 30px;
	box-shadow: 0 0 5px 1px black;
	line-height: 40px;
	border: 1px solid #444;
	text-align: center;
	letter-spacing: 3px;
	text-transform: uppercase;
	font-size: 1em;
}
#game-crossword-input span {
	color: #ff7e7e;
	display: block;
	font-weight: bold;
	font-size: 0.7em;
	text-shadow: 1px 1px 3px #aaa;
}
#game-crossword-input span.game-crossword-letterOK {
	color: #76ff85;
}




#game-fallitem {
	position: relative;
	width: 100vw;
	height: 100dvh;
	background: url("img/bg3.jpg") scroll center bottom / cover #fff;
	overflow: hidden;
}
#game-fallitem-question {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 24px;
	font-weight: bold;
	text-align: center;
	transition: top 0.3s cubic-bezier(.19,1,.22,1), font 0.3s cubic-bezier(.19,1,.22,1);
}
#game-fallitem-question.game-fallitem-big {
	top: 40dvh;
	font-size: 44px;
	transform: translateY(-50%) translateX(-50%);
}
#game-fallitem-etap {
	position: absolute;
	top: 10px;
	left: 20px;
	font-size: 20px;
}
#game-fallitem-score {
	position: absolute;
	top: 10px;
	right: 50px;
	font-size: 20px;
	font-weight: bold;
}
#game-fallitem-progressBar {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 14px;
	width: 100%;
	background-color: green;
	transition: background-color 0.4s linear;
}
#game-fallitem-basket {
	position: absolute;
	bottom: 40px;
	left: 50%;
	width: 140px;
	height: 40px;
	background-color: #F8CF16;
	border-radius: 5px;
	transition: left 0.4s ease, background-color 0.4s ease; /* Animacja przesuwania koszyka */
	box-shadow: 0 5px 8px #000a;
}
#game-fallitem-basket[data-color="green"] {
	background-color: #ABCB41;
}
#game-fallitem-basket[data-color="red"] {
	background-color: #CB3F42;
}
.game-fallitem-falling-item {
	position: absolute;
	font-size: 18px;
	padding: 5px 10px;
	border-radius: 3px;
	color: #fff;
	box-shadow: 0 1px 4px #000a;
}
.game-fallitem-falling-item.game-fallitem-missed {
	background-color: #CB3F42 !important;
	animation: game-fallitem-goBottom 1.5s linear forwards;
}
.game-endlevel p {
  color: white;
  font-weight: 400;
  text-shadow: 0 0 1px black;
}
.game-endlevel {
	animation: fade-in 1.2s cubic-bezier(.39,.575,.565,1.000) both;
}
.game-stars {
	width: 40px;
	padding: 10px 5px;
	display: inline-block;
	vertical-align: bottom;
	--delay: 2s;
}
.game-stars:nth-of-type(2) {
	width: 50px;
	padding: 3px 0px 7px;
	--delay: 2.3s;
}
.game-stars:nth-of-type(3) {
	--delay: 2.6s;
}
.game-stars:not([alt="puste"]) {
	animation: puff-in-center 0.7s cubic-bezier(0.470, 0.000, 0.745, 0.715) var(--delay) both, heartbeat 2.5s ease-in-out infinite both;
}
.game-stars[alt="puste"] {
	animation: puff-in-center 0.7s cubic-bezier(0.470, 0.000, 0.745, 0.715) var(--delay) both;
}
.game-endlevel button {
	--delay: 3.5s;
	animation: fade-in 1.2s cubic-bezier(.39,.575,.565,1.000) var(--delay) both;
}
.game-endlevel button:nth-of-type(2) {
	--delay: 4.3s;
}

@property --num {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}
.game-counter {
  transition: --num 2.5s;
  counter-set: num var(--num);
	font-weight: 400;
	font-size: 18px;
	text-shadow: 0 0 4px black;
	color: white;
	background-color: #86d2d2;/*2d6969*/
	border-radius: 12px;
	padding: 0px 15px 10px;
	margin: 4px;
	display: inline-block;
	box-shadow: inset 0 -2px 0 2px #2f9696, 0 3px 0 2px var(--colorShadow);/*3a4d4d*/
}
.game-counter.game-counter-start {
  --num: 0 !important;
}
.game-counter::after {
  content: counter(num) attr(data-char);
  font: 900 30px system-ui;
  vertical-align: -3px;
  margin-left: 3px;
}


.game-babel {
  color: white
}
#game-babel-ranking {
  text-align: left;
  margin-top: 45px;
}
#game-babel-ranking .avatar {
	border-bottom: unset;
	filter: unset;
}
#game-babel-ranking .in_rank {
  display: block;
  width: 60dvw;
  max-width: 300px;
  min-width: 200px;
  margin: 10px auto;
}
#game-babel-ranking .gold {
	font-size: 16px;
  margin: 25px 0 0 2px;
  padding: 0px 8px 0px 33px;
  float: right;
  transform-origin: center bottom;
  background-size: 24px auto;
}
#game-babel-ranking .rank_pos {
  display: inline-block;
  font-size: 24px;
  margin: -4px 10px 4px 0;
}
#game-babel-play-1, #game-babel-play-2 {
  margin: 20px auto;
  display: block;
  max-width: 200px;
  cursor: pointer;
}




#game-sorter {
	position: absolute;
	width: calc(100vw - 50px);
	color: white;
	text-shadow: 0 0 5px black;
	margin: 40px 25px 20px;
	line-height: 1.5em;
}
#game-sorter h3 {
	text-shadow: none;
}
#game-sorter-container {
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100dvh - 180px);
  overflow: auto;
}
#game-sorter-send {
  display: block;
}
.game-sorter-item {
  background: #fff2;
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
  user-select: none;
  transition: all 0.3s ease; /* ?? płynne przesuwanie */
}
.game-sorter-item text {
	text-align: left;
}
.game-sorter-item.dragging {
  opacity: 0.6;
	scale: 0.9;
  box-shadow: 0 0 10px #666; /* ?? podświetlenie aktywnego */
}
.game-sorter-handler {
  width: 24px;
  height: 24px;
  position: relative;
  cursor: grab;
  float: left;
	flex: 0 0 auto;
}
.game-sorter-handler::before,
.game-sorter-handler::after,
.game-sorter-handler div {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  height: 3px;
  background: #666;
  border-radius: 2px;
}
.game-sorter-handler::before { top: 6px; }
.game-sorter-handler div { top: 10px; }
.game-sorter-handler::after { top: 14px; }




#game-pacman {
	background-color: black;
	color: white;
	padding: 20px 10px 10px;
}
.game-pacman-canvas {
	margin: 8px auto 0;
	display: block;
	background-color: black;
}
.game-pacman-info {
	display: grid;
	grid-template-columns: 1fr repeat(3, 100px);
	grid-template-rows: 30px;
	grid-column-gap: 0px;
	grid-row-gap: 0px; 
	line-height: 30px;
	margin: 0 auto;
}
.game-pacman-pytanie {
	font-weight: bold;
	text-align: center;
	font-size: 26px;
}
.game-pacman-zycia img {
	width: 26px;
	height: 26px;
	margin: 3px 2px 1px;
}
.game-pacman-wynik, .game-pacman-poziom {
	background: no-repeat scroll left center / contain transparent;
	padding-left: 34px;
	font-size: 16px;
  text-align: left;
}
.game-pacman-wynik {
	background-image: url('pacman/point.png');
}
.game-pacman-poziom {
	background-image: url('pacman/quest.png');
}
.game-pacman-controls {
  position: fixed;
  bottom: 50px;
  right: 35px;
  width: 120px;
  height: 120px;
  display: grid;
  grid-template-columns: 40px 40px 40px;
  grid-template-rows: 40px 40px 40px;
  z-index: 10;
}
.game-pacman-btn {
	background-color: #fff;
	border: 2px solid #ccc;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s;
	touch-action: manipulation;
	opacity: .5;
}
.game-pacman-btn:hover {
	background-color: #f0f0f0;
	opacity: 1;
}
.game-pacman-btn svg {
	width: 20px;
	height: 20px;
	fill: #333;
}
.game-pacman-btn[data-kierunek="up"] { grid-column: 2; grid-row: 1; }
.game-pacman-btn[data-kierunek="left"] { grid-column: 1; grid-row: 2; }
.game-pacman-btn[data-kierunek="right"] { grid-column: 3; grid-row: 2; }
.game-pacman-btn[data-kierunek="down"] { grid-column: 2; grid-row: 3; }


/* GŁÓWNY KONTENER GRY — środkowany */
#game2048-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90dvw;
  height: 90dvw;
  max-width: 800px;
  max-height: 800px;
  aspect-ratio: 1;
}
/* PLANSZA */
#game2048-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  background-color: #ccc;
  position: relative;
  box-sizing: border-box;
}
/* PUSTE KOMÓRKI */
.game2048-cell {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  background-color: #eee;
  border: 1px solid #bbb;
  box-sizing: border-box;
}
/* KAFELKI Z ELEMENTAMI */
.game2048-item {
  position: absolute;
  width: 25%;
  aspect-ratio: 1;
  transition: top 0.1s ease-out, left 0.1s ease-out;
  font-weight: bold;
  font-size: 1.1em;
  padding: 0.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
	--level: 0;
  background-color: hsl(30, 100%, calc(95% - var(--level) * 8%));
  border: 1px solid #bbb;
  box-sizing: border-box;
  text-align: center;
}