/* Torrent page */

.torrent-page {
  max-width: 100%;
}

.torrent-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.torrent-title {
  margin: 0;
  flex: 1 1 auto;
}

.torrent-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent, #1d781d);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s ease;
}

.torrent-download-btn:hover {
  filter: brightness(1.12);
  text-decoration: none;
}

.torrent-description {
  margin-bottom: 1.5rem;
}

/* Image grid */

.torrent-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
}

.torrent-gallery__item {
  display: flex;
  flex-direction: column;
}

.torrent-gallery__item img {
  width: 100%;
  height: auto;
  display: block;
}

.torrent-gallery__name {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  font-family: monospace;
  word-break: break-all;
  color: var(--color-secondary, #888);
}

/* Torrent list */

.torrent-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.torrent-list__item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.torrent-list__link {
  font-weight: 500;
}

.torrent-list__count {
  font-size: 0.8rem;
  color: var(--color-secondary, #888);
}

@media (max-width: 480px) {
  .torrent-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .torrent-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
