:root {
	--clr-bg: #000000;
	--clr-bgContent: #FAFAFA;
}

* {
	margin: 0px;
	padding: 0px;
	font-family: "Montserrat", sans-serif;
	font-optical-sizing: auto;
	font-style: normal;
}


body {
	position: absolute;
	display: flex;
	align-items: center;

	width: 100%;
	height: 100%;
	margin: 0%;

	background-color: var(--clr-bg);
	justify-content: center;
	font-family: 'DM Sans', sans-serif;
	color: white;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

a {
	text-decoration: none;
	color: var(--clr-bgContent);
}

.cursor {
	position: fixed;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #ffffff;
	transition: 0.1s;
	transform: translate(-50%, -50%);
	pointer-events: none;
	mix-blend-mode: difference;
	z-index: 10;

	border: rgba(0, 0, 0, 10%) 2.5px ridge;
}


#settings {
	position: fixed;
	top: 0%;
	right: 0%;
	margin: 1.5% 1.8% 0% 0%;
	z-index: 100;
	/* Ajout du z-index */
}

#settings button {
	height: 3.5rem;
	width: 3.5rem;
	border-radius: 50%;
}

#settings_button {
	display: flex;
	justify-content: center;
	align-items: center;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 50%);
}

#settings_button img {
	width: 70%;
	height: 70%;
	transition: transform 0.5s ease;
}

#settings_button:hover img {
	transform: rotate(90deg);
}

#settings_button:active img {
	transform: scale(0.8);
	transition: 0.2s;
}

#quit {
	cursor: default;
	font-size: 1rem;
	font-weight: 800;
	position: absolute;
	width: 90px;
	height: 90px;
	bottom: 8%;
	right: 22%;
}

#menu_button {
	position: absolute;
	width: 75px;
	height: 75px;
	bottom: 22%;
	right: 25%;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 50%);
	overflow: hidden;
}

#menu_button img {
	width: 70%;
	height: 70%;
	transition: transform 0.3s ease;
}

#menu_button:hover img {
	transform: rotate(90deg);
}

#menu_button:active img {
	transform: rotate(90deg) translateX(150px);
	transition: transform 0.2s ease;
}

.background_image {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	z-index: -1;
	overflow: hidden;
	background: url('../public/spaceBackground.webp') center center no-repeat;
	background-size: cover;
	/* background-color: rgb(0, 0, 0); */
}

.container_content {
	align-items: center;
	align-content: center;
}

.container_content h1 {
	font-size: 100px;
	user-select: none;
	margin: 10% 0% 10% 0%;
}

.container_content button {
	display: flex;
	width: 25rem;
	height: 8rem;
	align-items: center;

	font-size: 3rem;
	font-weight: 800;

	margin: -4% 0% 6% 25%;
	border-radius: 10px;
	background: #090909;
	border: none;
	cursor: pointer;
	transition: 0.4s;
	color: white;
	cursor: none;
	user-select: none;
}

.container_content button:hover {
	box-shadow: 14px 10px 112px -28px #f5f5f5;
	cursor: none;
}

.container_content button:active {
	transform: scale(0.97);
	box-shadow: 14px 10px 112px -20px #ffffff;
	cursor: none;
}


#settings_page {
	position: fixed;
	display: flex;
	justify-content: center;

	width: 30vw;
	height: 80vh;
	background-color: rgba(128, 128, 128, 0.5);
	backdrop-filter: blur(8px);
	border-radius: 20px;
	user-select: none;
	z-index: -100;
}

#settings_page h2 {
	position: absolute;
	top: 1%;
	font-size: 3rem;
}

#settings_page form {
	margin: 22% 10% 20% 20%;
}

#settings_page label {
	font-size: 1.6rem;
	font-weight: 500;
	margin: 0% 0% 0% 0%;
}

#settings_page input[type="text"] {
	width: 2rem;
	height: 2.5rem;
	background-color: rgba(255, 255, 255, 0.1);
	border-bottom: 2px solid rgb(0, 0, 0) !important;
	border: none;
	font-size: 24px;
	font-weight: 600;
	text-align: center;
	margin: 0% 0% 5% 2%;
}

