/* ── Splash: compact game thumbnail strip ── */

.game-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.game-thumb {
  position: relative;
  width: 200px;
  aspect-ratio: 16 / 9;
  border: none;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  flex-shrink: 0;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.game-thumb:hover img,
.game-thumb:focus-visible img {
  transform: scale(1.04);
  filter: brightness(0.6);
}

.game-thumb:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.game-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.65rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

.game-thumb-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.game-thumb-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  opacity: 0;
  transition: opacity 0.2s;
}

.game-thumb:hover .game-thumb-meta,
.game-thumb:focus-visible .game-thumb-meta {
  opacity: 1;
}

/* ── Modal backdrop ── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none;
}

/* ── Modal box ── */

.modal-box {
  position: relative;
  background: var(--bg-card);
  border-radius: 8px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 0 0.5rem 0.5rem;
  z-index: 1;
}

.modal-close:hover { color: var(--text-primary); }

/* ── Modal content panels (one per game) ── */

.modal-content {
  display: none;
}

.modal-content.active {
  display: block;
}

.modal-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.modal-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.modal-content ul {
  padding-left: 1.25rem;
  color: var(--text-body);
  font-size: 0.95rem;
  margin: 1rem 0;
}

.modal-content ul li {
  margin-bottom: 0.35rem;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

/* ── Slideshow (used inside modal) ── */

.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.slides img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #222;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}

.slide-btn.prev { left: 0.5rem; }
.slide-btn.next { right: 0.5rem; }

.slideshow:hover .slide-btn,
.slideshow:focus-within .slide-btn {
  opacity: 1;
}

.slide-btn:hover { background: rgba(0,0,0,0.8); }

.slideshow[data-count="1"] .slide-btn { display: none; }

.slide-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  z-index: 2;
}

.slide-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.slide-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ── Responsive ── */

@media (max-width: 500px) {
  .game-thumb { width: 100%; }
  .modal-box  { padding: 1.25rem; }
}
