/* Level 2 */

@media (max-width: 1024px) {
body {
	padding: 0;
	margin: 0;
	background: #9a573d;
	overflow-x: hidden;
    touch-action: none;
}
    
a {
    color: white;
    text-decoration: none;
}
    
#overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#popup {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-family: Jura;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

#game {
	width: 100%;
	height: 300px;
	background: #fefefe; 
	background: url("../img/level2.png");
	background-repeat: no-repeat;
	background-size: 100% 100%;
	margin-left: auto;
	margin-right: auto;
}
#player {
	position: absolute;
	top: 140px;
	left: 80px;
	transform: translate(-50%, -50%);
	animation: moveUpDown 5s alternate;
    width:130px;
}
@keyframes moveUpDown {
	0% {
		transform: translate(-50%, -50%);
		top: 10px;
	}
	100% {
		transform: translate(-50%, -50%);
		top: 140px;
	}
}
div.atterrissage {
	opacity: 0.5;
	background: black;
	height: 170px;
	top: 30px;
	width: 100%;
	position: absolute;
	z-index: 999;
	display: block;
}
div.atterrissage p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 20px;
	font-size: 25px;
}
div.atterrissage div {
	color: white;
	text-align: center;
	font-family: Jura;
	font-size: 12px;
	margin-bottom: 10px;
}
div.atterrissage button {
	background-color: #4CAF50; 
	border: none;
	color: white;
	padding: 15px 32px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	top: 350px;
}
#cosmonaut {
	position: absolute;
	top: 190px;
	left: 5px;
	display: none;
    width:50px
}
.projectile {
	position: absolute;
	width: 10px;
	height: 5px;
	background-color: red;
}
.enemy {
	position: absolute;
	width: 35px; 
	height: 71px; 
	display: none;
}
.enemy2 {
	position: absolute;
	width: 35px; 
	height: 35px; 
	display: none;
}
div.gameover {
	opacity: 0.5;
	background: black;
	height: 140px;
	top: 20%;
	width: 100%;
	position: absolute;
	z-index: 999;
	display: none;
}
div.gameover p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 50px;
	font-size: 25px;
}
div.gameover div {
	color: white;
	text-align: center;
	font-family: Jura;
	font-size: 12px;
	margin-bottom: 10px;
}
.enemy-flying {
	position: absolute;
	width: 70px;
	height: 70px; 
	top: 30px;  
	animation: moveEnemyRightLeft 25s linear infinite; 
	display: none;
}
    
.enemy-flying img {
	 width:70px;
}
    
@keyframes moveEnemyRightLeft {
	0% {
		left: 20px; 
		top: 30px;
	}
	25% {
		left: calc(100% - 80px);
		top: 30px;
	}
	50% {
		left: calc(100% - 80px); 
		top: 30px;
	}
	75% {
		left: 20px;
		top: 30px;
	}
	100% {
		left: 20px;
		top: 30px;
	}
}
.projectilevolant {
	position: absolute;
	width: 5px; 
	height: 5px; 
	left: 0;
	top: 0; 
	background-color: #83f52c; 
	animation: shootProjectile 2s linear ;
	opacity: 0;
}
@keyframes shootProjectile {
	0% {
		top: 70px;
		opacity: 50; 
	}
	100% {
		top: 600px; 
		opacity: 10; 
	}
}
#score  {
	margin-top: 10px;
	margin-left: 20px;
	font-weight: bold;
	font-family: Jura;
	color: white;
	position: absolute;
	z-index: 999;
}
#compteur {
	font-weight: bold;
	font-family: Jura;
	color: white;
	width: 97%;
	position: absolute;
	text-align: right;
	margin-top: 10px;
	z-index: 999;
}
div.killboss {
	opacity: 0.5;
	background: black;
	height: 60px;
	top: 30px;
	width: 100%;
	position: absolute;
	z-index: 999;
	display : none;
}
div.killboss p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 20px;
	font-size: 25px;
}
#boss {
	position: absolute;
	width: 300px; 
	height: 300px;
	top: -160px; 
	left: 80%;
	z-index: 400;
	display: none;
}
img.boss2 {
	z-index: 400;
    width: 170px;
}	
#bosslifeview {
	margin-top: 10px;
	margin-left: 150px;
	width: 40px;
	font-weight: bold;
	font-family: Jura;
	color: white;
	position: absolute;
	z-index: 999;
}
#chanceview {
	margin-top: 10px;
	margin-left: 100px;
	width: 100px;
	font-weight: bold;
	font-family: Jura;
	color: white;
	position: absolute;
	z-index: 999;
    text-align: left;
}
div.startgame2 {
	opacity: 0.5;
	background: black;
	height: 170px;
	top: 20%;
	width: 100%;
	position: absolute;
	z-index: 999;
	display : none;
}
div.startgame2 p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 20px;
	font-size: 25px;
}
div.startgame2 div {
	color: white;
	text-align: center;
	font-family: Jura;
	font-size: 12px;
	margin-bottom: 10px;
}
div.startgame2 button {
	background-color: #4CAF50; 
	border: none;
	color: white;
	padding: 15px 32px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	top: 350px;
}
.info-box {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    color: #dddddd;
    text-align: center;
    line-height: 60px;
	font-family: Jura;
	font-size: 10px;
}
.star-container {
    position: absolute;
    width: 100%;
    height: 100px;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #fff;
    border-radius: 50%;
    animation: sparkle 1s infinite;
    z-index: 999;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.star:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0.5s;
    z-index: 999;
}

