body {
  font-family: 'Kanit', sans-serif;
  margin: 0;
  background-color: #f5f3fa;
  color: #2e2a35;
}

body {
  font-family: 'Kanit', sans-serif;
  margin: 0;
  background-color: #f5f3fa;
  color: #2e2a35;

  display: flex;          /* ⭐ เพิ่ม */
  flex-direction: column; /* ⭐ เพิ่ม */
  min-height: 100vh;       /* ⭐ เพิ่ม */
}

.wrapper {
  flex: 1;
  display: flex;
  justify-content: center; /* กึ่งกลางแนวนอน */
  align-items: center;     /* กึ่งกลางแนวตั้ง */
  padding: 20px;
}

/* เนื้อหาจะขยายเต็มพื้นที่ที่เหลือ */
.content {
  flex: 1;
  padding: 20px;
}

/* Footer */
footer {
  background-color: #4b3e75;
  color: white;
  text-align: center;
  padding: 15px 0;
}


/* ส่วนหัว */
header {
  width: 100%; 
  background-color: #d8cff3;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}



header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px 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 {
  max-width: 700px;
  margin: 0 auto 20px;
}

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;
}

/* Featured Section */
.featured {
  max-width: 1000px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}

.category {
  margin: 30px 0 50px;
  padding: 0 10px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}



.category-title {
  font-size: 1.8em;
  color: #3b2f60;
  border-left: 3px solid #a88be7;  
  padding-left: 5px;               
  margin-bottom: 20px;
}


.game-list, .plugin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.game-card, .plugin-card {
  background: #f9f7ff;
  border: 2px solid #d6c8f2;
  border-radius: 12px;
  padding: 15px;
  width: 250px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.game-card:hover, .plugin-card:hover {
  transform: translateY(-5px);
}

.game-card img, .plugin-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: #bca8f9;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: #a88be7;
}

/* 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;
  }
}

.about-section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: radial-gradient(circle at bottom, #5d3a74 0%, #53539e 80%);
  color: #ffffff;
  text-align: center;
  font-family: "Sarabun", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 20px;
}

/* ดาวพื้นหลัง */
.stars, .twinkling {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-repeat: repeat;
  background-size: contain;
  z-index: 0;
}

/* กล่องเนื้อหา */
.about-content {
  position: relative;
  z-index: 1;
  background: rgba(20, 10, 50, 0.6);
  border: 2px solid #a88be7;
  border-radius: 20px;
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 25px rgba(168, 139, 231, 0.4);
}

.about-content h1 {
  font-size: 2.5em;
  margin-bottom: 25px;
  color: #a88be7;
  text-shadow: 0 0 10px rgba(168, 139, 231, 0.6);
}

.about-content p {
  font-size: 1.15em;
  line-height: 1.9em;
}

.contact-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contact-container h2 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #4b3e75;
}

.contact-container p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.contact-box {
  border: 2px solid #b9a6e7;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  background: #f3f0fa;
}

.contact-box a {
  color: #4b3e75;
  text-decoration: none;
  font-weight: bold;
}

.contact-box a:hover {
  text-decoration: underline;
}

html, body {
  margin: 0;
  padding: 0;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
main {
  padding-top: 80px; /* เผื่อพื้นที่ให้ header */
}