/* Game Page Styles */
.game-page-wrapper {
  background-color: #f8f7fd;
  font-family: "Inter", sans-serif;
  color: #333;
  position: relative;
  min-height: 100vh;
  padding: 0 20px;
}

.game-page-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0;
  position: relative;
  z-index: 1;
}

.game-content-wrapper {
  margin-bottom: 30px;
}

/* Main Content */
.game-main-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
}

.game-content-layout {
  display: flex;
  align-items: flex-start;
}

.central-content {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Game Header */
.game-header {
  margin-bottom: 20px;
  position: relative;
  text-align: center; /* Center the game header */
}

.game-header:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(176, 102, 255, 0.5), rgba(255, 77, 125, 0.5), rgba(176, 102, 255, 0));
}

.game-title-small {
  font-size: 20px;
  color: #333;
  margin: 0 auto; /* Center the title */
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

.game-title-small:before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.game-title-small:hover:before {
  transform: scaleX(1);
}

/* Game Details Section */
.game-details-section {
  display: flex;
  background-color: #fff;
  border-radius: 20px;
  overflow: hidden;
  padding: 30px;
  gap: 25px;
  box-shadow: 0 10px 30px rgba(140, 82, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  flex-wrap: wrap;
}

.game-details-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(140, 82, 255, 0.15);
}

.game-details-section:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
  border-radius: 20px 20px 0 0;
}

.game-image-container {
  width: 240px;
  height: 240px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  position: relative;
}

.game-image-container:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 77, 125, 0.2) 0%, rgba(176, 102, 255, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-details-section:hover .game-image-container:after {
  opacity: 1;
}

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

.game-details-section:hover .game-featured-image {
  transform: scale(1.05);
}

.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e6e1f9 0%, #d1c4ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c52ff;
  font-weight: 600;
}

.game-info-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 250px;
  text-align: center; /* Center the game info */
  align-items: center; /* Center children */
}

.game-title-large {
  font-size: 28px;
  color: #333;
  margin: 0 auto 20px; /* Center the title */
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
  position: relative;
  padding-bottom: 15px;
  text-align: center; /* Center text */
}

.game-title-large:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%; /* Center the underline */
  transform: translateX(-50%); /* Center the underline */
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
  border-radius: 3px;
}

.game-summary {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
  text-align: center; /* Center text */
}

.game-summary p {
  margin: 0;
}

.game-action-buttons {
  margin-top: auto;
  display: flex;
  gap: 15px;
  justify-content: center; /* Center the buttons */
  width: 100%;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff4d7d 0%, #b066ff 100%);
  color: white;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 200px;
  box-shadow: 0 8px 15px rgba(176, 102, 255, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
}

.play-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #b066ff 0%, #ff4d7d 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.play-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(176, 102, 255, 0.4);
  color: white;
}

.play-button:hover:before {
  opacity: 1;
}

.play-button:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(176, 102, 255, 0.3);
}

/* Game Article Section */
.game-article-section {
  margin-top: 30px;
  background-color: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(140, 82, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.game-article-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(140, 82, 255, 0.15);
}

.full-article-content {
  font-size: 16px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 30px;
}

.full-article-content p {
  margin-bottom: 20px;
}

/* Article columns for wider layout */
.article-columns {
  column-count: 2;
  column-gap: 30px;
}

.article-columns p {
  break-inside: avoid;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .article-columns {
    column-count: 1;
  }
}

.game-article-section .section-title {
  color: #333;
  font-size: 22px;
  margin-bottom: 25px;
  position: relative;
  padding-left: 18px;
  font-weight: 700;
  text-align: center; /* Center the section title */
}

.game-article-section .section-title:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 5px;
  background: linear-gradient(to bottom, #ff4d7d, #b066ff);
  border-radius: 3px;
}

/* Recommended Games Section */
.recommended-games-section {
  margin-bottom: 30px;
  background-color: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(140, 82, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.recommended-games-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(140, 82, 255, 0.15);
}

.section-title {
  font-size: 22px;
  color: #333;
  margin: 0 0 25px 0;
  font-weight: 700;
  text-align: center; /* Center all section titles */
}

.recommended-games-section .section-title {
  color: #333;
  font-size: 22px;
  margin-bottom: 25px;
  position: relative;
  padding-left: 18px;
  text-align: center; /* Center the section title */
}

.recommended-games-section .section-title:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 5px;
  background: linear-gradient(to bottom, #ff4d7d, #b066ff);
  border-radius: 3px;
}

.recommended-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 25px;
  padding: 10px 5px 20px;
  position: relative;
}

.recommended-game-card {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  transform-origin: center bottom;
  aspect-ratio: 1 / 1.2;
}

.recommended-game-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 25px rgba(140, 82, 255, 0.2);
  z-index: 2;
}

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