#settings_page span {
	font-size: 1rem;
	margin-bottom: 3rem;
}

#save {
	position: absolute;
	width: 100%;
	height: 10%;
	top: 90%;
	right: 0%;
	border-radius: 0px 0px 20px 20px;
	border: none;
	background-color: rgba(255, 255, 255, 0.8);
	font-weight: bold;
}


.close {
	position: absolute;
	top: -1.5%;
	right: -2.5%;
	width: 35px;
	height: 35px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.75);
	background-image: url("../public/close.webp");
	background-position: center;
	background-size: 60%;
	background-repeat: no-repeat;
	border: none;
}

.toggle-switch {
	position: relative;
	width: 100px;
	height: 50px;
	right: 6%;
	bottom: 1%;
	transform: scale(0.6);
}


.switch-label {
	position: absolute;
	width: 100%;
	height: 50px;
	background-color: #000;
	border-radius: 25px;
	border: 4px solid #000;

}

.checkbox {
	position: absolute;
	display: none;
}

.slider {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 25px;
	transition: 0.3s;
	background-position: center;
	background-size: cover;
}

.checkbox:checked~.slider {
	background-color: #fff;
}

.slider::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 10px;
	width: 40px;
	height: 40px;
	background-color: #fff;
	background-image: var(--image-url-before);
	background-position: center;
	background-size: cover;
	border-radius: 50%;
	transition: 0.3s;
}

.son-checkbox:checked~.slider::before {
	transform: translateX(40px);
	background-image: var(--image-url-after);
	filter: invert(100%);
	box-shadow: none;
}

.music-checkbox:checked~.slider::before {
	transform: translateX(40px);
	background-image: var(--image-url-after);
	filter: invert(100%);
	box-shadow: none;
}

.mobile-checkbox:checked~.slider::before {
	transform: translateX(40px);
	background-image: var(--image-url-after);
	filter: invert(100%);
	box-shadow: none;
}

.vibration-checkbox:checked~.slider::before {
	transform: translateX(40px);
	background-image: var(--image-url-after);
	filter: invert(100%);
	box-shadow: none;
}

.reverse-checkbox:checked~.slider::before {
	transform: translateX(40px);
	background-image: var(--image-url-after);
	filter: invert(100%);
	box-shadow: none;
}


#vibration_section {
	opacity: 1;
	transition: opacity 0.4s ease;
}

#vibration_section.hidden {
	opacity: 0;
}

#reverse_section {
	opacity: 1;
	transition: opacity 0.4s ease;
}

#reverse_section.hidden {
	opacity: 0;
}

.sound {
	position: relative;
	display: flex;
	width: 100%;
	height: 5%;
	margin-bottom: 2rem;
}

.sound .toggle-switch {
	position: relative;
	right: 0.2rem;
	bottom: 1rem;
}


canvas {
	width: 100vw;
	height: 100vh;
	display: block;
}

#error_key {
	position: absolute;
	color: rgb(255, 0, 0);
	font-weight: 600;
	width: 55%;
	top: 82.2%;
	left: 11%;
	cursor: default;
}


.container_content {
	align-items: center;
	align-content: center;
}

.container_content h1 {
	font-size: 6rem;
	user-select: none;
	margin: 10% 0% 10% 0%;
}

.container_content button {
	display: flex;
	width: 25rem;
	height: 8rem;
	align-items: center;

	font-size: 3rem;
	font-weight: 800;

	margin: -4% 0% 6% 25%;
	border-radius: 10px;
	background: #090909;
	border: none;
	cursor: pointer;
	transition: 0.4s;
	color: white;
	cursor: none;
	user-select: none;
}

.container_content button:hover {
	box-shadow: 14px 10px 112px -28px #f5f5f5;
	cursor: none;
}

.container_content button:active {
	transform: scale(0.97);
	box-shadow: 14px 10px 112px -20px #ffffff;
	cursor: none;
}


