* {
  margin: 0;
  box-sizing: border-box;
}

:root {
  --ff-primary: "Roboto", sans-serif;
  --ff-title: "Pirata One", sans-serif;
  --color-white: #ffffff;
  --color-white-0: rgba(255, 255, 255, 0.6);
  --color-black: #001e29;
  --letter-spacing: 0.1rem;
  --font-size-h1: 3.2rem;
  --font-size-h2: 2rem;
  --font-size-p: 1.7rem;
  --radius: 5px;
  --transition: all 0.3s linear;
}

body {
  margin: 0;
  font-family: var(--ff-primary);
  color: var(--color-white);
  text-align: center;
}
h1 {
  font-family: var(--ff-title);
  font-size: var(--font-size-h1);
  margin: 0;
}

h2 {
  font-size: var(--font-size-h2);
}
p {
  font-size: var(--font-size-p);
  line-height: 2.5rem;
}
/* 
================
Animation
================
 */
@keyframes bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes slideFromRight {
  0% {
    transform: translateX(1000px);
    opacity: 0;
  }
  50% {
    transform: translateX(-150px);
    opacity: 0.5;
  }

  100% {
    transform: translateX(0px);
    opacity: 1;
  }
}
@keyframes slideFromLeft {
  0% {
    transform: translateX(-1000px);
    opacity: 0;
  }
  50% {
    transform: translateX(200px);
    opacity: 0.5;
  }

  100% {
    transform: translateX(0px);
    opacity: 1;
  }
}
@keyframes show {
  0% {
    transform: scale(1.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/*
  ===================
  background 
  ===================
  */
.video-container {
  height: 100vh;
  width: 100vw;
}

#background-video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.img-container {
  height: 100vh;
  width: 100vw;
}

img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* use the hidden class to hide elements */

.hidden {
  display: none;
}
/*
  ===================
  center container
  ===================
  */

.center-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 75%;
}
/* adding an overlay  */
.video-container::after {
  position: absolute;
  content: "";
  background: rgba(0, 0, 0, 0.2);
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
}

#chapter-title {
  letter-spacing: var(--letter-spacing);
  animation: slideFromRight 5s ease-in-out 1;
}
#chapter-description {
  font-size: var(--font-size-p);
  padding: 2rem;
  line-height: 3rem;
  animation: slideFromLeft 5s ease-in-out 1;
}
#chapter-instruction {
  max-width: 70%;
  margin: 0 auto;
  line-height: 3rem;
}
.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
button {
  font-size: var(--font-size-p);
  font-family: var(--ff-primary);
  padding: 0.5rem 1.2rem;
  border-radius: 3rem;
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  transition: all 0.3s linear;
}
button:hover {
  border-color: transparent;
  background-color: var(--color-white-0);
  color: var(--color-black);
  cursor: pointer;
}
/*
=============
Inventory items
=============
*/

.item {
  position: absolute;
  height: 70px;
  width: 70px;
  z-index: 2;
  transition: var(--transition);
}
.item:hover {
  transform: scale(2);
  cursor: pointer;
}
#hidden-map {
  left: 10%;
  bottom: 20%;
  animation: bounce 3s ease infinite;
}
#seaShell {
  left: 17%;
  bottom: 25%;
}
#key {
  left: 20%;
  top: 17%;
}
#compass {
  height: 100px;
  bottom: 20%;
  right: 17%;
}
/*  inventory section */

.inventory-collection {
  margin: 2rem auto;
  margin-top: 4rem;
  width: 330px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}
.inventory-item {
  height: 100px;
  width: 100px;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.4);
}
/*
=============
Message bottle
=============
*/

.messageBottle {
  position: absolute;
  height: 50px;
  width: 100px;
  right: 15%;
  bottom: 10%;
  z-index: 2;
  animation: bounce 3s ease infinite;
  transition: var(--transition);
  cursor: pointer;
}

.message-container {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  height: 100%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: var(--color-black);
  background-image: url(images/message2.png);
  background-size: cover;
  z-index: 2;
}
.message-container p {
  width: 50%;
  padding: 2.3rem;
  font-size: 2rem;
  font-weight: bold;
  line-height: 3rem;
}

.close-btn {
  position: absolute;
  top: 15%;
  right: 20%;
  color: var(--color-black);
  font-weight: bold;
  font-size: 3rem;
  border-color: transparent;
  background-color: transparent;
  cursor: pointer;
  transition: var(--transition);
}
.close-btn:hover {
  transform: scale(2);
  color: var(--color-white);
  background-color: transparent;
}

/*
=============
Input Message
=============
*/

.user-input {
  height: 4rem;
  width: 35%;
  border-radius: 1rem;
  color: white;
  border-color: transparent;
  background-color: rgba(255, 255, 255, 0.2);
  font-size: var(--font-size-p);
  padding: 1rem 2rem;
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translate(-50%);
  z-index: 5;
}
.user-input::placeholder {
  font-size: 1.7rem;
  color: rgb(180, 174, 174);
}
