/* =============================================
   ARC MASTER GAMES - Game Page Styles
   ============================================= */

/* Game Hero Section */
.game-hero {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.game-hero__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: blur(8px);
}

.game-hero__content {
  position: relative;
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .game-hero__content {
    padding: var(--space-3xl);
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }
}

.game-hero__cover {
  width: 200px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .game-hero__cover {
    width: 250px;
  }
}

.game-hero__info h1 {
  margin-bottom: var(--space-sm);
}

.game-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.game-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.game-hero__meta .separator {
  color: var(--border-color);
}

/* Game Article */
.game-article {
  max-width: 800px;
}

.game-section {
  margin-bottom: var(--space-3xl);
  animation: fadeIn var(--transition-slow) both;
}

.game-section:nth-child(2) { animation-delay: 0.1s; }
.game-section:nth-child(3) { animation-delay: 0.2s; }
.game-section:nth-child(4) { animation-delay: 0.3s; }
.game-section:nth-child(5) { animation-delay: 0.4s; }

.game-section h2 {
  position: relative;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.game-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: var(--radius-full);
}

.game-section p {
  color: var(--text-color);
  line-height: 1.8;
}

/* Info Box */
.game-info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.game-info-box__title {
  font-family: var(--heading-font);
  font-size: 0.85rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

/* Curiosities List */
.curiosities-list {
  list-style: none;
  padding: 0;
}

.curiosities-list li {
  position: relative;
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-2xl);
  margin-bottom: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.curiosities-list li:hover {
  border-color: var(--accent-color);
}

.curiosities-list li::before {
  content: '🎮';
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  font-size: 1rem;
}

/* Screenshot Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.gallery figure:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px var(--shadow-color);
}

.gallery figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity var(--transition-normal);
}

.gallery figure img.loading {
  opacity: 0;
}

.gallery figure img.loaded {
  opacity: 1;
}

.gallery figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.lightbox--open {
  display: flex;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__caption {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  max-width: 600px;
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: var(--space-lg);
}

.lightbox__nav--next {
  right: var(--space-lg);
}

.lightbox__counter {
  position: absolute;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* Game Stats */
.game-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

@media (min-width: 640px) {
  .game-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.game-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.game-stat__value {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  color: var(--accent-color);
  font-weight: 700;
}

.game-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
}

/* Related Games */
.related-games {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-color);
}

.related-games h2 {
  margin-bottom: var(--space-xl);
}

/* ---- Overview com Capa ---- */
.overview-with-cover {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .overview-with-cover {
    flex-direction: row;
  }
}

.overview-cover {
  flex-shrink: 0;
}

.game-cover-img {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
  .game-cover-img {
    width: 250px;
  }
}

.overview-text {
  flex: 1;
}

/* ---- Slideshow ---- */
[data-slideshow] {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slideshow-slide {
  display: none;
  width: 100%;
}

.slideshow-slide--active {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--bg-surface);
}

.slideshow-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.slideshow-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}

/* Barra de controles do slideshow */
.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.6);
}

.slideshow-ctrl-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  padding: 0;
  line-height: 1;
}

.slideshow-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.slideshow-ctrl-btn--pause {
  font-size: 0.7rem;
  letter-spacing: 2px;
}

.slideshow-counter {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-family: var(--heading-font);
  min-width: 50px;
  text-align: center;
}

/* Gameplay Slideshow (página do jogo) */
.gameplay-slideshow {
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border-color);
}

/* Mini slideshow na lista de jogos do console */
.console-game-item__slideshow .slideshow-controls {
  padding: var(--space-xs) var(--space-sm);
  gap: var(--space-sm);
}

.console-game-item__slideshow .slideshow-ctrl-btn {
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
}

.console-game-item__slideshow .slideshow-ctrl-btn--pause {
  font-size: 0.55rem;
}

.console-game-item__slideshow .slideshow-counter {
  font-size: 0.7rem;
  min-width: 35px;
}

/* ---- Console Page: Header Image ---- */
.console-header__image {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.console-header__img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .console-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
  }

  .console-header__image {
    margin-bottom: 0;
  }
}

/* ---- Console Page: Game Item Media ---- */
.console-game-item__media {
  width: 100%;
  overflow: hidden;
}

@media (min-width: 640px) {
  .console-game-item__media {
    width: 320px;
    flex-shrink: 0;
  }
}

.console-game-item__slideshow {
  position: relative;
}

.console-game-item__slideshow .slideshow-slide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.console-game-item__slideshow .slideshow-nav {
  width: 30px;
  height: 30px;
  font-size: 1.2rem;
}
