/* Bangers */
@font-face {
  font-family: 'Bangers';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/bangers-v25-latin-regular.woff2') format('woff2');
  font-display: swap;
}

/* Permanent Marker */
@font-face {
  font-family: 'Permanent Marker';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/permanent-marker-v16-latin-regular.woff2') format('woff2');
  font-display: swap;
}

/* Comic Neue */
@font-face {
  font-family: 'Comic Neue';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/comic-neue-v6-latin-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Comic Neue';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/comic-neue-v6-latin-700.woff2') format('woff2');
  font-display: swap;
}

:root {
  --brown: #8B4513;
  --gold: #FFD700;
}

body {
  margin: 0;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1.5rem; /* ← EQUAL LEFT/RIGHT */
  box-sizing: border-box;
  font-family: 'Comic Neue', cursive;
  touch-action: pan-x pan-y pinch-zoom;
}

.viewer {
  text-align: center;
  width: 100%;
  max-width: 100%;
  padding: 0 0.5rem; /* ← EXTRA BREATHING ROOM */
  box-sizing: border-box;
}

img {
  max-width: calc(100vw - 3rem - 20px); /* 3rem = 1.5rem left + 1.5rem right */
  max-height: 95vh;
  width: auto;
  height: auto;
  border: 10px solid var(--brown);
  border-radius: 1.5rem;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  transition: transform 0.2s ease;
  touch-action: pan-x pan-y pinch-zoom;
}

img:hover {
  transform: scale(1.02);
}

.back {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--gold);
  color: var(--brown);
  padding: .8rem 1.5rem;
  border-radius: 1rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-family: 'Bangers', cursive;
  letter-spacing: 0.1rem;
  z-index: 10;
}

.back:hover {
  background: #e6c200;
}

/* Mobile Fine-Tuning */
@media (max-width: 480px) {
  body {
    padding: 2rem 1rem; /* Tighter but still symmetric */
  }
  .viewer {
    padding: 0 0.3rem;
  }
  img {
    max-width: calc(100vw - 2rem - 16px); /* 8px border */
    border: 8px solid var(--brown);
    border-radius: 1rem;
  }
  .back {
    top: 15px;
    left: 15px;
    padding: .6rem 1.2rem;
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  img {
    max-width: 100%;
    max-height: none;
  }
}