:root {
  --bg: #05050a;
  --panel: rgba(5, 5, 10, 0.78);
  --line: rgba(110, 252, 232, 0.22);
  --text: #fff;
  --muted: #c7c4d8;
  --cyan: #14f195;
  --teal: #6efce8;
  --purple: #9945ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(
      circle at 18% 10%,
      rgba(20, 241, 149, 0.18),
      transparent 30rem
    ),
    radial-gradient(
      circle at 78% 18%,
      rgba(153, 69, 255, 0.22),
      transparent 34rem
    ),
    linear-gradient(180deg, #080812, var(--bg));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.hero-overlay {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  padding: 0;
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px 18px;
  border-top: 2px solid #000;
  background: rgb(204, 255, 0);
  color: #05050a;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
}

.hero-content h1 {
  margin: 0;
  color: #05050a;
  font-size: clamp(1.6rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 1000;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.hero-content h1 small {
  font-size: 0.42em;
  font-weight: 1000;
  vertical-align: middle;
}

.hero-content h1 strong {
  font-size: 1.28em;
}

.hero-content p {
  margin: 0;
  color: #272435;
  font-size: 0.78rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#count {
  min-width: max-content;
  color: #5d22ce;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.social-links {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 11;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.social-links a {
  min-width: 112px;
  padding: 9px 14px;
  border: 2px solid #05050a;
  border-radius: 999px;
  color: #05050a;
  background: rgb(204, 255, 0);
  font-size: 0.78rem;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #05050a;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #05050a;
}

#status.is-ok {
  color: var(--cyan);
}
#status.is-error {
  color: #ff7fa8;
}

.wall {
  display: grid;
  grid-template-columns: repeat(var(--columns, 8), 1fr);
  grid-auto-rows: calc(100vw / var(--columns, 8));
  gap: 0;
  padding: 0;
  position: relative;
  z-index: 0;
  grid-auto-flow: dense;
  min-height: 100vh;
}

.tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(
      circle at 50% 62%,
      rgba(20, 241, 149, 0.11),
      transparent 48%
    ),
    rgba(12, 13, 28, 0.72);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.tile:hover,
.tile:focus-visible {
  z-index: 2;
  transform: scale(1.08);
  outline: 0;
  background: radial-gradient(
      circle at 50% 60%,
      rgba(110, 252, 232, 0.22),
      transparent 52%
    ),
    rgba(18, 16, 39, 0.96);
  box-shadow: 0 0 0 1px rgba(110, 252, 232, 0.45),
    0 18px 44px rgba(0, 0, 0, 0.45);
}

.tile.is-copied {
  box-shadow: inset 0 0 0 2px var(--cyan), 0 0 34px rgba(20, 241, 149, 0.36);
}

.tile-main {
  grid-column: var(--main-column-start, 1) / span var(--main-span, 4);
  grid-row: span var(--main-span, 4);
}

.tile img {
  width: 98%;
  height: 98%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.38));
  pointer-events: none;
}

.tile span {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.63rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.tile:hover span,
.tile:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .hero-overlay {
    padding: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 10px 9px;
    text-align: center;
  }

  .hero-content h1 {
    white-space: normal;
  }

  .hero-content h1 small {
    display: block;
    font-size: 0.5em;
  }

  .hero-content h1 strong {
    font-size: 1.18em;
  }

  .social-links {
    top: 8px;
    right: 8px;
  }

  .social-links a {
    min-width: 0;
    padding: 8px 10px;
  }

  .wall {
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    grid-auto-rows: calc(100vw / var(--columns, 3));
  }
}
