/* Game Page Specific Styles */

#game-content {
  padding-top: 120px;
  padding-bottom: 48px;
}

.game-details {
  margin-bottom: 32px;
}

.game-details h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.rating, .category {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating i, .category i {
  color: var(--secondary-color);
}

.game-iframe-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  background-color: #000;
}

#game-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#game-iframe iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 10;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.game-description {
  margin-bottom: 32px;
}

.game-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.fullscreen-btn i {
  margin-right: 8px;
}

/* Related Games */
#related-games {
  background-color: var(--light-gray);
  padding: 64px 0;
}

.games-slider {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: none; /* For Firefox */
  -ms-overflow-style: none; /* For Internet Explorer and Edge */
  scroll-behavior: smooth;
}

.games-slider::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, and Opera */
}

.slider-game-card {
  min-width: 280px;
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed) ease;
}

.slider-game-card:hover {
  transform: translateY(-8px);
}

.slider-game-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.slider-game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.slider-game-card:hover .slider-game-image img {
  transform: scale(1.05);
}

.slider-game-card h3 {
  padding: 16px 16px 8px;
  font-size: 1.125rem;
}

.slider-game-card .btn {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
}

.slider-arrows {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.arrow {
  background-color: var(--primary-color);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.arrow:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

/* Fullscreen mode */
.fullscreen-game #game-iframe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .game-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .game-iframe-container {
    padding-bottom: 75%; /* 4:3 aspect ratio for smaller screens */
  }
  
  .game-controls {
    flex-direction: column;
  }
}