/* Global Styles */
/* --navbar-height: 60px; Adjust this variable if navbar height changes */
:root {
  --navbar-height: 60px; /* Adjust for navbar height */
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 100;
  background-color: #111;
  color: aliceblue;
  line-height: 1.6;
}

a {
  color: aliceblue;
}

input {
  font-family: inherit;
  font-size: inherit;
}

/* Navbar Styles */
.navbar {
  overflow: hidden;
  text-align: center;
  display: flex;
  justify-content: space-evenly;
}

.navbar a {
  color: aliceblue;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  /* background-color: #575757; */
  /* color: white; */
  text-shadow: 0 0 8px aliceblue;
}

.library {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.book-cover {
  max-width: 200px;
  width: 100%;
  height: 266px;
  background-color: #333;
  border-radius: 0;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center; /* centers the title horizontally & vertically */
  position: relative; /* allow absolutely positioned author */
  padding: 10px;
  overflow: hidden;
}

.book-author {
  position: absolute;
  top: 10px;
  color: #ccc;
  font-size: 0.9rem;
  z-index: 2; /* ensure author sits above the cover content */
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Title centered in the middle of the cover */
.book-h1 {
  margin: 0;
  padding: 0 8px;
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.2;
  z-index: 1;
  pointer-events: none;
  color: red;
  text-shadow: 0 0 8px darkred;
}

/* Lastname glowing in red */
.lastname {
  color: rgb(173, 0, 0);
  text-shadow: 0 0 8px rgba(173, 0, 0, 0.9);
  font-weight: 700;
}

.modal {
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Header */
.modal-header {
  height: 50px;
  background-color: #5cb85c;
  color: white;
}

/* Modal Body */
.modal-body {
  height: calc(100% - 50px);
}

.book-area {
  padding: 20px;
  height: 100%;
  background-color: #222;
  color: #fff;
}

/* Modal Content */
.modal-content {
  position: relative;
  background-color: #333;
  margin: 80px auto;
  padding: 0;
  border: 0;
  width: 85%;
  max-width: 640px;
  height: 85%;
  overflow-y: auto;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  animation-name: animatetop;
  animation-duration: 0.4s;
}

/* Add Animation */
@keyframes animatetop {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

/* The Close Button */
.close-modal {
  float: right;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
}

.close-modal:hover,
.close-modal:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Container and Content Styles */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
  min-height: calc(100vh - var(--navbar-height));
  padding-top: 20px;
  padding-bottom: 20px;
}

.lore-container {
  display: flex;
  text-align: center;
  flex-direction: column;
  min-height: calc(100vh - var(--navbar-height));
  padding-top: 20px;
  padding-bottom: 20px;
}

.title {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.container h1 {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.container p {
  margin-bottom: 15px;
}

/* Buttons Styles */
.buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.x-button,
.yt-button,
.bina {
  transition-duration: 0.15s;
  padding: 8px 16px;
  border-radius: 4px;
  border-style: solid;
  border-width: 2px;
  background-color: transparent;
  color: aliceblue;
  cursor: pointer;
  font-weight: bold;
}

.x-button {
  border-color: aqua;
}

.yt-button {
  border-color: rgb(173, 0, 0);
}

.bina {
  border-color: #ff5eea;
}

.x-button:hover {
  background-color: aqua;
  color: #333;
}

.yt-button:hover {
  background-color: rgb(173, 0, 0);
  color: #fff;
}

.bina:hover {
  background-color: #ff5eea;
  @media (max-width: 600px) {
    body {
      margin-left: 10px;
      margin-right: 10px;
    }

    .navbar {
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }

    .navbar a {
      display: block;
      padding: 12px 0;
      font-size: 18px;
      border-bottom: 1px solid #222;
    }

    .title,
    .container h1 {
      font-size: 1.8rem;
      text-align: center;
      padding: 0 10px;
    }

    .buttons {
      flex-direction: column;
    }
  }
  .buttons {
    flex-direction: column;
  }
}
