* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #333;
  /* Applying Muli as the default font for the entire page */
  font-family: 'Muli', sans-serif;
}


/* --- Main Layout Containers --- */
#stage {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start; 
  position: relative;
}
#pdf-canvas {
max-width: 100%;
  max-height: 100%;

  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}


/* --- Navigation Bar (Redesigned) --- */
#deckBar {
  position: fixed !important;
  top: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 100;
  min-height: 65px; 
  padding: 10px 20px;
  
  display: flex;
  justify-content: space-between;
  align-items: center;

  /* MODIFIED: Solid white background and a subtle shadow */
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  
  /* Removed border and backdrop-filter, transition updated */
  /*transition: background-color 0.3s ease, box-shadow 0.3s ease;*/
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-right {
    margin-right: 65px;
}
.nav-left {
    margin-left: 65px;
}

/* Base styles for all buttons */
#deckBar button {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: 'Muli';
}

/* MODIFIED: Chapter buttons are now minimalist */
.chapter-button {
  background-color: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  color: #5B058C; /* A slightly softer text color */
  font-size: 15px;
  font-weight: 400;
}

/* MODIFIED: Active state is now bold and colored */
.chapter-button.active {
  color: #5B058C;
  font-weight: 800; /* Use Muli Bold */
  background-color: transparent; /* Ensure no background on active state */
}

/* Logo button remains distinct */
.logo-button {
  padding: 8px 15px;
  border: none;
  background: none;
  outline: 0;
}

/* Icon buttons remain the same */
.icon-button {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background-color: transparent;
  color: #555;
}
.icon-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}


/* --- Loading Indicators --- */
#loading-overlay {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.2em;
  transition: opacity 0.3s ease-in-out;
}
#loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.spinner {
  border: 5px solid #ccc;
  border-top: 5px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.material-symbols-outlined {
    color: #5B058C;
}

/* --- Conditional/Stateful Styles --- */
body.first-page-view #deckBar {
  background-color: transparent;
  box-shadow: none; /* No shadow on the transparent bar */
}
body.first-page-view #deckBar .chapter-button {
  display: none;
}
body.first-page-view #deckBar .logo-button {
  display: none;
}