/* ================================================================
   TRELLUS — overlay ze szczegółami gry (Galeria / Stream / YouTube)
   ================================================================ */
.game-detail {
  position: fixed;
  inset: 0;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(183,63,255,0.16) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(61,244,255,0.12) 0%, transparent 60%),
    #05040b;
  transition: opacity 0.5s cubic-bezier(0.22,1,0.36,1);
}

body.game-detail-open .game-detail {
  opacity: 1;
  pointer-events: auto;
}

.game-detail-close {
  position: fixed;
  top: 1.5rem;
  right: 1.75rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: rgba(255,255,255,0.05);
  color: var(--text, #eef0ff);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.game-detail-close:hover {
  background: rgba(255,45,80,0.18);
  border-color: rgba(255,45,80,0.4);
  transform: rotate(90deg);
}

.game-detail-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6.5rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.game-detail-cover {
  width: 100%;
  height: 260px;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.game-detail-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-detail-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: #f5f6ff;
}

.game-detail-desc {
  color: var(--muted, #8b8eb8);
  max-width: 640px;
  line-height: 1.7;
}

.game-detail-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.gd-tab {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #8b8eb8);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.gd-tab:hover { color: var(--text, #eef0ff); }
.gd-tab.active {
  color: var(--text, #eef0ff);
  background: rgba(61,244,255,0.12);
  border-color: rgba(61,244,255,0.3);
}

.game-detail-panels { min-height: 220px; }

.gd-panel { display: none; }
.gd-panel.active { display: block; animation: gdFade 0.4s ease; }

@keyframes gdFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gd-empty {
  color: rgba(255,255,255,0.35);
  font-size: 0.95rem;
}

#gd-panel-gallery.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

#gd-panel-stream.active {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.gd-stream-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#gd-panel-youtube.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gd-gallery-item {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  aspect-ratio: 4 / 3;
}
.gd-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.gd-gallery-item:hover img { transform: scale(1.06); }

.gd-yt-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.gd-yt-item iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .game-detail-inner { padding: 5.5rem 1.25rem 3rem; }
  .game-detail-cover { height: 160px; border-radius: 18px; }
}
