/* ---------------- Modern Love Caps Font ---------------- */
@font-face {
  font-family: 'Modern Love Caps';
  src: url('assets/fonts/ModernLoveCaps.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------------- Body & Pages ---------------- */
html, body {
  margin: 0;
  padding: 0;
  background: #000;
  font-family: sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  transition: opacity 1s ease-in-out;
}

body {
  opacity: 0;
}

body.loaded {
  opacity: 1;
}

#main-content {
  display: flex;
  flex-wrap: nowrap;
  width: 100vw;
  height: 100vh;
}

/* ---------------- Content Scroll & Pages ---------------- */
#content {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  width: 100vw;
}

.page {
  scroll-snap-align: start;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.6s ease-in-out;
}

.page.active-page {
  opacity: 1;
}

.page img,
.page video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Mobile videos fill height */
@media (max-width: 768px) {
  .page video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

/* ---------------- Password Screen ---------------- */
#password-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  animation: fadeOverlay 0.8s ease forwards;
}

#password-screen.fade-out {
  animation: fadeOutOverlay 0.6s ease forwards;
}

.password-box {
  background: #111;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
  font-family: 'Modern Love Caps', sans-serif;
  opacity: 0;
  transform: scale(0.9);
  animation: fadeInScale 0.8s ease forwards;
  animation-delay: 0.2s;
}

.password-box h2 {
  margin-bottom: 15px;
  font-size: 28px;
}

.password-box input {
  padding: 10px;
  border: none;
  border-radius: 6px;
  margin-bottom: 10px;
  width: 200px;
  font-family: 'Modern Love Caps', sans-serif;
}

.password-box button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #444;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Modern Love Caps', sans-serif;
}

.password-box button:hover {
  background: #666;
}

#password-error {
  color: #f66;
  margin-top: 10px;
  font-size: 14px;
  font-family: 'Modern Love Caps', sans-serif;
}

/* Animations */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOutOverlay {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ---------------- Sidebar ---------------- */
#sidebar {
  position: fixed;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  padding: 15px;
  border-radius: 16px;
  backdrop-filter: blur(8px);
  max-height: 90vh;
  overflow-y: auto;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.3), rgba(0,0,0,0.5));
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
  pointer-events: none;
}

#sidebar.touch-active {
  opacity: 1;
  pointer-events: auto;
}

#sidebar::-webkit-scrollbar {
  width: 8px;
}

#sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  transition: background 0.3s ease;
}

#sidebar:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.5);
}

#sidebar a {
  position: relative;
  display: block;
}

#sidebar a img {
  width: 150px;
  height: auto;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: transform 0.2s, border-color 0.2s, filter 0.2s;
  object-fit: contain;
  object-position: left;
}

#sidebar a.active img {
  border-color: #fff;
  filter: brightness(2) drop-shadow(0 0 15px #fff);
  transform: scale(1.1);
}

/* Tooltip */
#sidebar a .tooltip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(12px, 2vw, 18px);
  font-weight: bold;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  padding: 5px;
  font-family: 'Modern Love Caps', sans-serif;
  z-index: 5;
}

#sidebar a:hover .tooltip {
  opacity: 1;
}

/* ---------------- Video Play Icon (FIXED CLEAN VERSION) ---------------- */
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 100px;
  color: rgba(255,255,255,0.9);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s, color 0.2s, opacity 0.2s;
  opacity: 1;
}

.play-icon:hover {
  transform: translate(-50%, -50%) scale(1.1);
  color: #fff;
}

/* ---------------- Video Progress Bar ---------------- */
.video-progress {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  cursor: pointer;
  z-index: 15;
}

.video-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.video-progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* ---------------- Audio Button ---------------- */
.audio-label {
  font-family: 'Modern Love Caps', sans-serif;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 25px;
  border-radius: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 1001;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0 30px #fff;
  animation: pulseWhiteSmooth 3s ease-in-out infinite alternate;
  white-space: nowrap;
}

.audio-label.playing {
  animation: pulseRainbowSmooth 3s ease-in-out infinite alternate;
}

/* ---------------- Animations ---------------- */
@keyframes pulseWhiteSmooth {
  0% { box-shadow: 0 0 20px #fff; }
  100% { box-shadow: 0 0 60px #fff; }
}

@keyframes pulseRainbowSmooth {
  0% { box-shadow: 0 0 20px red; }
  16% { box-shadow: 0 0 20px orange; }
  33% { box-shadow: 0 0 20px yellow; }
  50% { box-shadow: 0 0 20px green; }
  66% { box-shadow: 0 0 20px blue; }
  83% { box-shadow: 0 0 20px indigo; }
  100% { box-shadow: 0 0 20px violet; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  #sidebar a img { width: 120px; }
}

@media (max-width: 768px) {
  #sidebar a img { width: 100px; }
  #sidebar { padding: 12px; gap: 10px; left: 10px; }

  .page img,
  .page video {
    width: 100vw;
    height: auto;
    max-height: 100vh;
  }

  .audio-label {
    bottom: 30px;
    right: 15px;
    font-size: 18px;
    padding: 10px 20px;
  }

  .play-icon { font-size: 48px; }

  .video-progress {
    width: 90%;
    left: 5%;
  }
}

@media (max-width: 480px) {
  #sidebar a img { width: 80px; }
  #sidebar { padding: 10px; gap: 8px; left: 5px; }

  .audio-label {
    bottom: 25px;
    right: 10px;
    font-size: 16px;
    padding: 8px 16px;
  }
}