
/* 1. Title over image */
.gd-game-card {
  position: relative;
  overflow: hidden;
}

.gd-cover-link {
  display: block;
  position: relative;
}

.gd-cover-link img {
  width: 100%;
  height: auto;
  display: block;
}

.gd-game-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  box-sizing: border-box;
}

/* 2. Fullscreen modal (with header space) */
.gd-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  z-index: 9999;
}

.gd-modal {
  position: fixed;
  top: 60px; /* adjust if header height is different */
  left: 0;
  width: 100%;
  height: calc(100% - 60px);
  background: #000;
  padding: 0;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  z-index: 10000;
}

.gd-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 3. Close button styling */
.gd-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

/* Center demo button on single game page */
.gd-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto;
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.5);
  animation: blink 1.5s infinite;
  display: block;
  text-align: center;
}

.gd-demo-btn::before {
  content: "\1F3AE"; /* 🎮 */
  font-size: 1.3em;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}


/* Menu Filter Styling */
.gd-games-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  padding: 10px;
}

.gd-provider-btn {
  padding: 10px 20px;
  background-color: #f0f0f0;
  border: 2px solid #007bff;
  border-radius: 30px;
  color: #007bff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.gd-provider-btn:hover,
.gd-provider-btn.active {
  background-color: #007bff;
  color: #fff;
}

/* Game Grid & Cards */
.gd-games-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.gd-game-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gd-game-card:hover {
  transform: translateY(-5px);
}

.gd-cover-link {
  display: block;
  position: relative;
}

.gd-cover-link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Game Title inside image */
.gd-game-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  box-sizing: border-box;
}

/* Responsive behavior */
@media (min-width: 768px) {
  .gd-game-card {
    width: calc(50% - 20px);
  }
}

@media (min-width: 1024px) {
  .gd-game-card {
    width: calc(25% - 20px);
  }
}


/* Mobile layout: 2 images per row */
@media (max-width: 767px) {
  .gd-game-card {
    width: calc(50% - 20px);
  }
}


/* --- ตัวแปรสี --- */
:root {
  --game-bg: #d978a5;
  --game-border: #DBA3C8;
  --game-text: #ffffff;
  --game-title-bg: #ffffff;
  --game-title-text: #000000;
  --btn-gradient: linear-gradient(90deg, #f63f87 0%, #ffb97e 100%);
  --shadow: rgba(0, 0, 0, 0.1);
}

/* --- Container หลัก --- */
article.single-game {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

/* ย้ายรูปก่อนข้อมูล ในมือถือ */
article.single-game .game-cover {
  order: -1;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  article.single-game {
    flex-direction: row;
    align-items: flex-start;
  }
  article.single-game .game-cover {
    order: 0;
    margin-bottom: 0;
  }
}

/* --- ฝั่งข้อมูลเกม --- */
article.single-game .game-info {
  background: var(--game-bg);
  border: 4px solid var(--game-border);
  border-radius: 1rem;
  padding: 2rem;
  flex: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 10px var(--shadow);
}

/* ชื่อเกมในกรอบสีขาว */
article.single-game .game-title-wrapper {
  background: var(--game-title-bg);
  border-radius: 9999px;
  padding: 0.5rem 2rem;
  display: table;
  margin: 0 auto 1rem;
  box-shadow: 0 2px 6px var(--shadow);
}
article.single-game .game-title {
  color: var(--game-title-text);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

/* เนื้อหาเกม */
article.single-game .game-content {
  color: var(--game-text);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 2rem;
}

/* ปุ่มสมัคร */
article.single-game .game-signup {
  text-align: center;
}
article.single-game .game-signup-btn {
  display: inline-block;
  background: var(--btn-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px var(--shadow);
}
article.single-game .game-signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow);
}

/* --- ฝั่งรูปปกเกม --- */
article.single-game .game-cover {
  flex: 1;
  max-width: 350px;
}
article.single-game .game-cover-image {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 4px 10px var(--shadow);
  display: block;
}

/* --- ปรับขนาด font บนมือถือ --- */
@media (max-width: 480px) {
  article.single-game .game-title {
    font-size: 1.5rem;
  }
  article.single-game .game-content {
    font-size: 0.95rem;
  }
  article.single-game .game-signup-btn {
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
  }
}

.game-content {
  width: 100%;            /* ถ้าอยากให้ล็อกตาม container */
  max-width: 1000px;       /* ปรับเป็นความกว้างสูงสุดที่ต้องการ */
  margin: 0 auto;         /* จัดกึ่งกลางแนวนอน */
  box-sizing: border-box; /* ให้ padding ไม่ดันความกว้างออกนอกกรอบ */
  color: #000;
}