/* ------------------------------------------------------------ container setup ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,700&display=swap');
/* the body affects all elements inside of it */
body {
	display: flex;
	justify-content: center;
	align-items: center;
	background-size:cover;
	background-position: center;
	background-repeat:no-repeat;
	font-family: 'Poppins',"Open Sans", Arial, Helvetica, sans-serif;
	text-align: center;
	overflow: hidden;
	background-image: url("/spinner/assets/Jewel-Vault/img/Game-Background.jpg");
}
body.game-over-lose {
  background-image: url("/spinner/assets/Jewel-Vault/img/lose-background.jpg");
}


/* contains all game elements */
#game-container {
	width: 1200px;
	height: 785px;

	position: relative;
}


#prize-id {
    margin-top: 250px;
}

#prize-list {
	background-image: url("/spinner/assets/Jewel-Vault/img/prize-list.png");
	background-position: center;
	background-size: contain;
	height: 200px;
	background-repeat: no-repeat;
}




/* sound and restart */
#toggle-sound svg,
#restart-button svg {
	fill: #fff;
}


/* the title of the game */
#title {
	width: 810px;
	height: 230px;
	margin: auto;
	position: relative;
	background-image: url("/spinner/assets/Jewel-Vault/img/title.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-bottom: -115px;
}

.screen-prize-container #title {
  visibility: visible;
}

.language-code-FR #title {
	width: 900px;
	height: 225px;
	margin: auto auto auto auto;
	font-size: 5em;
	font-weight: bold;
	position: relative;
	color: white;
	background-image: url("/spinner/assets/Jewel-Vault/img/FR/title.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-bottom: -115px;
	margin-top:50px;
}

#title2 {
    height: 225px;
    background-image: url("/spinner/assets/Jewel-Vault/img/title-2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.language-code-FR #title2 {
    height: 225px;
    background-image: url("/spinner/assets/Jewel-Vault/img/FR/title-2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* the intro container */
#intro-container {
	width: 1100px;
    height: 530px;
    margin: auto 50px auto 50px;
    position: relative;
    padding: 50px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
#intro-description{
    font-size: 45px;
    color: #CEA14F;
    line-height: 1.5em;
    margin-top: 63px;
    font-weight: bold;
    -webkit-text-stroke: 0.5px #ffffff;
    text-shadow: 0px 3px 6px #000000de;
}


#rules-header {
    font-size: 52px;
    color: white;
    font-weight: bold;
    -webkit-text-stroke: 0.5px #AC8451;
    text-shadow: 0px 3px 6px #00000063;
    margin-top: 0px;
    margin-bottom: -26px;
}


#rules-instructions {
    font-size: 80px;
    color: white;
    font-weight: bold;
    -webkit-text-stroke: 0.5px #AC8451;
    text-shadow: 0px 3px 6px #00000063;
}




#intro-description b {
	font-size: 1.3em;
	color: #22ccf2;
}
#intro-button {
    font-size: 2em;
    padding: .2em;
    border: 1px solid #F2F2F2;
    width: 30%;
    cursor: pointer;
    border-radius: 10px;
    background-color: #CEA14F;
    box-shadow: 0px 3px 6px #000000;
    color: white;
    z-index: -1;
    margin: auto;
    margin-top: 1em;
}



/* the board container */
#board-container {
	width: 1000px;
	height: 700px;
	margin: auto;
	position: relative;
	animation-name: showGame;
	animation-duration: 1s;
	animation-timing-function: ease-in;
}

#required-info {
    margin: 50px auto;
    width: 1130px;
    height: 500px;
}



/* .screen-board-container #title {
    visibility: hidden;
	margin-top:0px;
} */

#title {
    visibility: hidden;
    margin-top: 0px !important;
}
.screen-intro-container #title,
.screen-required-info.game-finished #title {
	visibility: visible;
}