#lunch_game {
	padding: 0% 0% 0% 14%;
}

#about {
	padding: 0% 0% 0% 10.5%;
}

#credits {
	padding: 0% 0% 0% 13.2%;
}

.menu {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	cursor: none;
}

.jeu {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.menu-content,
.jeu-content {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.instruction {
	position: absolute;
	justify-content: center;

	width: 30vw;
	height: 25vh;
	transform: translateY(-100%);
	background-color: rgba(128, 128, 128, 0.5);
	backdrop-filter: blur(8px);
	border-radius: 20px;
	user-select: none;
	z-index: -1;
}

.card-key {
	content: "";
	width: 2rem;
	height: 2rem;
	background-color: rgba(255, 255, 255, 0.5);
	backdrop-filter: blur(8px);
	border-radius: 0.2rem;
	user-select: none;
	z-index: 0;
	font-size: 1.2rem;
	margin-right: 0.7rem;
}

.intrcution-text {
	position: relative;
	display: flex;
	margin: 0.8rem 0.8rem 0 0.8rem;
	font-weight: 600;
}

.instruction-container {
	position: relative;
	margin: 1rem 0 0 1rem;
}

.instruction-key {
	display: flex;
	width: 100%;
	height: 20%;
	margin-top: 0.5rem;
}

#qg {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;

	width: 30vw;
	height: 80vh;
	background-color: rgba(0, 0, 0, 0.5);
	border: #f5f5f5 2px solid;
	backdrop-filter: blur(8px);
	border-radius: 20px;
	user-select: none;
	z-index: -1;
}

.qg-title {
	margin-top: 0.5rem;
	font-weight: 600;
	font-size: 3rem;
}

.qg-description {
	margin-top: 0.2rem;
	font-size: 0.8rem;
}

.btn-container {
	display: flex;
	flex-direction: column;
	margin-top: 2rem;
}

.btn {
	width: 12rem;
	height: 2.5rem;
	margin-top: 0.8rem;
	border-radius: 2rem;
	border: none;
	color: black;
	background-color: white;
	font-weight: 600;
}

.btn[data-lock="false"] {
	background-color: rgb(56, 56, 56);
}


.btn:hover[data-lock="false"] {
	color: rgba(255, 0, 0, 0.75);
}


.btn:hover {
	color: white;
	background-color: gray;
}

#save-map {
	position: absolute;
	width: 100%;
	height: 10%;
	top: 88.5%;
	right: 0%;
	border-radius: 0px 0px 20px 20px;
	border: none;
	background-color: rgba(255, 255, 255, 0.8);
	border: #f5f5f5 2px solid;
	font-weight: bold;
}

#overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 1);
	z-index: 3;
}


.right_button {
	position: relative;
	color: red;
	clip-path: polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%);
	z-index: 2;
}


#mobile-controls {
	position: absolute;
	display: flex;
	flex-direction: row;
	align-items: center;
	bottom: 0;
	width: 95vw;
	height: 25vh;
	margin: 0 0 2rem 2rem;
	z-index: 3;
	gap: 2rem;
	user-select: none;
}

#mobile-controls.hidden {
	display: none;
}

#left-controls {
	width: 20%;
	height: 100%;
	display: flex;
	align-items: end;
	gap: 1rem;
	margin-right: auto;
	margin-left: 0;
}

#right-controls {
	width: 20%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: end;
	gap: 1rem;
	margin-left: auto;
	margin-right: 0;
}

#left_button {
	margin-right: auto;
}

#right_button {
	margin-right: auto;
}

#jump_button {
	margin-left: auto;
}

#chroma_switch_button {
	margin-left: auto;
}

#mobile-controls button {
	border: rgba(0, 0, 0, 0.80) solid 2px;
	width: 8rem;
	height: 8rem;
	border-radius: 50%;
	backdrop-filter: blur(10px);
	background-color: rgba(255, 255, 255, 0.3);
	background-size: cover;
	background-position: center;
	background-image: var(--image-url);
}

