* {
  box-sizing: border-box;
}
/* --------------------- */
/* 🎨 BASIC STYLES       */
/* --------------------- */

body {
  margin: 0;
  height: 100vh;
  background: url('p&p.gif') no-repeat center center fixed;
  background-size: cover;
  background-color: #fbe0c3; /* soft peach */
  animation: fadeInBg 5s ease-in-out infinite alternate;
  font-family: 'Georgia', serif;
  color: #4d014f; /* deep purple text */
}

/* Background animation */
@keyframes fadeInBg {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* --------------------- */
/* 🔠 HEADER             */
/* --------------------- */

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
  padding: 1rem;
  background-color: #4d014f;
  color: #fbe0c3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* optional drop shadow */
}


/* Navigation links */
nav a {
  margin: 0 10px;
  color: #fbe0c3;
  text-decoration: none;
}

/* --------------------- */
/* 📦 LAYOUT CONTAINER   */
/* --------------------- */

.container {
  display: flex;
  align-items: flex-start;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
  padding-top: 20rem; /* moves content down from header */
}

/* --------------------- */
/* 📚 MAIN CONTENT       */
/* --------------------- */

.main-content {
  width: 70%;
  padding-right: 1rem;
  padding-left: 1rem; /* ⬅️ This pushes text right */
  max-height: 80vh;
  overflow-y: auto;
}


/* Collapsible book entries */
details {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 1rem;
  border-radius: 4px;
}

summary {
  cursor: pointer;
  font-weight: bold;
}

.content {
  margin-top: 10px;
}

/* --------------------- */
/* 🖼️ SIDEBAR (BOOKS)     */
/* --------------------- */

.sidebar {
  width: 30%;
  padding-left: 1rem;
  max-height: 80vh;
  overflow-y: auto;

  /* display book covers in 2 or 3 columns */
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* change to 3 for 3 columns */
  gap: 0.5rem;
}

/* Book cover images */
.sidebar img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

/* --------------------- */
/* 🖱️ SCROLLBARS         */
/* --------------------- */

/* Pretty scrollbars for WebKit browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #fbe0c3;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #4d014f;
  border-radius: 10px;
  border: 3px solid #fbe0c3;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #ff9900;
}

.top-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 224, 195, 0.95); /* soft peach */
  padding: 0.75rem;
  border-bottom: 2px solid #ff9900;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Styled tab-like links */
.top-buttons a {
  background: linear-gradient(to bottom, #fbe0c3, #ffd9aa);
  color: #4d014f;
  padding: 0.6rem 1.2rem;
  border: 2px solid #ff9900;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  position: relative;
  top: 2px;
}

/* Hover & active tab effect */
.top-buttons a:hover,
.top-buttons a:hover,
.top-buttons a:focus {
  background: linear-gradient(to bottom, #e5c9e5, #d6a3d6); /* light lavender to deeper purple */
  color: #4d014f; /* deep plum text stays consistent */
  top: 0;
  box-shadow: 0 6px 12px rgba(77, 1, 79, 0.3); /* soft purple glow */
}

.top-buttons a.active-tab {
  background: linear-gradient(to bottom, #fff0dd, #ffd4a3);
  color: #4d014f;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  top: 0;
}
@keyframes glow {
  0% { box-shadow: 0 0 5px #c27ba0; }
  100% { box-shadow: 0 0 15px #4d014f; }
}

.top-buttons a:hover {
  animation: glow 0.4s alternate infinite;
}