@font-face {
  font-family: 'DeathNote';
  src: url('../fonts/Death-Note.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DeathNote', sans-serif;
  background: #000000;
  overflow: hidden;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #000000;
  background-image: url('../img/thumbbig-106472.webp');
  background-size: cover;
  background-position: center;
  -webkit-filter: grayscale(1) contrast(.4) brightness(.3);
  filter: grayscale(1) contrast(.4) brightness(.3);
}

.contrastadjust {
  z-index: 3;
  pointer-events: none;
  -webkit-backdrop-filter: contrast(6.5) brightness(5) saturate(.2) brightness(4);
  backdrop-filter: contrast(6.5) brightness(5) saturate(.2) brightness(4);
  position: absolute;
  height: 1000%;
  width: 1000%;
  bottom: 0;
  top: 0;
  right: 0;
  left: 0;
}

.matrix {
  z-index: 2;
  pointer-events: none;
  position: absolute;
  height: 1000%;
  width: 1000%;
  bottom: 0;
  top: 0;
  right: 0;
  opacity: .7;
  left: 0;
  background-image: url('../img/bayer.png');
  background-size: .5em;
  -webkit-filter: contrast(.45);
  filter: contrast(.45);
  background-attachment: fixed;
  text-align: center;
  mix-blend-mode: color-dodge;
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-pixelated;
  image-rendering: pixelated;
}

.matrix2 {
  z-index: 2;
  pointer-events: none;
  position: absolute;
  height: 1000%;
  width: 1000%;
  bottom: 0;
  top: 0;
  right: 0;
  left: 0;
  background: url('../img/grain.gif');
  background-attachment: fixed;
  text-align: center;
  opacity: .025;
  mix-blend-mode: overlay;
  -ms-interpolation-mode: nearest-neighbor !important;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: -moz-crisp-edges !important;
  image-rendering: -o-pixelated !important;
  image-rendering: pixelated !important;
}

.matrix3 {
  z-index: 5;
  pointer-events: none;
  position: absolute;
  height: 1000%;
  width: 1000%;
  bottom: 0;
  top: 0;
  right: 0;
  opacity: 1;
  left: 0;
  -webkit-filter: grayscale();
  filter: grayscale();
  background-image: url('../img/bayer.png');
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-pixelated;
  image-rendering: pixelated;
  background-attachment: fixed;
  mix-blend-mode: color-dodge;
  text-align: center;
}

.loading-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cross {
  width: 60px;
  height: auto;
}

.enter-btn {
  font-family: 'DeathNote', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: #ffffff;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-transform: uppercase;
  display: inline-block;
}

.roster {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  padding: 40px;
  overflow: hidden;
}

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

.roster-box {
  position: relative;
  width: 100%;
  max-width: 900px;
  border: 1px solid #ffffff;
  padding: 40px 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo-break {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #000000;
  padding: 0 12px;
  line-height: 0;
}

.logo-break img {
  width: 90px;
  height: auto;
  display: block;
}

.roster-small {
  width: 60px;
  height: auto;
}

.member-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 16px;
  width: 100%;
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: calc(25% - 12px);
}

.member-box {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #ffffff;
  overflow: hidden;
}

.member-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 150;
}

.roster .matrix,
.roster .matrix3 {
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  background-attachment: scroll;
  background-size: .5em;
  -webkit-filter: contrast(.45);
  filter: contrast(.45);
}

.member-name {
  color: #ffffff;
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.hidden-btn {
  position: fixed;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  z-index: 200;
  background: transparent;
  border: none;
  cursor: pointer;
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

.flash.show {
  opacity: 1;
}

.flash img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.flash.show {
  opacity: 1;
}

.flash img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.flash.show img {
  opacity: .7;
}

.chaos {
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow: hidden;
  pointer-events: none;
}

.chaos video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chaos-img {
  position: absolute;
  animation: chaos-pulse 0.4s ease-in-out infinite;
}

@keyframes chaos-pulse {
  0%, 100% { transform: scale(1) rotate(var(--rot, 0deg)); }
  50% { transform: scale(1.3) rotate(var(--rot, 0deg)); }
}

.chaos-screen-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 0, 0.3);
  animation: chaos-flash 0.3s ease-in-out infinite;
}

@keyframes chaos-flash {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.archives-btn {
  font-family: 'DeathNote', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  padding: 10px 24px;
  cursor: pointer;
  text-transform: uppercase;
  display: inline-block;
  transition: background 0.3s ease, color 0.3s ease;
}

.archives-btn:hover {
  background: #ffffff;
  color: #000000;
}

.archives-btn.back {
  border: none;
  letter-spacing: 3px;
}

.roster-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.now-playing {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  text-align: center;
  pointer-events: none;
}

.np-text {
  font-family: Helvetica, Arial, sans-serif;
  color: #ffffff;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.imgs,
.gallery {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  padding: 40px;
  overflow: hidden;
}

.imgs.active,
.gallery.active {
  opacity: 1;
  pointer-events: auto;
}

.imgs .archives-box {
  position: relative;
  z-index: 10;
}

.file-tree {
  width: 100%;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  color: #ffffff;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tree-row:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tree-row.tree-folder {
  font-weight: bold;
}

.tree-toggle {
  width: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.tree-name {
  word-break: break-all;
}

.tree-children {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.tree-children.hidden {
  display: none;
}

.tree-file-link {
  color: #ffffff;
  text-decoration: none;
  word-break: break-all;
}

.tree-file-link:hover {
  color: #aaaaaa;
}

.archives {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  padding: 40px;
  overflow: hidden;
}

.archives.active {
  opacity: 1;
  pointer-events: auto;
}

.archives-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  border: 1px solid #ffffff;
  padding: 48px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.archives-scroll {
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.archives-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  color: #ffffff;
  transition: background 0.2s ease;
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.archive-title {
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.archive-date {
  font-size: 0.7rem;
  letter-spacing: 2px;
  opacity: 0.6;
  white-space: nowrap;
}

.viewer {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  padding: 40px;
  overflow: hidden;
}

.viewer.active {
  opacity: 1;
  pointer-events: auto;
}

.viewer-box {
  width: 100%;
  max-width: 1200px;
  max-height: 80vh;
  border: 1px solid #ffffff;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.viewer-zoom {
  display: flex;
  gap: 8px;
}

.zoom-btn {
  font-family: 'DeathNote', sans-serif;
  font-size: 1rem;
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.zoom-btn:hover {
  background: #ffffff;
  color: #000000;
}

.viewer-title {
  color: #ffffff;
  font-size: 1.1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.viewer-date {
  color: #ffffff;
  font-size: 0.7rem;
  letter-spacing: 2px;
  opacity: 0.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 12px;
}

.viewer-content {
  font-family: Georgia, 'Times New Roman', serif;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.8;
  letter-spacing: 1px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.viewer-content p {
  margin-bottom: 12px;
}

.viewer .archives-btn.back {
  align-self: center;
  margin-top: 8px;
}

.archives-scroll::-webkit-scrollbar,
.viewer-box::-webkit-scrollbar {
  width: 4px;
}

.archives-scroll::-webkit-scrollbar-track,
.viewer-box::-webkit-scrollbar-track {
  background: transparent;
}

.archives-scroll::-webkit-scrollbar-thumb,
.viewer-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
}

.archives-scroll::-webkit-scrollbar-thumb:hover,
.viewer-box::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.8);
}

.archives-scroll,
.viewer-box {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}
