html, body, .game, h1, p, button, aside, .chapter-img, .reset {
  transition: all 0.5s ease-in-out; /* Smooth transition for all properties */
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}


body {
  background-color: #012737; /* Dark background */
  color: white; /* Dark theme text color */
}

aside {
  background-color: #012737;
  color: white;
  padding: 10px;
  border-radius: 10px;
  position: fixed;  /* Use fixed to keep it in the same position */
  bottom: 10px;     /* Adjust distance from the bottom */
  left: 10px;       /* Adjust distance from the left */
  margin: auto;
  z-index: 10;      /* Ensure it appears on top of other elements */
}

.content::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: -1;
  background-image: url("assets/img/background/backgroundproject.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  height: 100%;
  width: 100%;
  -webkit-filter: blur(5px);
  -moz-filter: blur(5px);
  -o-filter: blur(10px);
  -ms-filter: blur(10px);
  filter: blur(10px);
  transform: scale(1.2);
}

.game {
  /* Avec ces commandes-ci, l'album entier est capable de rester centrer même en réagrandissant la page */
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  overflow: auto;
  color: black;
  background-color: #03648d;
  width: 900px;
  min-height: 100px;
  border-style: outset;
  border-color: blue;
  border-width: 5px;
  border-radius: 10px;
  padding: 5px;

}

h1 {
  color: #036b0e;
  text-shadow: 2px 2px #000000;
  line-height: 35px;
  text-transform: none;
  text-align: center;
  font-size: 50px;
  font-family: "Uncial Antiqua", cursive;
}
.chapter-text {
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
}

p {
  font-family: "Source Sans Pro", sans-serif;
  margin: 0 auto;
  text-align: justify;
  width: 90%;
}

h2 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: bolder;
  text-align: center;
}

h3 {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  margin: 5px;
}

