*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #000;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  overflow-x: hidden;
  overflow-y: auto;
}

.defaced-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.75rem, 3vw, 1.25rem) 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.defaced-message {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(100%, 42rem);
  margin: 0 0 2.5rem;
  padding: 0;
  font-size: clamp(0.7rem, 2.6vw + 0.35rem, 0.95rem);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  color: #fff;
  text-align: left;
  box-sizing: border-box;
}

.site-timer {
  color: #ff1a1a;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.section-red {
  color: #ff1a1a;
}

.tg-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.tg-link:hover {
  color: #ff1a1a;
}

.defaced-art-wrap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(58vw, 720px);
  z-index: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.28;
  mask-image: linear-gradient(to left, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, #000 55%, transparent 100%);
}

.defaced-art {
  margin: 0;
  padding: 1rem 0.75rem 0 0;
  font-size: 10px;
  line-height: 1;
  white-space: pre;
  color: #cfcfcf;
  overflow: hidden;
  text-align: left;
  user-select: none;
  animation: art-pulse-red 2.4s ease-in-out infinite;
}

@keyframes art-pulse-red {
  0%,
  100% {
    color: #cfcfcf;
  }
  50% {
    color: #ff1a1a;
  }
}

.gallery {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  padding: 0 0.5rem 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f0f0f;
  cursor: pointer;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.gallery-empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: #6b6b6b;
  font-size: 0.85rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 1.5rem;
  cursor: zoom-out;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
  .defaced-art-wrap {
    width: 100%;
    opacity: 0.14;
  }

  .defaced-message {
    font-size: clamp(0.68rem, 3.4vw, 0.9rem);
    line-height: 1.4;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  }
}

@media (max-width: 420px) {
  .defaced-page {
    padding: 0.85rem 0.65rem 1.5rem;
  }

  .defaced-message {
    font-size: clamp(0.62rem, 3.8vw, 0.82rem);
  }
}
