:root {
  --accent: #e4b84b;
  --panel: rgba(0, 0, 0, 0.6);
}

html,
body {
  height: 100%;
  margin: 0;
  background-image: url(media/bg.webp);
  background-size: cover;
  font-family: Inter, Arial, sans-serif;
  color: #fff;
}

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 1000;
  background: transparent;
}

.topnav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  mask: linear-gradient(black, black, transparent);
  overflow: visible;
  pointer-events: none;
}

.symbol img {
  position: fixed;
  margin-top: -30px;
  margin-left: -10px;
  width: auto;
  height: 70px;
  filter: brightness(1) saturate(100%);
  transition: 0.3s ease;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
  margin-top: -20px;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  transition: color 0.3s;
  text-shadow: 0px 0px 5px #000000;
}

.nav-links a:hover {
  color: #e4b84b;
}

.symbol a img:hover {
  filter: brightness(0.5) saturate(100%) sepia(1) hue-rotate(5deg) brightness(1.2) saturate(250%);
  transition: 0.3s ease;
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.fade-in.visible {
  opacity: 1;
}

.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  position: relative;
}

#book {
  margin: 0 auto;
  background: transparent;
  overflow: hidden;
  visibility: hidden;
}

#book>div {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: none;
  color: #fff;
  font-size: 2rem;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s ease;
  filter: drop-shadow(0px 0px 5px black);
}

.nav-btn:hover {
  color: #e4b84b;
  transition: 0.3s ease;
}

.nav-left {
  left: 15vw;
}

.nav-right {
  right: 15vw;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.loader::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 6px solid #fff;
  border-top: 6px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.view-toggle {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  gap: 8px;
}

.view-toggle button {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.view-toggle button.active {
  background: var(--accent);
  color: #111;
  font-weight: 600;
}

.progress-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 12px;
  border-radius: 3px;
}

.progress-wrap .range {
  width: 420px;
  max-width: 60vw;
}

.progress-info {
  min-width: 80px;
  text-align: right;
  font-size: 0.95rem;
  color: #fff;
}

input[type="range"] {
  width: 100%;
}

#spreadRange {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgb(49, 49, 49);
  border-radius: 3px;
  outline: none;
}

#spreadRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #e4b84b;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

#spreadRange::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #e4b84b;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

#spreadRange::-ms-thumb {
  width: 16px;
  height: 16px;
  background: #e4b84b;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

@media (max-width: 600px) {
  .nav-left {
  left: 1vw;
}

.nav-right {
  right: 1vw;
}

  .view-toggle {
    display: none !important;
  }

}