/* the prize container */
#prize-container {
  width: 50%;
  color: white;
  backdrop-filter: blur(36px);
  background-color: #7451189c;
  box-shadow: inset -2px 2px 10px 0px #ebab449c;
  border: 1px solid yellow;
  border-radius: 10px;
  height: max-content;
  margin-top: 15vh;
	padding: 2vh 5vh;
}

.prize-header {
  font-size: 7vh;
  font-weight: bold;
}

.prize-name {
  text-transform: uppercase;
  color: #CEA14F;
  line-height: 1.2em;
  -webkit-text-stroke: 0.5px #ffffff;
  text-shadow: 0px 3px 6px #000000de;
}

.prize-name-tail, .prize-name-value {
  display: inline-block;
  font-weight: 600;
font-size: 7vh;
margin-bottom: 4vh;
}

.prize-name-value {
  margin-right: 2vw;
}


.prize-name-head {
	font-weight: bold;
	font-size: 28px;
	color: black;
	/* display: none; */
}

.game-finished.game-over-lose .prize-name {
font-size:  3vw;
	font-weight: bold;
}

.game-finished.game-over-lose .prize-points-description {
  font-size: 2.5vh;
  font-weight: normal;
}


#take-me-there {
	display:none;
    font-size: 20px;
    padding: .5em;
    border: 2px solid #ffffff;
    cursor: pointer;
    border-radius: 10px;
    background-color: #22ccf2;
    box-shadow: 0px 1px 6px #37393b;
    color: white;
    z-index: -1;
    margin: auto;
    margin-top: 10px;
}

/* reveals the prize container at the end */
body.game-over-win{
	background-image: url("/spinner/assets/Jewel-Vault/img/game-background-finished.jpg");
}

.game-over-win #board-container {
  display: none !important;
}

.game-finished.screen-board-container #instructions {
   display: none;
}

.screen-required-info.game-finished #board-container {
	display: none !important;
}

.game-over-lose.prize-code-p0 #take-me-there {
    display: none;
}

#final-win-message-txt {
  top: 20px;
  margin: 0 auto;
  font-size: 45px;
  color: white;
}
#final-win-message-txt b {
  font-size: 55px;
}

.screen-required-info-submitted #required-info {
    height: 240px;
}


.game-finished #prize-container {
    animation-name: showLastScreen;
    animation-duration: 2S;
    animation-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.850);
    animation-fill-mode: forwards;
    justify-content: center;
    align-content: center;
    flex-direction: column-reverse;
	left: 25%;
	position: relative;
}

.screen-post-win-1 #board-container {
    display: none !important;
}

.screen-required-info #post-win-1-button {
    display: none;
}

.screen-required-info-submitted.screen-required-info #post-win-1-button {
    display: block;
}

.screen-post-win-1 #required-info {
    display: none !important;
}

.screen-required-info-submitted #required-info {
    display: flex !important;
    justify-content: center;
    flex-direction: column-reverse;
}

.screen-required-info.game-finished #title {
	width: 900px;
	height: 180px;
	margin: auto auto auto auto;
	font-size: 5em;
	font-weight: bold;
	position: relative;
	color: white;
	background-image: url("/spinner/assets/Jewel-Vault/img/title3.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-bottom: -45px;
}

.language-code-FR.screen-required-info.game-finished #title {
	width: 900px;
	height: 250px;
	margin: auto auto auto auto;
	font-size: 5em;
	font-weight: bold;
	position: relative;
	color: white;
	background-image: url("/spinner/assets/Jewel-Vault/img/FR/title3.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-bottom: -45px;
}



#info-required-header {
	font-size:30px;
	color:white;
	margin-bottom:30px;
}


#required-info {
    margin-top: 50px;
}

#info-required-button {
	font-size: 1em;
    padding: .5em;
    border: 2px solid #ffffff;
	width:max-content;
    cursor: pointer;
    border-radius: 10px;
    background-color: #22ccf2;
    box-shadow: 0px 1px 6px #37393b;
    color: white;
    z-index: -1;
    margin: auto;
    margin-top: 1em;
}




