html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Pixelify Sans", monospace;
  background: #8a8888;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../stuff/cabinet_drawer.PNG") 0 0 / 100% 100% no-repeat;
  opacity: 0.58;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      rgba(0,0,0,0) 58%,
      rgba(0,0,0,0.14) 100%
    );
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

#dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  filter: contrast(1.15);
  opacity: 0.45;
}

.file-viewport {
  position: fixed;
  top: 0;
  left: 10vw;
  width: 80vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 3;
}

.file-track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100vh;
  padding: 0 0 0 150px;
}

.file-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.file {
  position: relative;
  margin-left: -150px;
  cursor: pointer;
  z-index: calc(1000 - var(--i));
  transition: transform 0.35s ease;
}

.file::after {
  content: "";
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 24px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.6), transparent 65%);
  filter: blur(10px);
  opacity: 0.65;
  z-index: -1;
  transition: 0.35s ease;
}

.file:hover::after {
  opacity: 0.9;
  transform: translateX(-50%) scale(0.9);
}

.file img {
  height: 384px;
  display: block;
  pointer-events: none;
  transition: filter 0.35s ease;
}

.file-name {
  position: absolute;
  bottom: 65%;
  left: 45%;
  transform: translateX(-50%);
  width: 60%;
  text-align: center;
  font-size: 1.14rem;
  color: #272424;
  pointer-events: none;
}

.file:hover {
  transform: translateY(-14px);
  z-index: 2000;
}

.file:hover img {
  filter: brightness(1.35) contrast(1.05);
}

.file-link:hover .file {
  transform: translateY(-14px);
  z-index: 2000;
}

.file-link:hover .file img {
  filter: brightness(1.35) contrast(1.05);
}

.cursor-tooltip {
  position: fixed;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  width: 220px;
  background: rgba(18,18,18,0.96);
  border-radius: 6px;
  color: #e6e6e6;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(12px,12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.cursor-tooltip img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

.cursor-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.cursor-tooltip p {
  margin: 0;
  color: #bdbdbd;
  line-height: 1.35;
}

.home-link {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 8px 16px;
  background: rgba(18, 18, 18, 0.85);
  color: #e6e6e6;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 9999;
  transition: all 0.3s ease;
}

.home-link:hover {
  background: rgba(18, 18, 18, 0.95);
  transform: translateX(-2px);
  color: #ffffff;
}

.back-link {
  position: fixed;
  top: 20px;
  left: 100px;
  padding: 8px 16px;
  background: rgba(18, 18, 18, 0.85);
  color: #e6e6e6;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 9999;
  transition: all 0.3s ease;
}

.back-link:hover {
  background: rgba(18, 18, 18, 0.95);
  transform: translateX(-2px);
  color: #ffffff;
}

.drawer-title {
  position: fixed;
  top: 20px;
  right: 20px;
  margin: 0;
  padding: 8px 16px;
  background: rgba(18, 18, 18, 0.85);
  color: #e6e6e6;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 9999;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

.cursor-tooltip.desktop-only {
  display: flex;
}

@media (max-width: 768px), (pointer: coarse) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .mobile-viewer {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    padding: 20px;
  }

  .mobile-info-card {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    max-width: 90%;
    background: rgba(18, 18, 18, 0.96);
    border-radius: 6px;
    color: #e6e6e6;
    font-size: 0.8rem;
    margin-bottom: 30px;
    z-index: 10;
  }

  .mobile-info-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
  }

  .mobile-info-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
  }

  .mobile-info-text p {
    margin: 0;
    color: #bdbdbd;
    line-height: 1.35;
  }

  .mobile-file-container {
    position: relative;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  .mobile-file-container.transitioning {
    opacity: 0;
    transform: scale(0.9);
  }

  .mobile-file-container img {
    height: 280px;
    display: block;
  }

  .mobile-file-name {
    position: absolute;
    bottom: 65%;
    left: 45%;
    transform: translateX(-50%);
    width: 60%;
    text-align: center;
    font-size: 0.95rem;
    color: #272424;
  }

  .mobile-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(18, 18, 18, 0.85);
    border: none;
    border-radius: 50%;
    color: #e6e6e6;
    font-size: 2rem;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-arrow:active {
    background: rgba(18, 18, 18, 0.95);
    transform: translateY(-50%) scale(0.95);
  }

  .left-arrow {
    left: 10px;
  }

  .right-arrow {
    right: 10px;
  }

  .home-link, .back-link {
    font-size: 0.8rem;
    padding: 6px 12px;
    top: 10px;
  }

  .home-link {
    left: 10px;
  }

  .back-link {
    left: 75px;
  }

  .drawer-title {
    font-size: 0.8rem;
    padding: 6px 12px;
    top: 10px;
    right: 10px;
  }
}