.recommended-game-card:hover .recommended-game-image {
  transform: scale(1.1);
}

.recommended-game-title {
  font-size: 13px;
  color: white;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  padding: 15px 10px 8px;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  transition: padding 0.3s ease;
}

.recommended-game-card:hover .recommended-game-title {
  padding-bottom: 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 100%);
}

/* Game Card Styles */
.game-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  height: 100%;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.game-card-thumbnail {
  position: relative;
  overflow: hidden;
  padding-top: 75%; /* 4:3 Aspect Ratio */
}

.game-card-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.game-card-content {
  padding: 15px;
}

.game-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #333;
  line-height: 1.3;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .game-card-title {
    font-size: 14px;
  }
}

/* Game Features and How to Play */
.game-features h4,
.how-to-play h4 {
  font-size: 18px;
  color: #333;
  margin: 0 0 15px 0;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
  text-align: center; /* Center the headings */
  margin: 0 auto 15px; /* Center with margin */
}

.game-features h4:after,
.how-to-play h4:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%; /* Center the underline */
  transform: translateX(-50%); /* Center the underline */
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
}

.game-features {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f9f7ff;
  border-radius: 15px;
  border-left: 4px solid #b066ff;
  text-align: center; /* Center content */
}

/* Add spacing when only one section is present */
.game-features:only-child,
.how-to-play:only-child {
  margin-bottom: 0;
}

/* Add spacing between sections when both are present */
.game-features + .how-to-play {
  margin-top: 30px;
}

.game-features ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px 25px;
}

.game-features li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #555;
  transition: transform 0.2s ease;
  text-align: left; /* Keep list items left-aligned for readability */
}

.game-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #b066ff;
  font-weight: bold;
}

.game-features li:hover {
  transform: translateX(5px);
  color: #333;
}

.how-to-play {
  padding: 20px;
  background-color: #fff9fb;
  border-radius: 15px;
  border-left: 4px solid #ff4d7d;
  text-align: center; /* Center content */
}

.how-to-play p {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

.how-to-play strong {
  color: #ff4d7d;
  font-weight: 600;
}

/* Ad Spaces */
.ad-space {
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(140, 82, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.ad-space:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(140, 82, 255, 0.12);
}

.ad-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8c52ff;
  font-size: 14px;
  background: linear-gradient(135deg, #f0ebff 0%, #e6e1f9 100%);
  border: 1px dashed #d1c4ff;
  position: relative;
}

.ad-label {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(140, 82, 255, 0.1);
  color: #8c52ff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ad-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  text-align: center;
}

.ad-space-middle {
  margin: 25px 0;
  height: 100px;
  background: linear-gradient(135deg, #f0ebff 0%, #e6e1f9 100%);
  position: relative;
  overflow: hidden;
}

.ad-space-middle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
}

.ad-space-large {
  margin: 30px 0 0 0;
  height: 280px;
  background: linear-gradient(135deg, #f0ebff 0%, #e6e1f9 100%);
  position: relative;
  overflow: hidden;
}

.ad-space-large::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
}

.ad-space-between-sections {
  margin: 30px 0;
  height: 180px;
  background: linear-gradient(135deg, #f0ebff 0%, #e6e1f9 100%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(140, 82, 255, 0.1);
}

.ad-space-between-sections::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #ff4d7d, #b066ff);
  border-radius: 20px 20px 0 0;
}

.ad-space-between-sections .ad-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 16px;
  font-weight: 500;
  color: #8c52ff;
  letter-spacing: 1px;
  text-transform: uppercase;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z' fill='%239C92AC' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Responsive Styles */
@media (max-width: 768px) {
  .game-details-section {
    flex-direction: column;
    padding: 20px;
  }

  .game-image-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 300px;
    margin: 0 auto 20px;
  }

  .play-button {
    max-width: 100%;
  }

  .game-features ul {
    grid-template-columns: 1fr;
  }

  .recommended-games-section,
  .game-article-section {
    padding: 20px;
  }

  .ad-space-between-sections {
    height: 120px;
    margin: 25px 0;
  }

  .recommended-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .game-title-large {
    font-size: 24px;
  }

  .game-summary {
    font-size: 15px;
  }

  .section-title {
    font-size: 20px;
  }

  .play-button {
    padding: 12px 20px;
    font-size: 13px;
  }

  .ad-space-between-sections {
    height: 100px;
    margin: 20px 0;
  }

  .ad-space-between-sections .ad-container {
    font-size: 14px;
  }

  .recommended-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Ad placeholder */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #8c52ff;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed #d1c4ff;
}