p#instructions {
    font-size: 40px;
margin-top:0px;
}

.language-code-FR p#instructions {
    font-size: 35px;
margin-top:0px;
}



	

#info-required-before-prize {
width: 80%;
margin: 0 auto;
display: none;
}

input {
width: 270px;
padding: 13px;
border-radius: 20px;
margin: 5px;
border: 1px solid #ea14ea;
font-size:20px;
}

input:focus {
color:black;
border: 1px solid #ea14ea;

}

#info-required-select-country, #info-required-select-province {
padding: 13px;
border-radius: 20px;
margin: 5px;
border: 1px solid #ea14ea;
-webkit-appearance: none;
	background-color:white;
	font-size:17px;
}

#prize-info-success-text {
	font-size:65px;
	color:white;
	text-transform: uppercase;
	font-weight:bold;
}

#prize-info-success-text b {
	font-size: 45px;
	color: #f170d4;
	text-transform: none;
	font-weight: 500;
}


/* on screen instructions */
#instruction-container {
    position: absolute;
    font-size: 28px;
    top: 18px;
    left: 600px;
    width: 50%;
    height: 355px;
    color: white;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: -92px;
	display: none;
}

#instruction-container.remove {
	animation-name: hideInstructions;
	animation-duration: 1s;
	animation-fill-mode: forwards;
}



