@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: #ececec;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.heading {
  display: flex;
  justify-content: center;
}

.journal {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

#book {
  width: 1000px;
  height: 650px;
}

/* Individual Page */

.page {
  background: white;
  padding: 50px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;

  border-radius: 4px;

  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.06);
}

.page h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-family: "Caveat", cursive;
  font-optical-sizing: auto;
}

.page h2 {
  font-size: 36px;
  margin-bottom: 20px;
  font-family: "Caveat", cursive;
  font-optical-sizing: auto;
}

.page p {
  max-width: 550px;
  line-height: 1.8;
  color: #555;
  font-size: 22px;
  font-family: "Caveat", cursive;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.page span {
  margin-top: 30px;
  color: #888;
  font-size: 15px;
  font-family: "Caveat", cursive;
  font-optical-sizing: auto;
}

/* Cover */

.cover {
  color: white;

  background: linear-gradient(135deg, #111827, #1f2937);
}

.cover h1 {
  color: white;
  font-size: 2.5em;
}

.cover p {
  color: #d1d5db;
}

.end {
  background: #111827;
  color: white;
}

.end p {
  color: #d1d5db;
}

/* Buttons */

.controls {
  display: flex;
  align-items: center;
  margin-top: 10px;

  display: flex;
  gap: 15px;
}

/* Tablet */

@media (max-width: 1024px) {
  #book {
    width: 90vw;
    height: 600px;
  }

  .page {
    padding: 35px;
  }

  .page h1 {
    font-size: 40px;
  }

  .page h2 {
    font-size: 30px;
  }
}

/* Mobile */

@media (max-width: 768px) {
  .journal {
    padding: 20px 10px;
  }

  #book {
    width: 95vw;
    height: 70vh;
  }

  .page {
    padding: 25px;
  }

  .page h1 {
    font-size: 30px;
  }

  .page h2 {
    font-size: 24px;
  }

  .page p {
    font-size: 15px;
    line-height: 1.7;
  }

  .controls {
    width: 95%;
    justify-content: space-between;
  }

  .controls button {
    flex: 1;
  }
}

/* Small Phones */

@media (max-width: 480px) {
  #book {
    height: 65vh;
  }

  .page {
    padding: 20px;
  }

  .page h1 {
    font-size: 24px;
  }

  .page h2 {
    font-size: 20px;
  }

  .page p {
    font-size: 14px;
  }
}
