body {
  font-family: 'Kanit', sans-serif;
   background: linear-gradient(to bottom right, #7c92c0, #ae85be);

  /* เต็มจอ */
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;

  /* ถ้าต้องการให้พื้นหลังไม่เลื่อนตามสกอล์ล */
  background-attachment: fixed;

  /* เพิ่ม transition ถ้าอยากให้ไล่สีเนียนขึ้นตอนโหลด */
  transition: background 0.5s ease;
}

#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; 
  pointer-events: none;
}

.viewer-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 400px;          
  height: 300px;         
  margin: 30px auto;
}


.viewer-container img {
  width: 400px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* กรอบพื้นหลังของส่วนแสดงรูปภาพ */
.viewer-wrapper {
  background: #f7f5fc;           /* สีพื้นหลังอ่อน ๆ */
  border: 2px solid #d8cff3;     /* กรอบสีม่วงอ่อนให้เข้ากับธีม */
  border-radius: 12px;           /* มุมโค้งนุ่มนวล */
  padding: 20px;                 /* ระยะห่างภายในกรอบ */
  width: fit-content;            /* ให้กรอบพอดีกับขนาดเนื้อหา */
  margin: 30px auto;             /* จัดให้อยู่ตรงกลาง */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* เงาอ่อน ๆ */
}

.game-download {
  background: #f7f5fc;          /* สีพื้นกล่องอ่อน */
  border: 2px solid #d8cff3;    /* กรอบสีม่วงอ่อน */
  border-radius: 12px;
  padding: 20px 30px;
  margin: 25px auto;
  width: 80%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: center;            /* ให้ข้อความและปุ่มอยู่ตรงกลาง */
  line-height: 1.7;
}

.game-download h3 {
  margin-bottom: 15px;
  color: #4b3e75;
}

.game-download p.centered {
  text-align: center;            /* ข้อความตรงกลาง */
  margin-bottom: 15px;
}

.game-download .download-btn:hover {
  background: #9a83e8;
}

/* หมายเหตุชิดซ้าย */
.game-download p.note {
  text-align: left;
  font-size: 0.9em;
  color: #5a4d91;
  margin-top: 10px;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #d8cff3;
  color: #4b3e75;
  border: 2px solid #b9a6e7;
  font-size: 24px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: background 0.2s, transform 0.2s;
  z-index: 1;
}

.nav-btn:hover {
  background: #c9b7ef;
  transform: translateY(-50%) scale(1.05);
}

.nav-btn.left {
  left: -100px;            
}

.nav-btn.right {
  right: -100px;           
}

/* Thumbnail Row */
.thumbnail-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.2s ease;
  border: 2px solid transparent;
}

.thumb:hover,
.thumb.active {
  opacity: 1;
  border-color: #a88be7;
}

/* ส่วนหัว */
header {
  width: 100vw;
  background-color: #d8cff3;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-right: 10px;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #4b3e75;
  transition: color 0.2s;
  font-weight: 600;
}

nav a.active,
nav a:hover {
  color: #7056b3;
}

/* Hero */
.hero {
  background-color: #e8e3fa;
  padding: 100px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  color: #4b3e75;
}

.hero p {
  font-size: 1.1em;
  margin-bottom: 25px;
}

button {
  background-color: #a88be7;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1em;
}

button:hover {
  background-color: #9170d9;
}

.download-btn {
  display: inline-block;
  margin: 10px;
  padding: 15px 30px;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  transition: 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.windows { background-color: #8ebff7; } /* ฟ้า */
.macos   { background-color: #bc88ec; } /* ม่วงพาสเทล */
.linux   { background-color: #6ddb92; } /* เขียวมิ้นท์เล็กน้อยสำหรับ Linux */

/* Featured Section */
.featured {
  max-width: 1000px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}

.game-description {
  max-width: 800px;                          
  width: 90%;                                
  margin: 25px auto;
  padding: 30px;                             
  background: rgba(240, 236, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(100, 80, 180, 0.1);
  line-height: 1.7;
  color: #2e2b4f;
  font-family: "Sarabun", sans-serif;
}

.game-description h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #7c6fc5;
}

.game-description p {
  text-indent: 2em;
  margin-bottom: 10px;
  text-align: justify;
}

.game-info {
  max-width: 800px;                          
  width: 90%;                                
  margin: 25px auto;
  padding: 30px;                             
  background: rgba(240, 236, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(100, 80, 180, 0.1);
  line-height: 1.7;
  color: #2e2b4f;
  font-family: "Sarabun", sans-serif;
  line-height: 1.8;
}

.game-info h3 {
  text-align: center;
  color: #7c6fc5;
  margin-bottom: 15px;
}

.game-info p {
  text-indent: 2em; /* ย่อหน้า */
  margin-bottom: 10px;
  text-align: justify;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.game-card {
  background-color: #ffffffcc;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  
}

.game-card img {
  max-width: 100%;
  max-height: 180px; /* จำกัดความสูง */
  object-fit: cover; /* ทำให้ภาพไม่เบี้ยวและตัดส่วนเกิน */
  border-radius: 8px;
  margin-bottom: 10px;
}

.game-card h3 {
  color: #4b3e75;
  margin: 10px 0 5px;
}

.game-card p {
  font-size: 0.9em;
  margin-bottom: 10px;
}

.game-card .btn {
  display: inline-block;
  background-color: #a88be7;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9em;
  transition: background 0.3s;
}

.game-card .btn:hover {
  background-color: #9170d9;
}



/* About */
.about {
  background-color: #e8e3fa;
  padding: 60px 20px;
  text-align: center;
}

.about p {
  max-width: 700px;
  margin: 0 auto 20px;
}

/* Footer */
footer {
  width: 100vw;
  background-color: #d8cff3;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #4b3e75;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 10px;
  }

  nav a {
    display: inline-block;
    margin: 5px 10px 0 0;
  }
}
