/* Background */
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: url("bg_texture.webp");
  background-size: 10%;
  color: #fcf9f9;
  overflow-x: hidden;
}

.exit_link{
  background-color: antiquewhite;
  background-size: auto;
  padding: 10px;
}

/* Header */
.library-header {
  text-align: center;
  padding: 30px;
  text-shadow: 0 0 10px rgba(83, 6, 225, 0.8);
}

/* Layout */
.library-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  padding: 30px;
}

/* Sections */
.library-section {
  background: url("open_book.png") no-repeat;
  background-size: 100% 100%;
  padding: 30px;
  box-shadow: 20px 20px 50px rgba(3, 1, 3, 0.6);
  animation: float 6s ease-in-out infinite;
}

/* Slight variation so they don't move together */
.library-section:nth-child(2) {
  animation-delay: 1.5s;
}
.library-section:nth-child(3) {
  animation-delay: 3s;
}

/* Headings */
.library-section h2 {
  text-align: center;
  margin-bottom: 15px;
  color: black;
  text-shadow: 0 0 10px rgba(83, 6, 225, 0.8);
}

/* Book links */
.book-list {
  list-style: none;
  padding: 0;
}

.book-list li {
  margin: 10px 0;
}

.book-list a {
  text-decoration: none;
  color: #12091f;
  font-weight: bold;
}

.book-list a:hover {
  text-shadow: 0 0 8px rgb(98, 17, 250);
}

/* Floating animation */
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-30px); }
  100% { transform: translateY(0px); }
}

/* Magical runes drifting */
.floating-runes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("../Gifs/Misc/runes.png");
  opacity: 0.08;
  animation: drift 60s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: 1000px 500px; }
}