#powerLeftCounter {
	position: absolute;
	top: 0;
	transform: scale(1.3);
	margin: 2rem 0 0 0;
	font-weight: 600;
}


.reset-level {
	position: absolute;
	top: 0%;
	left: 0%;
	margin: 1.5% 0% 0% 1.8%;
	z-index: 100;
}

.reset-level button {
	height: 3.5rem;
	width: 3.5rem;
	border-radius: 50%;
}

#reset-level-button {
	display: flex;
	justify-content: center;
	align-items: center;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 50%);
}

#reset-level-button img {
	width: 70%;
	height: 70%;
	transition: transform 0.5s ease;
}


#reset-level-button:hover img {
	transform: rotate(-270deg);
}

#reset-level-button:active img {
	transform: scale(0.8);
	transition: 0.2s;
}

#scoreDisplay {
	font-size: 1.6rem;
	font-weight: 600;
	margin: -2.8rem 1rem 0 5rem;
}

.wrapper {
    width: 100%;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
	transform: scale(1.5) translate(-5rem);
}

.container {
    height: 400px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: start;
}

.card {
    width: 80px;
    border-radius: .75rem;
    background-size: cover;
    cursor: pointer;
    overflow: hidden;
    border-radius: 2rem;
    margin: 0 10px;
    display: flex;
    align-items: flex-end;
    transition: .6s cubic-bezier(.28,-0.03,0,.99);
    box-shadow: 0px 10px 30px -5px rgba(255, 255, 255, 0.8);
	background-color: rgba(0, 0, 0, 0.3);
}

.card > .row {
    color: var(--clr-bgContent);
    display: flex;
    flex-wrap: nowrap;
}

.card > .row > .icon {
    background: rgb(238, 238, 238);
    color: var(--clr-bg);
    border-radius: 50%;
	height: 50px;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px;
}

.card > .row > .description {
    display: flex;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    height: 400px;
    width: 450px;
    opacity: 0;
    transform: translateY(30px);
    transition-delay: .3s;
    transition: all .3s ease;
	font-size: 2rem;
}

.description p, li, ul {
    color: #d2d2d2;
    padding-top: 5px;
	text-shadow: 2px 2px 4px rgba(3, 3, 4, 0.8);
	font-size: .9rem;
	font-weight: 500;
}

.description h4 {
    text-transform: uppercase;
}

.wrapper input {
    display: none;
}

.wrapper input:checked + label {
    width: 600px;
}

.wrapper input:checked + label .description {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.return-menu {
	position: absolute;
	top: 0%;
	left: 0%;
	margin: 1.5% 0% 0% 1.8%;
	z-index: 100;
}

.return-menu button {
	height: 3.5rem;
	width: 3.5rem;
	border-radius: 50%;
}



.about {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

#return-menu-button {
	display: flex;
	justify-content: center;
	align-items: center;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 50%);
}

#return-menu-button img {
	width: 60%;
	height: 60%;
	transition: transform 0.5s ease;
}


#return-menu-button:hover img {
	transform: scale(0.8);
}

#return-menu-button:active img {
	transform: scale(0.8);
	transition: 0.2s;
}



#return-menu-button2 {
	display: flex;
	justify-content: center;
	align-items: center;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 50%);
}

#return-menu-button2 img {
	width: 60%;
	height: 60%;
	transition: transform 0.5s ease;
}


#return-menu-button2:hover img {
	transform: scale(0.8);
}

#return-menu-button2:active img {
	transform: scale(0.8);
	transition: 0.2s;
}

.credits {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

#name-author{
	margin : 0;
	padding: 0;
	position: absolute;
	top: 50%;
	left:50%;
	transform: translate(-55%, -50%);
	font-size: 15rem;
	font-weight:900;
	color:var(--clr-bgContent);
	text-transform: uppercase;
}

#name-author:before{
	content: attr(data-texte);
	position: absolute;
	top: 0;
	left: 0;
	color:#000000;
	width: 0%;
	overflow: hidden;
	transition: 1.5s;
}

#name-author:hover:before{
	width: 100%;
}