* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000000;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

header {
  position: fixed;
  top: 30px;
  left: 40px;
  right: 40px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 36px;
  margin: 0;
  letter-spacing: -1px;
}

#authorsBtn {
  background: transparent;
  color: white;
  border: 1px solid white;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
}

#bookField {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
        #connectionLayer {
          position: absolute;
          inset: 0;
          width: 100%;
          height: 100%;
          pointer-events: none;
          z-index: 1;
        }

        .connection-line {
          stroke: white;
          stroke-width: 1;
          opacity: 0.6;
        }

        .book {
          z-index: 5;
          border: 1px solid rgba(255, 255, 255, 0);
        }

        .book.author-active {
          border: 1px solid white;
          box-shadow: 0 0 0 1px white;
        }

.book {
  position: absolute;
  width: 58px;
  height: 84px;
  object-fit: cover;
  cursor: pointer;
  transition: scale 0.3s ease, opacity 0.3s ease;
  animation: floatBook 12s infinite alternate ease-in-out;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0);
}

.book:hover {
  scale: 1.35;
  z-index: 20;
}

@keyframes floatBook {
  from {
    translate: 0 0;
  }
  to {
    translate: 30px -40px;
  }
}


.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  position: fixed;
  left: 50%;
  bottom: 45px;
  transform: translateX(-50%);
  width: min(720px, 80vw);
  height: 46px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 30;
  transition: all 0.45s ease;
}

.search-box.active {
  bottom: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, 86vw);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: black;
  font-size: 16px;
  font-weight: 600;
}

.search-box button {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.results {
  position: fixed;
  top: calc(50% + 40px);
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 82vw);
  max-height: 260px;
  overflow-y: auto;
  z-index: 30;
  display: none;
}

.results.active {
  display: block;
}

.result-item {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
}

.result-item:hover {
  background: rgba(255,255,255,0.1);
}

.result-title {
  font-size: 18px;
  font-weight: 700;
}

.result-author {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
}

.authors-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  height: 100vh;
  background: #111;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding: 40px;
  z-index: 50;
  transition: right 0.4s ease;
  overflow-y: auto;
}

.authors-panel.active {
  right: 0;
}

.authors-panel h2 {
  margin-top: 20px;
  font-size: 36px;
}

#closeAuthors {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  color: white;
  border: none;
  font-size: 36px;
  cursor: pointer;
}

.author-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  font-size: 18px;
}

.author-item:hover {
  opacity: 0.6;
}

.flowchart-page {
  background: #000000;
  color: white;
  min-height: 100vh;
  overflow: auto;
}


.back-link {
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
}

.back-link:hover {
  background: white;
  color: black;
}


.flowchart-title {
  max-width: 720px;
  margin-bottom: 80px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 16px;
}

.flowchart-title h2 {
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 24px;
}

.flowchart-title p {
  font-size: 18px;
  line-height: 1.5;
  opacity: 0.72;
}