.star:nth-child(2) {
    top: 50%;
    left: 60%;
    animation-delay: 2s;
    z-index: 999;
}

.star:nth-child(3) {
    top: 70%;
    left: 40%;
    animation-delay: 1s;
    z-index: 999;
}

.star:nth-child(4) {
    top: 70%;
    left: 90%;
    animation-delay: 1s;
    z-index: 999;
}


.star:nth-child(5) {
    top: 30%;
    left: 75%;
    animation-delay: 1s;
    z-index: 999;
}
#star {
	position: absolute;
	top: 80%;
	left: 25px; /* Aligner l'étoile à gauche */
	transform: translateY(-50%); /* Centrer verticalement */
	display: flex;
	flex-direction: column;
    z-index: 999;
}

.row {
	display: flex;
	justify-content: center;
    z-index: 999;
}

.button {
	width: 50px;
	height: 50px;
	background-color: #3498db;
	color: #fff;
	font-size: 24px;
	text-align: center;
	line-height: 50px;
	cursor: pointer;
	transition: background-color 0.3s;
	opacity : 0.2;
    z-index: 999;
}

.button:hover {
	background-color: #2980b9;
    z-index: 999;
}

#left {
	border-top-right-radius: 25px;
	border-bottom-right-radius: 25px;
    z-index: 999;
}

#right {
	border-top-left-radius: 25px;
	border-bottom-left-radius: 25px;
    z-index: 999;
}

#top {
	border-bottom-left-radius: 25px;
	border-bottom-right-radius: 25px;
    z-index: 999;
}

#bottom {
	border-top-left-radius: 25px;
	border-top-right-radius: 25px;
    z-index: 999;
}

#fire-button {
	position: absolute;
	top: 80%; /* Position du haut à 400px */
	right: 25px; /* Aligner à droite */
	background-color: #3498db;
	color: #fff;
	font-size: 16px;
	padding: 10px 20px;
	cursor: pointer;
	border: none;
	border-radius: 5px;
	opacity : 0.2;
	width : 200px;
    z-index: 999;
}
	   
}

@media only screen and (min-width: 1024px) {
    
body {
	padding: 0;
	margin: 0;
	background: #9a573d;
	overflow-x: hidden;
    touch-action: none;
}
    
a {
    color: white;
    text-decoration: none;
}
    
#overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#popup {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-family: Jura;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

#game {
	width: 100%;
	height: 600px;
	background: #fefefe; 
	background: url("../img/level2.png");
	background-repeat: no-repeat;
	background-size: 100% 100%;
	margin-left: auto;
	margin-right: auto;
}
#player {
	position: absolute;
	top: 240px;
	left: 80px;
	transform: translate(-50%, -50%);
	animation: moveUpDown 5s alternate;
    width:400px
}
@keyframes moveUpDown {
	0% {
		transform: translate(-50%, -50%);
		top: 10px;
	}
	100% {
		transform: translate(-50%, -50%);
		top: 240px;
	}
}
div.atterrissage {
	opacity: 0.5;
	background: black;
	height: 170px;
	top: 30px;
	width: 100%;
	position: absolute;
	z-index: 999;
	display: block;
}
div.atterrissage p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 20px;
	font-size: 25px;
}
div.atterrissage div {
	color: white;
	text-align: center;
	font-family: Jura;
	font-size: 12px;
	margin-bottom: 10px;
}
div.atterrissage button {
	background-color: #4CAF50; 
	border: none;
	color: white;
	padding: 15px 32px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	top: 350px;
}
#cosmonaut {
	position: absolute;
	top: 350px;
	left: 80px;
	display: none;
    width:100px
}
.projectile {
	position: absolute;
	width: 10px;
	height: 5px;
	background-color: red;
}
.enemy {
	position: absolute;
	width: 50px; 
	height: 117px; 
	display: none;
}
.enemy2 {
	position: absolute;
	width: 75px; 
	height: 75px; 
	display: none;
}
div.gameover {
	opacity: 0.5;
	background: black;
	height: 140px;
	top: 20%;
	width: 100%;
	position: absolute;
	z-index: 999;
	display: none;
}
div.gameover p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 50px;
	font-size: 25px;
}
div.gameover div {
	color: white;
	text-align: center;
	font-family: Jura;
	font-size: 12px;
	margin-bottom: 10px;
}
.enemy-flying {
	position: absolute;
	width: 70px;
	height: 70px; 
	top: 80px; 
	left: 100px;  
	animation: moveEnemyRightLeft 25s linear infinite; 
	display: none;
}