/* prize wheel */
#prize-wheel {
	position: absolute;
	top: 0px;
	left: 195px;
	width: 600px;
	height: 560px;

	z-index: 2;

	/* needed for the rotation in javascript */
	/* sets the starting rotation */
	transform: rotate(0deg);
	/* sets the time for the transition */
	transition: all;

	/* sets the animation frame timing function */
	transition: cubic-bezier(0.9, -0.145, 0.005, 1.00) 9s;
	/* transition: linear 9s; */


	background-image: url("/spinner/assets/Jewel-Vault/img/wheel.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.language-code-FR #prize-wheel {
	position: absolute;
	top: 0px;
	left: 195px;
	width: 600px;
	height: 560px;

	z-index: 2;

	/* needed for the rotation in javascript */
	/* sets the starting rotation */
	transform: rotate(0deg);
	/* sets the time for the transition */
	transition: all;

	/* sets the animation frame timing function */
	transition: cubic-bezier(0.9, -0.145, 0.005, 1.00) 9s;
	/* transition: linear 9s; */


	background-image: url("/spinner/assets/Jewel-Vault/img/wheel.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#wheel-frame {
	position: absolute;
	top: -59px;
	left: 106px;
	width: 780px;
	height: 780px;
	z-index: 1;
	background-image: url("/spinner/assets/Jewel-Vault/img/wheel-frame.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#spin-button {
	position: absolute;
	top: 183px;
    left: 392px;
    width: 200px;
    height: 200px;
	z-index: 3;
	cursor: pointer;
	background-image: url("/spinner/assets/Jewel-Vault/img/spin-button.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
#spin-button-click {
	position: absolute;
	top: 183px;
    left: 392px;
    width: 200px;
    height: 200px;
	z-index: 3;
	pointer-events: none;
	background-image: url("/spinner/assets/Jewel-Vault/img/spin-button-click.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
	display: block;
}

#wheel-stopper {
	position: absolute;
	top: -55px;
	left: 467px;
	width: 55px;
	height: 75px;
	z-index: 3;
	background-image: url("/spinner/assets/Jewel-Vault/img/stopper.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#wheel-stopper.spinStopper {
	animation-name: spinTheStopper;
	animation-duration: 9s;
	animation-fill-mode: both;
	animation-timing-function:  ease-in-out;
}

#glow {
	position: absolute;
	top: 45px;
	left: 35px;
	width: 500px;
	height: 500px;

	z-index: 0;

	border-radius: 50%;

	box-shadow: 0px 0px 90px 100px #E0A73D;

	display: none;
}

#glow.playEffect {
	display: block;
	animation-name: pulsate;
	animation-fill-mode: both;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	animation-timing-function: ease-in-out;
}


/* ------------------------------------------------------------ animations ------------------------------------------------------------ */

/* ------------- event listeners ------------- */

/* ------- on click events ------- */
.startSpinning {
	animation: spinWheel 1s ease-in 1 forwards;
}
.constSpinning {
	animation: spinWheel 1s linear 5 forwards;
}



/* if an item is clicked */
.clicked {
	animation-name: clickedItem;
	animation-fill-mode: forwards;
	animation-duration: 0.5s;
	animation-timing-function: linear;
	
	pointer-events: none;
}

.buttonClicked {
	animation-name: buttonEffect;
	animation-fill-mode: both;
	animation-duration: 0.5s;
	animation-timing-function: linear;
}

/* .stopperEffect {
	animation-name: stopperEffect;
	animation-fill-mode: forwards;
	animation-duration: 1s;
	animation-timing-function: cubic-bezier(0.57, -0.95, 0.445, 1.0);
} */

/* keyframes */

/* move screen elements */
/* shows the game */

@keyframes spinWheel {
	from{
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes showGame {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
/* hides the instructions */
@keyframes hideInstructions {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}


/* basic moving the items on screen */
@keyframes clickedItem {
	0% {
		transform: scale(1, 1);
	  }
	50% {
		transform: scale(0.95, 0.95);
	}
	100% {
		transform: scale(1, 1);
	}
}

@keyframes buttonEffect {
	0% {
		opacity: 0;
		transform: scale(1, 1);
	}
	50% {
		opacity: 0.2;
		transform: scale(0.95, 0.95);
	}
	100% {
		opacity: 0;
		transform: scale(1, 1);
	}
}

@keyframes stopperEffect {
	0% {
		transform: scale(2, 2);
		top: -30px;
	}
	50% {
		transform: scale(2, 2);
	}
	100% {
		transform: scale(2, 2);
		top: 13px;
	}
}

@keyframes pulsate {
	0% {
		transform: scale(0.8, 0.8);
	}
	50% {
		transform: scale(0.88, 0.88);
	}
	100% {
		transform: scale(0.8, 0.8);
	}
}

@keyframes bounce {
	0% {
		top: -30px;
		transform: scale(1.2);
	}
	25% {
		transform: scale(1);
	}
	50% {
		top: 0px;
		transform: scale(1.2);
	}
	75% {
		transform: scale(1);
	}
	100% {
		top: -30px;
		transform: scale(1.2);
	}
}

@keyframes spinTheStopper {
	0% {	
		transform: rotate(0deg);
	}
	13% {		
		transform: rotate(40deg);
	}
	30% {
		transform: rotate(-40deg);
	}
	35% {
		transform: rotate(-35deg);
	}
	40% {
		transform: rotate(-40deg);
	}
	45% {
		transform: rotate(-40deg);
	}
	50% {
		transform: rotate(-35deg);
	}
	55% {
		transform: rotate(-40deg);
	}
	60% {
		transform: rotate(-35deg);
	}
	65% {
		transform: rotate(-40deg);
	}
	70% {
		transform: rotate(-35deg);
	}
	75% {	
		transform: rotate(-40deg);
	}
	80% {
		transform: rotate(-35deg);
	}
	85% {
		transform: rotate(-40deg);
	}
	100% {	
		transform: rotate(-0deg);
	}
}



/* shows the last screen */
@keyframes showLastScreen{
	from {
		opacity: 0;
		transform: scale(0.95, 0.95);
	}
	to {
		opacity: 1;
		transform: scale(1.2, 1.2);
	}
}


/* ------------------------------------------------------------ end of animations ------------------------------------------------------------ */