.chapter-img {
  border-radius: 30px;
  width: 100%;
  min-width: 80%;
  padding: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.btn-panel {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
}
button {
  line-height: 20px;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 20px;
  color: chartreuse;
  margin: 5px;
  border-color: red;
  border-width: 5px;
  border-radius: 300px;
  -webkit-border-radius: 300px;
  padding: 10px;
  height: 60px;
  transition: 0.5s;
  width: 10em;
  background-color: #6f0202;
}

button:hover {
  cursor: pointer;
  background-color: red;
}

button:active {
  border-style: inset;
  background-color: crimson;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.controls {
  background-color: rgb(48, 153, 205);
  border-radius: 5px;
}

.controls button{
  width: 100px;
}

.controls i {
  font-size: 1.5rem;
}

.controls-buttons{
  display: flex;
  align-items: center;
  flex-direction: row;
}

.checkbox > span {
  color: #34495e;
  padding: 0.5rem 0.25rem;
}




.checkbox > input {
  height: 30px;
  width: 30px;
  -webkit-appearance: none;
  -moz-appearance: none;
  -o-appearance: none;
  appearance: none;
  border: 1px solid #34495e;
  border-radius: 4px;
  outline: none;
  transition-duration: 0.3s;
  background-color: #41b883;
  cursor: pointer;
}

.checkbox > input:checked {
  border: 1px solid #41b883;
  background-color: #34495e;
}

.checkbox > input:checked + span::before {
  content: "\2713";
  display: block;
  text-align: center;
  color: #41b883;
  position: absolute;
  left: 0.6rem;
  top: 0.3rem;
}

.checkbox > input:active {
  border: 2px solid #34495e;
}

.no1 {
  position: absolute;
  top: 100px;
  width: 90px;
  display: none;
}

.BonneFin {
  display: none;
  float: right;
}

.MauvaiseFin {
  width: 200px;
  margin: 20px;
  display: none;
}

/*La style de la clé qui apparait lorsque l'utilisateur a trouvé la clé*/

.ico-key {
  display: none;
  width: 30px;
  margin: 10px;
  align-self: start;
}

.isVisible .ico-key {
  display: block;
}

/*Style pour PS5.2 */
.badchoice1 .game {
  transition: 0.5s;
  border-style: outset;
  border-color: red;
  background-color: rgb(240, 77, 77);
}
.badchoice1 h1 {
  border-color: red;
  transition: 0.5s;
  color: pink;
  background-color: rgb(240, 77, 77);
}

.badchoice1 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice3 .game {
  transition: 0.5s;
  border-style: outset;
  border-color: red;
  background-color: rgb(240, 77, 77);
}

.badchoice3 h1 {
  transition: 0.5s;
  color: pink;
}

.badchoice3 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice4 .game {
  transition: 0.5s;
  border-style: outset;
  border-color: red;
  background-color: rgb(240, 77, 77);
}
.badchoice4 h1 {
  transition: 0.5s;
  color: pink;
}

.badchoice4 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice2 .content::before {
  background-image: url("assets/img/Gif/police-lights.gif");
}

.badchoice3 h1 {
  transition: 0.5s;
  color: pink;
}

.badchoice3 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice4 .game {
  transition: 0.5s;
  border-style: outset;
  border-color: red;
  background-color: rgb(240, 77, 77);
}
.badchoice4 h1 {
  transition: 0.5s;
  color: pink;
}

.badchoice4 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice5 .game {
  transition: 0.5s;
  border-style: outset;
  border-color: red;
  background-color: rgb(240, 77, 77);
}
.badchoice5 h1 {
  transition: 0.5s;
  color: pink;
}

.badchoice5 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice7 .game {
  transition: 0.5s;
  border-style: outset;
  border-color: red;
  background-color: rgb(240, 77, 77);
}
.badchoice7 h1 {
  transition: 0.5s;
  color: pink;
}
.badchoice7 .content::before {
  transition: 0.5s;
  background-color: rgb(112, 3, 3);
  background-image: none;
}

.badchoice2,
.arrested .content::before {
  background-image: url("assets/img/Gif/police-lights.gif");
}

.goodending .no1 {
  display: block;
}

.goodending .BonneFin {
  display: block;
}

.badending .MauvaiseFin {
  display: block;
}

.ch4altpath .game {
  background-image: url("assets/img/Texture/Matrix-Code-PNG-Image-Background.png");
  background-repeat: no-repeat;
  font-weight: bold;
}

.chapitre5 .game {
  background-image: url("assets/img/Texture/brick-texture-png-25.png");
  background-repeat: no-repeat;
  background-size: contain;
}

.chapitre6 .game {
  background-image: url("assets/img/Texture/flames.png");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: contain;
}

 .reset {
    background-color: #c06d00;
    width: 8em;  /* Same width as other buttons */
    height: 60px; /* Same height as other buttons */
    padding: 10px; /* Same padding as other buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    border-color: red;
    border-width: 5px;
    border-radius: 300px;
    transition: 0.5s;
    align-self: flex-end;
  }
  
  .reset img {
    width: 35%;  /* Adjust the width of the SVG icon to fit inside the button */
    height: auto;  /* Maintain aspect ratio */
  }
  .reset:hover {
    background-color: rgb(134, 64, 6);
  }
  .reset:hover {
    background-color: rgb(134, 64, 6);
  }


  /* Light theme adjustments */
.light-theme {
  background-color: #f4f4f4; /* Light background */
  color: #2f2f2f; /* Dark text color for readability */
}

.light-theme aside {
  background-color: #aadafc; /* Lighter background for the aside */
  color: #2f2f2f; /* Dark text in the aside */
}

.light-theme .game {
  background-color: #ffffff; /* White background for game */
  border-color: #4caf50; /* Green border for the light theme */
  color: #2f2f2f; /* Dark text for readability */
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.light-theme h1 {
  color: #00796b; /* Light green text */
  text-shadow: 2px 2px #ffffff;
}

.light-theme p {
  color: #2f2f2f; /* Dark text for paragraphs */
}

.light-theme button {
  background-color: #f2a1a1; /* Green buttons for the light theme */
  color: white;
  border-color: #8e3838; /* Darker green border */
}

.light-theme button:hover {
  background-color: #8e3838;
}

.light-theme button:active {
  background-color: #602525;
}

.light-theme .checkbox > input {
  background-color: #af4c4c;
}

.light-theme .checkbox > input:checked {
  background-color: #8e3838;
}

.light-theme .reset {
  background-color: #ff9800; /* Orange reset button */
}

/* Light theme images and other elements */
.light-theme .chapter-img {
  border-radius: 10px;
}

.light-theme .content::before {
  background-color: #f4f4f4; /* Light background */
}

/* Light theme for specific "bad choices" and ending messages */
.light-theme .badchoice1 .game {
  background-color: #ffeb3b; /* Light yellow background */
}

.light-theme .badchoice1 h1 {
  color: #f44336; /* Red for bad choice */
}

.light-theme .badchoice2 .content::before {
  background-image: url("assets/img/Gif/police-lights.gif");
}

/* Reset light theme for chapter backgrounds */
.light-theme .ch4altpath .game {

  background-color: #fff;
}

.light-theme .chapitre5 .game {
  background-color: #fff;
}

.light-theme .chapitre6 .game {
  background-color: #fff;
}
/* Media Query for Mobile Devices */
@media (max-width: 768px) {
  .game {
    width: 100%;
    max-width: 100%;
    padding: 10px;
  }

  h1 {
    font-size: 1.8em;
  }

  .chapter-img {
    padding: 10px;
  }

  button {
    font-size: 0.9em;
    height: auto;
    width: 7em;
  }

 
  aside {
    position: static; /* Changed to static positioning for small screens */
    display: block;
    margin: 10px;
  }
}
