@import url('https://fonts.googleapis.com/css2?family=VT323&family=Comic+Papyrus&display=swap');
@font-face {
  font-family: 'KiwiSoda';
  src: url('../Fonts/KiwiSoda.ttf') format('truetype');
}
body {
  background: url('../../Icons/tile_masks.png') repeat, #300000;
  color: #FFDAB9;
  font-family: 'VT323', monospace;
  font-size: 16px;
  margin: 0;
  text-shadow: 2px 2px 3px #000;
  cursor: url('https://cur.cursors-4u.net/games/gam-13/gam1232.cur'), auto;
}
#container {
  width: 900px;
  max-height: 95vh;
  margin: 2.5vh auto;
  background-color: #200000;
  border: 6px solid #000;
  box-shadow: 0 0 12px #FF4500;
  padding: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
header {
  text-align: center;
  margin-bottom: 10px;
}
header h1 {
  font-family: 'Comic Papyrus', cursive;
  font-size: 2.5rem;
  color: #FFDAB9;
  text-shadow: 3px 3px 3px #000;
  background: #4B0000;
  padding: 8px;
  border: 2px solid #000;
  border-radius: 6px;
  position: relative;
  animation: glitch 2s infinite;
  animation-play-state: paused;
}
header h1:hover { animation-play-state: running; }
header h1::before, header h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip: rect(0, 900px, 0, 0);
}
header h1::before {
  color: #FF4500;
  animation: glitch-top 1s infinite;
  animation-play-state: paused;
}
header h1::after {
  color: #FFDAB9;
  animation: glitch-bottom 1.5s infinite;
  animation-play-state: paused;
}
header h1:hover::before, header h1:hover::after {
  animation-play-state: running;
}
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, 2px); }
  100% { transform: translate(0); }
}
@keyframes glitch-top {
  0% { clip: rect(0, 900px, 0, 0); transform: translate(-2px, 0); }
  20% { clip: rect(20px, 900px, 30px, 0); transform: translate(2px, 0); }
  40% { clip: rect(40px, 900px, 50px, 0); transform: translate(-2px, 0); }
  60% { clip: rect(60px, 900px, 70px, 0); transform: translate(2px, 0); }
  80% { clip: rect(80px, 900px, 90px, 0); transform: translate(-2px, 0); }
  100% { clip: rect(0, 900px, 0, 0); transform: translate(0); }
}
@keyframes glitch-bottom {
  0% { clip: rect(0, 900px, 0, 0); transform: translate(2px, 0); }
  20% { clip: rect(30px, 900px, 40px, 0); transform: translate(-2px, 0); }
  40% { clip: rect(50px, 900px, 60px, 0); transform: translate(2px, 0); }
  60% { clip: rect(70px, 900px, 80px, 0); transform: translate(-2px, 0); }
  80% { clip: rect(90px, 900px, 100px, 0); transform: translate(2px, 0); }
  100% { clip: rect(0, 900px, 0, 0); transform: translate(0); }
}
nav#nav-container {
  background: linear-gradient(to right, #4B0000, #800000);
  border: 5px solid #000;
  border-radius: 10px;
  padding: 5px;
  text-align: center;
  display: flex;
  justify-content: center;
  box-shadow: 0 0 10px #FF4500;
  flex: 2;
}
nav#nav-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  justify-content: space-between;
}
nav#nav-container li {
  flex: 1;
  border-right: 1px solid #000;
}
nav#nav-container li:last-child { border-right: none; }
nav#nav-container a {
  color: #FFDAB9;
  text-decoration: none;
  font-family: 'VT323', monospace;
  font-size: 16px;
  padding: 10px 0;
  display: block;
  transition: background 0.2s, transform 0.1s, box-shadow 0.1s, text-shadow 0.2s;
  box-shadow: 0 4px 0 #000;
  text-shadow: 2px 2px 3px #000;
  animation: rune-glow 5s ease-in-out infinite;
}
nav#nav-container a:hover {
  animation: none;
  background: rgba(255, 218, 185, 0.2);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #000;
  text-shadow: 0 0 5px #FFDAB9;
}
@keyframes rune-glow {
  0% { text-shadow: 0 0 5px #FFDAB9, 0 0 10px #FFDAB9, 0 0 15px #FF4500; opacity: 0.8; }
  50% { text-shadow: 0 0 10px #FFDAB9, 0 0 20px #FFDAB9, 0 0 30px #FF4500; opacity: 1; }
  100% { text-shadow: 0 0 5px #FFDAB9, 0 0 10px #FFDAB9, 0 0 15px #FF4500; opacity: 0.8; }
}
nav#social-nav-container {
  background: linear-gradient(to right, #4B0000, #800000);
  border: 3px solid #000;
  border-radius: 8px;
  padding: 5px;
  text-align: center;
  display: flex;
  justify-content: center;
  box-shadow: 0 0 8px #FF4500;
  flex: 1;
}
nav#social-nav-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px;
}
nav#social-nav-container a {
  display: block;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}
nav#social-nav-container img {
  width: 32px;
  height: 32px;
}
nav#social-nav-container a:hover img {
  transform: scale(1.2);
  filter: brightness(1.3);
  box-shadow: 0 0 8px #FFDAB9;
}
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
  padding: 5px;
  background: #4B0000;
  border: 3px solid #000;
  border-radius: 6px;
  box-shadow: 0 0 8px #FF4500;
}
#toggle-nsfw {
  background: #FF4500;
  color: #300000;
  border: 3px solid #000;
  padding: 8px 12px;
  cursor: url('https://cur.cursors-4u.net/games/gam-13/gam1232.cur'), pointer;
  box-shadow: 3px 3px 0 #000;
  font-family: 'Comic Papyrus', cursive;
  font-size: 14px;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  animation: pulse 2s infinite;
}
#toggle-nsfw:hover {
  background: #FFDAB9;
  animation: none;
  transform: scale(1.1);
  box-shadow: 0 0 10px #FFDAB9;
}
#sort-select {
  background: #4B0000;
  border: 3px solid #000;
  color: #FFDAB9;
  font-family: 'VT323', monospace;
  font-size: 14px;
  padding: 5px 10px;
  cursor: url('https://cur.cursors-4u.net/games/gam-13/gam1232.cur'), pointer;
  box-shadow: 0 0 5px #FF4500;
  transition: background 0.2s;
}
#sort-select:hover {
  background: rgba(255, 218, 185, 0.2);
}
.gallery-grid-container {
  flex: 1;
  overflow-y: auto;
  background: #200000;
  border: 4px solid #000;
  box-shadow: inset 0 0 5px #FF4500;
  padding: 10px;
  margin-top: 10px;
}
.gallery-grid-container::-webkit-scrollbar {
  width: 10px;
}
.gallery-grid-container::-webkit-scrollbar-track {
  background: #300000;
  border: 1px solid #000;
}
.gallery-grid-container::-webkit-scrollbar-thumb {
  background: #FF4500;
  border: 1px solid #000;
}
.gallery-grid-container::-webkit-scrollbar-thumb:hover {
  background: #FFDAB9;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  text-align: center;
  padding-bottom: 30px;
}
.gallery-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #4B0000;
  border: 4px solid #000;
  box-shadow: 0 0 8px #FF4500;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: url('https://cur.cursors-4u.net/games/gam-13/gam1232.cur'), pointer;
}
.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #FFDAB9;
}
.image-caption {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #200000;
  color: #FFDAB9;
  font-family: 'Comic Papyrus', cursive;
  font-size: 1rem;
  padding: 5px 10px;
  border: 3px solid #000;
  box-shadow: 0 0 5px #FF4500;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .image-caption { opacity: 1; }
.nsfw-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 0, 0, 0.7);
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 0.8rem;
  padding: 2px 6px;
  border: 2px solid #000;
  box-shadow: 0 0 5px #FF0000;
  text-shadow: 1px 1px 2px #000;
}
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(48, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 300;
}
.lightbox-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 1200px;
}
.lightbox-content {
  display: flex;
  width: 100%;
  gap: 20px;
}
.lightbox-image-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lightbox img {
  max-width: 100%;
  max-height: 70vh;
  border: 4px solid #000;
  box-shadow: 0 0 15px #FF4500;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 3px solid #000;
  border-radius: 50%;
  cursor: url('https://cur.cursors-4u.net/games/gam-13/gam1232.cur'), pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 10px #FFDAB9;
}
.lightbox-arrow.prev {
  left: -60px;
  background: url('../Icons/left_arrow.gif') no-repeat center / cover;
}
.lightbox-arrow.next {
  right: -60px;
  background: url('../Icons/right_arrow.gif') no-repeat center / cover;
}
@keyframes pulse {
  0% { box-shadow: 0 0 8px #FF4500; }
  50% { box-shadow: 0 0 16px #FF4500, 0 0 24px #FFDAB9; }
  100% { box-shadow: 0 0 8px #FF4500; }
}
@media (max-width: 920px) {
  #container {
    width: 95%;
    max-height: 95vh;
    padding: 10px;
  }
  .gallery-controls {
    flex-direction: column;
    gap: 10px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .gallery-image { height: 150px; }
  .gallery-item { padding-bottom: 25px; }
  .image-caption {
    font-size: 0.8rem;
    padding: 4px 8px;
    bottom: 5px;
  }
  .lightbox img {
    max-width: 80%;
    max-height: 60vh;
  }
  .lightbox-arrow {
    width: 30px;
    height: 30px;
  }
  .lightbox-arrow.prev { left: -40px; }
  .lightbox-arrow.next { right: -40px; }
  .lightbox-content {
    flex-direction: column;
    gap: 10px;
  }
  .lightbox-image-wrapper {
    max-width: 100%;
    width: 100%;
  }
}