/* NIN Posters Gallery Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Maven Pro', sans-serif;
  background-color: #000;
  color: #fff;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5em;
  font-weight: 600;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 20px;
}

.poster-item {
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.poster-item:hover {
  transform: scale(1.02);
}

.poster-item:active {
  transform: scale(0.98);
}

.poster-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.poster-image:not([src]) {
  opacity: 0;
}

.poster-submitter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 20px 15px 15px;
  font-size: 14px;
}

/* Gallery Modal Styles */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

.gallery-modal.active {
  display: flex;
}

.gallery-content {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image-container {
  display: inline-block;
  max-width: 100%;
  max-height: calc(100% - 40px);
}

.gallery-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 20px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 50%;
  color: #000;
  transition: all 0.2s ease;
  z-index: 1001;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-nav:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav.prev {
  left: 15px;
}

.gallery-nav.next {
  right: 15px;
}

.gallery-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  color: #000;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.gallery-close:active {
  transform: scale(0.95);
}

.gallery-info {
  margin-top: 10px;
  text-align: left;
  color: white;
  font-size: 16px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer a {
  color: var(--text-color);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-color);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  h1 {
    font-size: 2em;
    margin-bottom: 20px;
  }

  .poster-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 15px;
  }

  .poster-image {
    aspect-ratio: 3/4;
  }

  .poster-submitter {
    font-size: 13px;
    padding: 15px 12px 12px;
  }

  .gallery-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .gallery-nav {
    font-size: 18px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
  }

  .gallery-nav.prev {
    left: 10px;
  }

  .gallery-nav.next {
    right: 10px;
  }

  .gallery-close {
    top: 10px;
    right: 10px;
    min-width: 40px;
    min-height: 40px;
    font-size: 18px;
  }

  .gallery-info {
    font-size: 15px;
    margin-top: 8px;
  }

  .footer {
    grid-column: 1 / -1;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }

  h1 {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .poster-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
}

/* Very small screens - single column */
@media (max-width: 360px) {
  .container {
    padding: 8px;
  }

  .poster-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .poster-image {
    aspect-ratio: 3/4;
  }

  .poster-item {
    border-radius: 8px;
  }

  .poster-submitter {
    font-size: 12px;
    padding: 12px 10px 10px;
  }

  .gallery-modal {
    padding: 5px;
  }

  .gallery-content {
    max-width: 98vw;
    max-height: 98vh;
  }

  .gallery-nav {
    min-width: 40px;
    min-height: 40px;
    font-size: 16px;
    padding: 8px 12px;
  }

  .gallery-nav.prev {
    left: 5px;
  }

  .gallery-nav.next {
    right: 5px;
  }

  .gallery-close {
    top: 5px;
    right: 5px;
    min-width: 36px;
    min-height: 36px;
    font-size: 16px;
  }

  .gallery-info {
    font-size: 14px;
    margin-top: 6px;
  }
}