.enemy-flying img {
	 width:120px;
}
    
@keyframes moveEnemyRightLeft {
	0% {
		left: 20px; 
		top: 80px;
	}
	25% {
		left: calc(100% - 80px);
		top: 80px;
	}
	50% {
		left: calc(100% - 80px); 
		top: 80px;
	}
	75% {
		left: 20px;
		top: 80px;
	}
	100% {
		left: 20px;
		top: 80px;
	}
}
.projectilevolant {
	position: absolute;
	width: 5px; 
	height: 5px; 
	left: 0;
	top: 0; 
	background-color: #83f52c; 
	animation: shootProjectile 2s linear ;
	opacity: 0;
}
@keyframes shootProjectile {
	0% {
		top: 70px;
		opacity: 50; 
	}
	100% {
		top: 600px; 
		opacity: 10; 
	}
}
#score  {
	margin-top: 10px;
	margin-left: 20px;
	font-weight: bold;
	font-family: Jura;
	color: white;
	position: absolute;
	z-index: 999;
}
#compteur {
	font-weight: bold;
	font-family: Jura;
	color: white;
	width: 97%;
	position: absolute;
	text-align: right;
	margin-top: 10px;
	z-index: 999;
}
div.killboss {
	opacity: 0.5;
	background: black;
	height: 60px;
	top: 30px;
	width: 100%;
	position: absolute;
	z-index: 999;
	display : none;
}
div.killboss p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 20px;
	font-size: 25px;
}
#boss {
	position: absolute;
	width: 300px; 
	height: 300px;
	top: -160px; 
	left: 80%;
	z-index: 400;
	display: none;
}
img.boss2 {
	z-index: 400;
    width: 220px;
}	
#bosslifeview {
	margin-top: 10px;
	margin-left: 300px;
	width: 150px;
	font-weight: bold;
	font-family: Jura;
	color: white;
	position: absolute;
	z-index: 999;
}
#chanceview {
	margin-top: 10px;
	margin-left: 100px;
	width: 150px;
	font-weight: bold;
	font-family: Jura;
	color: white;
	position: absolute;
	z-index: 999;
}
div.startgame2 {
	opacity: 0.5;
	background: black;
	height: 170px;
	top: 20%;
	width: 100%;
	position: absolute;
	z-index: 999;
	display : none;
}
div.startgame2 p {
	color: white;
	text-align: center;
	font-family: Jura;
	margin-top: 20px;
	font-size: 25px;
}
div.startgame2 div {
	color: white;
	text-align: center;
	font-family: Jura;
	font-size: 12px;
	margin-bottom: 10px;
}
div.startgame2 button {
	background-color: #4CAF50; 
	border: none;
	color: white;
	padding: 15px 32px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	top: 350px;
}
.info-box {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    color: #dddddd;
    text-align: center;
    line-height: 60px;
	font-family: Jura;
	font-size: 10px;
}
.star-container {
    position: absolute;
    width: 100%;
    height: 300px;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #fff;
    border-radius: 50%;
    animation: sparkle 1s infinite;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.star:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0.5s;
}

.star:nth-child(2) {
    top: 50%;
    left: 60%;
    animation-delay: 2s;
}

.star:nth-child(3) {
    top: 70%;
    left: 40%;
    animation-delay: 1s;
}

.star:nth-child(4) {
    top: 70%;
    left: 90%;
    animation-delay: 1s;
}


.star:nth-child(5) {
    top: 30%;
    left: 75%;
    animation-delay: 1s;
}
#star {
	position: absolute;
	top: 60%;
	left: 25px; /* Aligner l'étoile à gauche */
	transform: translateY(-50%); /* Centrer verticalement */
	display: flex;
	flex-direction: column;
}

.row {
	display: flex;
	justify-content: center;
}

.button {
	width: 50px;
	height: 50px;
	background-color: #3498db;
	color: #fff;
	font-size: 24px;
	text-align: center;
	line-height: 50px;
	cursor: pointer;
	transition: background-color 0.3s;
	opacity : 0.2;
}

.button:hover {
	background-color: #2980b9;
}

#left {
	border-top-right-radius: 25px;
	border-bottom-right-radius: 25px;
}

#right {
	border-top-left-radius: 25px;
	border-bottom-left-radius: 25px;
}

#top {
	border-bottom-left-radius: 25px;
	border-bottom-right-radius: 25px;
}

#bottom {
	border-top-left-radius: 25px;
	border-top-right-radius: 25px;
}

#fire-button {
	position: absolute;
	top: 60%; /* Position du haut à 400px */
	right: 25px; /* Aligner à droite */
	background-color: #3498db;
	color: #fff;
	font-size: 16px;
	padding: 10px 20px;
	cursor: pointer;
	border: none;
	border-radius: 5px;
	opacity : 0.2;
	width : 200px;
}
    
}