/*
TemplateMo 595 3d coverflow
https://templatemo.com/tm-595-3d-coverflow
*/

@charset "utf-8";
/* CSS Document */

/* =========================================================================
   สไตล์หลักสำหรับหน้า Index (Dark Theme - ผสมผสานจาก shop.css และ coverflow)
   ========================================================================= */

:root {
  --bg-color: #0f172a;
  --content-bg: #1e293b;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --primary-color: #00d2ff; /* สีฟ้า */
  --border-color: rgba(255, 255, 255, 0.08);
  --hover-bg: #334155;
  --accent-color: #ff7eb3; /* สีชมพู */
  --gradient-main: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  --gradient-header-button: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 50%, #ff7eb3 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Fix: Ensure all elements use border-box */
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color); /* Fix sub-pixel line issue on html/body */
}

body {
  font-family: 'Sarabun', sans-serif; /* ใช้ Sarabun ตาม shop.css */
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* -----------------------------------------------------------
   Background Layer (Global Parallax Background)
   ----------------------------------------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Default background if no image is set */
  background-color: var(--bg-color);
  /* The actual image will be set via inline style in the HTML */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Initial scale for GSAP to animate */
  transform: scale(1.1);
  /* Overlay gradient to ensure content is readable */
  background-image:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
}

/* Add an extra class to handle the image layer separately if needed for GSAP */
.bg-layer-image {
    position: absolute;
    inset: -5%; /* Slightly larger than viewport to allow for parallax movement */
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    /* Will be controlled by GSAP */
}

/* Sections */
.section {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column; /* Changed to column to stack content */
  align-items: center;
  justify-content: center;
  padding: 80px 0; /* เพิ่ม padding เพื่อให้เนื้อหาไม่ติดขอบ header/footer */
  /* Fix sub-pixel gap between sections */
  margin-top: -1px; /* Overlap sections slightly to hide sub-pixel gaps */
  padding-top: 81px; /* Compensate for the negative margin */
  background-color: transparent; /* Allow parallax bg to show through */
  outline: 1px solid transparent; /* Additional fix for sub-pixel rendering */
}

/* Specific Section Backgrounds (Ensure they match to prevent white lines) */
#home, #about, #news {
  background-color: transparent; /* All sections rely on the global background now */
}


/* -----------------------------------------------------------
   Header / Navbar (จาก shop.css)
   ----------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px; /* Increased padding */
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  margin-top: -1px; /* Fix header gap */
}

.header.scrolled { /* ปรับให้สอดคล้องกับ shop.css */
  height: 70px; /* ไม่ต้องเปลี่ยนความสูงมากนัก */
}


.online-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #666; /* Default offline */
    transition: background-color 0.3s;
}
.online-dot.online {
    background-color: #4caf50;
    box-shadow: 0 0 8px #4caf50;
    animation: blinkHeaderOnline 2s infinite;
}
.online-dot.offline {
    background-color: #f44336;
    box-shadow: 0 0 8px #f44336;
}

@keyframes blinkHeaderOnline {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.server-ip-text {
    font-family: 'Minecraft Ten', 'Kanit', sans-serif;
    font-size: 1.1rem; /* Adjusted font size */
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.copy-icon-wrapper {
    color: var(--text-muted);
    font-size: 1.1rem; /* Adjusted font size */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.player-count-badge {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px; /* Adjusted padding */
    border-radius: 50px;
    font-size: 0.9rem; /* Adjusted font size */
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.05);
}
.player-count-badge i {
    color: var(--primary-color);
    font-size: 0.75rem;
}


/* -- Logo -- */
.logo-container {
  flex: 1; /* Allow logo to take space */
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Added cool hover animation for logo container */
.logo-container:hover {
  transform: scale(1.08) translateY(-2px);
}

/* Added animation for logo image specifically */
.logo-container:hover .logo img {
  transform: rotate(-10deg) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

.logo img {
  /* width: 40px; */
  height: 40px;
  border-radius: 8px; /* เพิ่มขอบมน */
  object-fit: contain; /* changed from cover to contain so logo isn't cropped */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Smooth transition */
}

/* Added cool effect for logo text on hover */
.logo-container:hover .logo-text {
  text-shadow: 0 0 10px rgba(255, 126, 179, 0.5), 0 0 20px rgba(0, 210, 255, 0.5);
  letter-spacing: 2px;
}

.logo-text {
  font-family: 'Kanit', sans-serif; /* ใช้ Kanit ตาม shop.css */
  font-size: 1.4rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease; /* Added transition for text effects */
}

/* Logo and IP Group */
.logo-and-ip-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.main-menu {
  flex: 2; /* Allow menu to take more space */
  display: flex;
  align-items: center;
  justify-content: center; /* Center the menu items */
  gap: 40px; /* Increased gap */
  margin: 0; /* Remove auto margins */
}

.menu-item {
  color: var(--text-muted); /* ใช้สีจาก root */
  text-decoration: none;
  font-size: 1.05rem; /* ปรับขนาดฟอนต์ */
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* เพิ่มลูกเล่นให้กับไอคอนในเมนู */
.menu-item i {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.menu-item:hover, .menu-item.active {
  color: #fff;
  transform: none; /* ลบ transform: translateY(-2px); */
}

/* ทำให้ไอคอนเด้งและเปลี่ยนสีเมื่อ hover */
.menu-item:hover i {
  transform: scale(1.2) rotate(-10deg);
  color: var(--primary-color);
}
.menu-item.active i {
  color: var(--accent-color);
}

.menu-item::after {
  content: '';
  position: absolute;
  bottom: -5px; /* ปรับตำแหน่ง */
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s ease;
}

.menu-item:hover::after, .menu-item.active::after {
  width: 100%;
}

.header-right-section {
  flex: 1; /* Allow right section to take space */
  display: flex;
  justify-content: flex-end; /* Align to the right */
}

.menu-item.external {
  background: linear-gradient(145deg, #00d2ff, #ff7eb3); /* Enhanced gradient */
  color: #fff;
  padding: 10px 25px; /* Adjusted padding */
  border-radius: 12px; /* More rounded corners */
  font-weight: bold;
  border: none;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5); /* Text shadow for depth */
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.4), /* Main shadow for lift */
    0 0 0 2px rgba(255, 255, 255, 0.1) inset, /* Inner light border */
    0 0 0 4px rgba(0, 210, 255, 0.2) inset; /* Inner glow */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
  position: relative; /* Needed for pseudo-elements or complex shadows */
  overflow: hidden; /* To contain inner effects */
  z-index: 1; /* Ensure it's above other elements if needed */
}

.menu-item.external::after { display: none; } /* Ensure no underline */

.menu-item.external:hover {
  transform: translateY(-5px) scale(1.05); /* More pronounced lift */
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.6), /* Stronger main shadow */
    0 0 0 2px rgba(255, 255, 255, 0.2) inset,
    0 0 0 4px rgba(0, 210, 255, 0.4) inset,
    0 0 20px rgba(0, 210, 255, 0.7); /* Outer glow */
}

.menu-item.external:active {
  transform: translateY(0) scale(0.98); /* Press-in effect */
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.3), /* Reduced shadow when pressed */
    0 0 0 2px rgba(255, 255, 255, 0.05) inset,
    0 0 0 4px rgba(0, 210, 255, 0.1) inset;
}

.menu-item.external::before { /* ลบไอคอนลูกศร */
    content: none;
}

/* User Menu (จาก shop.css) */
.user-menu-container {
    background: rgba(255,255,255,0.05);
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
    display: inline-block;
    white-space: nowrap; /* Prevent user menu from wrapping */
}
.user-menu-container:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.user-menu { display: flex; align-items: center; gap: 15px; }
.user-main { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; transition: opacity 0.3s; }
.user-main:hover { opacity: 0.8; }
.user-avatar { width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--accent-color, #ff7eb3); object-fit: cover; transition: transform 0.3s; }
.user-menu-container:hover .user-avatar { transform: scale(1.1) rotate(5deg); border-color: var(--primary-color, #00d2ff); }
.user-name { font-weight: bold; font-family: 'Kanit', sans-serif; letter-spacing: 0.5px; }
.logout-link { color: var(--accent-color, #ff7eb3); text-decoration: none; font-size: 1.1rem; font-weight: bold; transition: all 0.3s; }
.logout-link:hover { color: #ff4757; transform: scale(1.2) rotate(10deg); }


/* Header Server IP Display */
.header-server-ip-display {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; /* Smaller border-radius */
    padding: 2px 8px 2px 4px; /* Smaller padding */
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 5px; /* Smaller gap */
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.5); /* Smaller shadow */
    margin-top: 5px; /* Space from menu items */
    margin-left: 50px; /* Adjust this value to align under the text */
    max-width: fit-content; /* Adjust width to content */
}

.header-server-ip-display .server-ip-text {
    font-size: 0.8rem; /* Smaller font size */
}

.header-server-ip-display .copy-icon-wrapper {
    font-size: 0.8rem; /* Smaller icon size */
}

.header-server-ip-display:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2), inset 0 1px 5px rgba(0,0,0,0.5);
    transform: translateY(-1px);
}

.header-server-ip-display.copied {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}
.header-server-ip-display:hover .copy-icon-wrapper {
    color: var(--primary-color);
}
.header-server-ip-display.copied .copy-icon-wrapper {
    color: #4caf50;
}


/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: 0.3s;
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}


/* Home Section with Coverflow */
.coverflow-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column; /* จัดเรียง info และ coverflow-container ในแนวตั้ง */
  align-items: center;
  justify-content: center;
  padding-top: 70px; /* ปรับให้เข้ากับ header ใหม่ */
  position: relative;
  visibility: hidden; /* Hide initially to prevent FOUC */
}

.coverflow-container {
  width: 100%;
  height: 60vh; /* Changed from 100% to a fixed percentage to avoid taking full height */
  min-height: 400px; /* Minimum height */
  max-height: 600px; /* Maximum height */
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  position: relative;
  flex-grow: 0; /* Changed from 1 to 0 */
  margin: 0 auto; /* Center horizontally */
}

.coverflow {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 350px; /* Reduced base height */
}

.coverflow-item {
  position: absolute;
  width: 280px; /* Slightly reduced width */
  height: 280px; /* Slightly reduced height */
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  user-select: none;
}

.coverflow-item .cover {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  background: var(--content-bg); /* ใช้สีพื้นหลัง content */
}

.coverflow-item .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Reflection */
.coverflow-item .reflection {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 80%; /* Reduced height of reflection slightly */
  border-radius: 10px;
  transform: scaleY(-1);
  opacity: 0.2;
  filter: blur(2px);
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 50%, /* Adjusted gradient stops */
    rgba(0, 0, 0, 0.9) 100%);
  overflow: hidden;
}

/* Active item (center) */
.coverflow-item.active {
  z-index: 100;
  transform: translateX(0) translateZ(0) rotateY(0deg) scale(1.1) !important; /* Make active item pop more, overrides inline style slightly for visual bump */
}

.coverflow-item.active .cover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
}

/* Navigation */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 50px; /* Reduced button size */
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 200;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.nav-button.prev {
  left: 30px; /* Moved inwards slightly */
}

.nav-button.next {
  right: 30px;
}

/* Dots indicator */
.dots-container {
  position: absolute;
  bottom: 20px; /* Moved up slightly */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 200;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.3);
}

/* Info display */
.info {
  position: relative;
  margin-top: 100px; /* Space from header */
  margin-bottom: 20px;
  text-align: center;
  z-index: 200;
  color: var(--primary-color);
  text-shadow: 0 0 0.1em black, 0 0 0.1em black, 0 0 0.1em black, 0 0 0.1em black;
}

.info h2 {
  font-size: 28px; /* Slightly reduced */
  margin-bottom: 5px;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}

.info p {
  font-size: 15px;
  opacity: 0.8;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Play/Pause Button */
.play-pause-button {
  position: absolute;
  bottom: 60px; /* Adjusted position */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 40px; /* Reduced size */
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 200;
}

.play-pause-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%) scale(1.1);
}

.play-pause-button .pause-icon {
  font-size: 14px;
  letter-spacing: 2px;
}

/* About Section */
.about-content {
  max-width: 1200px; /* ปรับ max-width */
  margin: 0 auto;
  padding: 40px 20px; /* ปรับ padding */
  color: var(--text-color);
  background: rgba(30, 41, 59, 0.7); /* Added glassmorphism for better readability */
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.about-header {
  text-align: center;
  margin-bottom: 60px; /* ปรับ margin */
}

.about-header h2 {
  font-size: 2.8rem; /* ปรับขนาดฟอนต์ */
  margin-top: 0; /* ลบ margin-top */
  margin-bottom: 20px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Kanit', sans-serif; /* ใช้ Kanit */
}

.about-header p {
  font-size: 1.1rem; /* ปรับขนาดฟอนต์ */
  color: var(--text-muted);
  max-width: 700px; /* ปรับ max-width */
  margin: 0 auto;
  line-height: 1.6;
}

.about-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px; /* ปรับ gap */
  align-items: center;
  margin-bottom: 60px; /* ปรับ margin */
}

.about-visual {
  position: relative;
  height: 500px; /* ปรับความสูง */
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-display {
  position: relative;
  width: 100%;
  max-width: 500px; /* ปรับ max-width */
  height: 500px; /* ปรับความสูง */
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-main {
  position: relative;
  width: 350px;
  height: 450px; /* ปรับความสูง */
  background: rgba(30, 41, 59, 0.9); /* Opaque background for showcase */
  border-radius: 16px; /* ปรับ border-radius */
  border: 1px solid var(--border-color); /* ใช้ border-color */
  padding: 30px; /* ปรับ padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px); /* ปรับ blur */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* ปรับ shadow */
}

.showcase-logo {
  width: 100px; /* ปรับขนาด */
  height: 100px; /* ปรับขนาด */
  background: var(--gradient-main);
  border-radius: 12px; /* ปรับ border-radius */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px; /* ปรับ margin */
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.3); /* ปรับ shadow */
}

.showcase-logo img { /* ใช้ img แทน svg */
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.showcase-title {
  font-size: 1.8rem; /* ปรับขนาดฟอนต์ */
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 10px;
  text-align: center;
  font-family: 'Kanit', sans-serif; /* ใช้ Kanit */
}

.showcase-subtitle {
  font-size: 0.95rem; /* ปรับขนาดฟอนต์ */
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 25px; /* ปรับ margin */
  line-height: 1.5;
}

.showcase-badges {
  display: flex;
  gap: 8px; /* ปรับ gap */
  flex-wrap: wrap;
  justify-content: center;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px; /* ปรับ border-radius */
  padding: 5px 12px; /* ปรับ padding */
  font-size: 0.85rem; /* ปรับขนาดฟอนต์ */
  color: var(--text-muted);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.badge:hover {
  background: var(--gradient-main);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.3);
}

.badge:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.3);
}

/* Decorative corner elements */
.corner-decoration {
  position: absolute;
  width: 60px; /* ปรับขนาด */
  height: 60px; /* ปรับขนาด */
  border: 2px solid rgba(0, 210, 255, 0.3); /* ใช้สี primary */
}

.corner-decoration.top-left {
  top: -15px; /* ปรับตำแหน่ง */
  left: -15px; /* ปรับตำแหน่ง */
  border-right: none;
  border-bottom: none;
  border-radius: 15px 0 0 0; /* ปรับ border-radius */
}

.corner-decoration.bottom-right {
  bottom: -15px; /* ปรับตำแหน่ง */
  right: -15px; /* ปรับตำแหน่ง */
  border-left: none;
  border-top: none;
  border-radius: 0 0 15px 0; /* ปรับ border-radius */
}

.about-info {
  padding-left: 0; /* ลบ padding-left */
}

.about-info h3 {
  font-size: 2rem; /* ปรับขนาดฟอนต์ */
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--text-color);
  font-family: 'Kanit', sans-serif; /* ใช้ Kanit */
}

.about-info p {
  font-size: 1rem; /* ปรับขนาดฟอนต์ */
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 25px; /* ปรับ margin */
}

.feature-list {
  list-style: none;
  margin-bottom: 30px; /* ปรับ margin */
  padding-left: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start; /* ปรับจัดแนว */
  gap: 12px; /* ปรับ gap */
  margin-bottom: 15px; /* ปรับ margin */
  font-size: 0.95rem; /* ปรับขนาดฟอนต์ */
  color: var(--text-color);
}

.feature-list li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px; /* ปรับขนาด */
  height: 25px; /* ปรับขนาด */
  background: var(--gradient-main);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #fff;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-main);
  color: white;
  text-decoration: none;
  padding: 12px 25px; /* ปรับ padding */
  border-radius: 8px; /* ปรับ border-radius */
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.3); /* เพิ่มเงา */
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 210, 255, 0.4);
}

.cta-button svg {
  width: 18px; /* ปรับขนาด */
  height: 18px; /* ปรับขนาด */
  transition: transform 0.3s ease;
}

.cta-button:hover svg {
  transform: translateX(5px);
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px; /* ปรับ gap */
  padding: 40px; /* ปรับ padding */
  background: rgba(30, 41, 59, 0.8); /* Glassmorphism */
  backdrop-filter: blur(10px); /* ปรับ blur */
  border-radius: 16px; /* ปรับ border-radius */
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 60px auto; /* เพิ่ม margin */
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem; /* ปรับขนาดฟอนต์ */
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px; /* ปรับ margin */
  font-family: 'Kanit', sans-serif; /* ใช้ Kanit */
}

.stat-label {
  font-size: 0.95rem; /* ปรับขนาดฟอนต์ */
  color: var(--text-muted);
}

/* News Section (ปรับจากสไตล์เดิมให้เข้ากับโทนสีใหม่) */
#news {
  padding: 80px 0;
}

#news .news-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background: rgba(30, 41, 59, 0.8); /* Glassmorphism */
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#news .news-header {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 40px;
}

#news .news-header h2 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Kanit', sans-serif;
}

#news .news-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

#news .news-list {
  display: grid; /* ใช้ grid แทน flex-wrap */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* ปรับให้ยืดหยุ่น */
  gap: 30px; /* ปรับ gap */
}

#news .news-item {
  background-color: rgba(15, 23, 42, 0.8); /* Darker inner card */
  padding: 25px;
  border-radius: 12px;
  font-size: 1rem;
  box-sizing: border-box;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#news .news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 210, 255, 0.2);
  border-color: rgba(0, 210, 255, 0.3);
}

.news-item img {
  width: 100%;
  height: 180px; /* กำหนดความสูงคงที่ */
  object-fit: cover; /* ครอบคลุมพื้นที่ */
  border-radius: 8px;
  margin-bottom: 15px;
}

#news .news-item h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-color);
  font-family: 'Kanit', sans-serif;
}

#news .news-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Social Media Section (Moved to Footer) */
/* Removed #social-media and #social-media .social-media-content styles */

/* Smooth image loading */
.image-loading {
  background: linear-gradient(45deg, #333, #555);
  position: relative;
}

.image-loading::after {
  content: '📷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  opacity: 0.5;
}

/* -----------------------------------------------------------
   Footer (จาก shop.css)
   ----------------------------------------------------------- */
.footer {
  background: rgba(9, 14, 23, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 25px 40px;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px; /* Add gap for spacing between items */
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-grow: 1; /* Allow copyright to take available space */
}

.footer-copyright a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

/* Social buttons in footer */
.footer-content .social-buttons {
  display: flex;
  justify-content: center;
  gap: 15px; /* Smaller gap for footer */
  /* Removed margin-left: auto; as it's now part of the flex container */
}

.footer-content .social-buttons .social-btn {
  width: 40px; /* Smaller buttons for footer */
  height: 40px;
  background-color: transparent; /* No background */
  border: 1px solid var(--border-color); /* Subtle border */
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  box-shadow: none; /* No initial shadow */
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-content .social-buttons .social-btn svg {
  fill: var(--text-muted); /* Muted color for icons */
  width: 20px;
  height: 20px;
  transition: fill 0.3s ease;
}

.footer-content .social-buttons .social-btn:hover {
  transform: translateY(-3px) scale(1.1);
  background-color: rgba(0, 210, 255, 0.1); /* Light background on hover */
  box-shadow: 0 4px 10px rgba(0, 210, 255, 0.3); /* Subtle glow on hover */
  border-color: var(--primary-color);
}

.footer-content .social-buttons .social-btn:hover svg {
  fill: var(--primary-color); /* Primary color on hover */
}


/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--gradient-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  border: none;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 126, 179, 0.5);
}

/* Admin Link (มุมขวาล่าง - ซ่อนและแสดงเมื่อ hover) */
.admin-link-container {
    position: fixed;
    bottom: 20px;
    right: 20px; /* ย้ายกลับมามุมขวาล่าง */
    z-index: 1000;
    width: 30px; /* ลดขนาด */
    height: 30px; /* ลดขนาด */
    display: flex; /* เพื่อจัดตำแหน่งลิงก์ภายใน */
    align-items: center;
    justify-content: center;
}

.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* ลดขนาด */
    height: 30px; /* ลดขนาด */
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1rem; /* ลดขนาดฟอนต์ */
    text-decoration: none;
    opacity: 0; /* ซ่อนโดยค่าเริ่มต้น */
    visibility: hidden; /* ซ่อนโดยค่าเริ่มต้น */
    transform: scale(0.8); /* เริ่มต้นด้วยขนาดเล็กกว่าปกติ */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* อนิเมชั่นสวยๆ */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.admin-link-container:hover .admin-link {
    opacity: 1; /* แสดงเมื่อ hover */
    visibility: visible; /* แสดงเมื่อ hover */
    transform: scale(1); /* ขยายเล็กน้อย */
    background-color: rgba(255, 126, 179, 0.1); /* สีชมพูอ่อนๆ */
    color: var(--accent-color); /* สีชมพู */
    box-shadow: 0 4px 15px rgba(255, 126, 179, 0.3); /* เงาสีชมพู */
}


/* -----------------------------------------------------------
   Responsive Design
   ----------------------------------------------------------- */
/* ปรับปรุงสำหรับหน้าจอขนาดกลาง (แท็บเล็ต) */
@media (max-width: 1024px) {
  .header {
    padding: 0 20px;
  }
  .main-menu {
    gap: 20px;
  }
  .logo-text {
    font-size: 1.3rem;
  }

  .coverflow-wrapper {
    padding-top: 70px; /* ให้สอดคล้องกับ header */
    height: auto; /* ปรับความสูงอัตโนมัติ */
    min-height: 100vh; /* ให้ยังคงเต็มหน้าจอ */
  }
  .coverflow-container {
    height: 400px; /* กำหนดความสูงที่เหมาะสม */
  }
  .coverflow {
    height: 300px; /* ปรับความสูงของ coverflow */
  }
  .coverflow-item {
    width: 220px;
    height: 220px;
  }
  .nav-button {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  .nav-button.prev {
    left: 15px !important;
    right: auto !important;
  }
  .nav-button.next {
    right: 15px !important;
    left: auto !important;
  }
  .dots-container {
    bottom: 30px;
  }
  .play-pause-button {
    bottom: 80px;
  }
  .info {
    top: auto; /* ลบ top */
    margin-top: 20px; /* เพิ่ม margin-top */
    margin-bottom: 20px;
  }
  .info h2 {
    font-size: 24px;
  }
  .info p {
    font-size: 14px;
  }

  .about-content {
    padding: 60px 20px;
  }
  .about-header h2 {
    font-size: 2.5rem;
  }
  .about-header p {
    font-size: 1rem;
  }
  .about-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-visual {
    height: 350px;
  }
  .showcase-display {
    max-width: 400px;
    height: 350px;
  }
  .showcase-main {
    width: 100%;
    height: 320px;
    padding: 25px;
  }
  .showcase-logo {
    width: 80px;
    height: 80px;
  }
  .showcase-title {
    font-size: 1.6rem;
  }
  .showcase-subtitle {
    font-size: 0.9rem;
  }
  .corner-decoration {
    width: 50px;
    height: 50px;
    top: -10px;
    left: -10px;
    border-radius: 10px 0 0 0;
  }
  .corner-decoration.bottom-right {
    bottom: -10px;
    right: -10px;
    border-radius: 0 0 10px 0;
  }
  .about-info {
    padding-left: 0;
  }
  .about-info h3 {
    font-size: 1.8rem;
  }
  .about-info p {
    font-size: 0.95rem;
  }
  .feature-list li {
    font-size: 0.9rem;
  }
  .cta-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .stats-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 30px;
    margin: 40px auto;
  }
  .stat-number {
    font-size: 2rem;
  }
  .stat-label {
    font-size: 0.85rem;
  }

  #news .news-content {
    padding: 30px 20px;
  }
  #news .news-header h2 {
    font-size: 2.2rem;
  }
  #news .news-header p {
    font-size: 1rem;
  }
  #news .news-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  #news .news-item {
    padding: 20px;
  }
  #news .news-item img {
    height: 150px;
  }
  #news .news-item h3 {
    font-size: 1.3rem;
  }
  #news .news-item p {
    font-size: 0.85rem;
  }
  .footer-content .social-buttons {
    gap: 10px;
  }
  .footer-content .social-buttons .social-btn {
    width: 35px;
    height: 35px;
  }
  .footer-content .social-buttons .social-btn svg {
    width: 18px;
    height: 18px;
  }

  .footer {
    padding: 20px 20px;
  }
  .footer-copyright, .footer-links a {
    font-size: 0.85rem;
  }

  .scroll-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 20px;
    right: 20px;
  }
  .admin-link-container {
    bottom: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
  }
  .admin-link {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
}

/* ปรับปรุงสำหรับหน้าจอขนาดเล็ก (มือถือ) */
@media (max-width: 767px) { /* เปลี่ยนจาก 768px เป็น 767px เพื่อไม่ให้ทับซ้อนกับ 768px */
  .header {
    padding: 0 15px;
    height: 60px;
  }
  .logo img {
    width: 35px;
    height: 35px;
  }
  .logo-text {
    font-size: 1.1rem;
  }

  .main-menu {
      top: 60px; /* ให้สอดคล้องกับ header */
      padding: 15px;
      gap: 15px;
  }

  .coverflow-wrapper {
    padding-top: 60px;
    height: auto;
    min-height: 100vh;
  }
  .coverflow-container {
    height: 300px; /* ลดความสูงลงอีก */
    min-height: auto;
  }
  .coverflow {
    height: 220px; /* ลดความสูงของ coverflow */
  }
  .coverflow-item {
      width: 160px; /* ลดขนาด */
      height: 160px; /* ลดขนาด */
  }
  .nav-button {
      width: 35px; /* ลดขนาด */
      height: 35px; /* ลดขนาด */
      font-size: 16px;
  }
  .nav-button.prev {
      left: 10px !important;
      right: auto !important;
  }
  .nav-button.next {
      right: 10px !important;
      left: auto !important;
  }

  .dots-container {
    bottom: 20px;
  }
  .play-pause-button {
    bottom: 50px;
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  .info {
    margin-top: 15px;
    margin-bottom: 15px;
  }
  .info h2 {
      font-size: 20px;
  }
  .info p {
      font-size: 12px;
  }

  .about-content {
    padding: 40px 15px;
  }
  .about-header h2 {
    font-size: 2rem;
  }
  .about-header p {
    font-size: 0.9rem;
  }
  .about-main {
    gap: 30px;
  }
  .about-visual {
    height: 280px;
  }
  .showcase-display {
    max-width: 300px;
    height: 280px;
  }
  .showcase-main {
    width: 100%;
    height: 260px;
    padding: 15px;
  }
  .showcase-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }
  .showcase-title {
    font-size: 1.2rem;
  }
  .showcase-subtitle {
    font-size: 0.75rem;
    margin-bottom: 15px;
  }
  .badge {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .about-info h3 {
    font-size: 1.5rem;
  }
  .about-info p {
    font-size: 0.85rem;
  }
  .feature-list li {
    font-size: 0.8rem;
  }
  .feature-list li::before {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
  .cta-button {
    padding: 8px 18px;
    font-size: 0.8rem;
  }

  .stats-section {
      grid-template-columns: 1fr; /* แสดงเป็นคอลัมน์เดียว */
      gap: 15px;
      padding: 20px;
      margin: 30px auto;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-label {
    font-size: 0.8rem;
  }

  #news .news-content {
    padding: 25px 15px;
  }
  #news .news-header h2 {
    font-size: 1.8rem;
  }
  #news .news-header p {
    font-size: 0.9rem;
  }
  #news .news-list {
    grid-template-columns: 1fr; /* แสดงเป็นคอลัมน์เดียว */
    gap: 15px;
  }
  #news .news-item {
    padding: 15px;
  }
  #news .news-item img {
    height: 120px;
  }
  #news .news-item h3 {
    font-size: 1.1rem;
  }
  #news .news-item p {
    font-size: 0.75rem;
  }
  .footer-content {
    flex-direction: column; /* Stack items vertically */
    text-align: center;
    gap: 15px; /* Adjust gap for stacked items */
  }
  .footer-content .social-buttons {
    margin-left: 0; /* Remove auto margin when stacked */
  }
  .footer-content .social-buttons .social-btn {
    width: 35px;
    height: 35px;
  }
  .footer-content .social-buttons .social-btn svg {
    width: 16px;
    height: 16px;
  }

  .footer {
      padding: 15px 15px;
  }
  .footer-copyright, .footer-links a {
    font-size: 0.75rem;
  }
  .scroll-to-top {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    bottom: 15px;
    right: 15px;
  }

  .admin-link-container {
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
  }
  .admin-link {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
}

/* สำหรับหน้าจอขนาดเล็กมากๆ (เช่น iPhone SE) */
@media (max-width: 375px) {
  .header {
    height: 45px;
    padding: 0 10px;
  }
  .logo img {
    width: 30px;
    height: 30px;
  }
  .logo-text {
    font-size: 0.9rem;
  }
  .main-menu {
    top: 45px;
    padding: 10px;
    gap: 10px;
  }
  .coverflow-wrapper {
    padding-top: 45px;
  }
  .coverflow-container {
    height: 250px;
  }
  .coverflow {
    height: 180px;
  }
  .coverflow-item {
    width: 130px;
    height: 130px;
  }
  .nav-button {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  .nav-button.prev {
      left: 5px !important;
      right: auto !important;
  }
  .nav-button.next {
      right: 5px !important;
      left: auto !important;
  }

  .dots-container {
    bottom: 15px;
  }
  .play-pause-button {
    bottom: 45px;
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .info h2 {
    font-size: 16px;
  }
  .info p {
    font-size: 10px;
  }

  .about-content {
    padding: 30px 10px;
  }
  .about-header h2 {
    font-size: 1.6rem;
  }
  .about-header p {
    font-size: 0.8rem;
  }
  .about-main {
    gap: 20px;
  }
  .about-visual {
    height: 250px;
  }
  .showcase-display {
    max-width: 250px;
    height: 250px;
  }
  .showcase-main {
    height: 230px;
    padding: 10px;
  }
  .showcase-logo {
    width: 50px;
    height: 50px;
  }
  .showcase-title {
    font-size: 1.1rem;
  }
  .showcase-subtitle {
    font-size: 0.7rem;
  }
  .badge {
    padding: 3px 8px;
    font-size: 0.7rem;
  }
  .about-info h3 {
    font-size: 1.3rem;
  }
  .about-info p {
    font-size: 0.8rem;
  }
  .feature-list li {
    font-size: 0.75rem;
  }
  .feature-list li::before {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
  }
  .cta-button {
    padding: 7px 15px;
    font-size: 0.75rem;
  }

  .stats-section {
    padding: 15px 10px;
    gap: 10px;
    margin: 20px auto;
  }
  .stat-number {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }

  #news .news-content {
    padding: 20px 10px;
  }
  #news .news-header h2 {
    font-size: 1.6rem;
  }
  #news .news-header p {
    font-size: 0.8rem;
  }
  #news .news-item {
    padding: 12px;
  }
  #news .news-item img {
    height: 100px;
  }
  #news .news-item h3 {
    font-size: 1rem;
  }
  #news .news-item p {
    font-size: 0.75rem;
  }
  .footer-content {
    gap: 10px;
  }
  .footer-content .social-buttons .social-btn {
    width: 30px;
    height: 30px;
  }
  .footer-content .social-buttons .social-btn svg {
    width: 14px;
    height: 14px;
  }

  .footer {
    padding: 10px 10px;
  }
  .footer-copyright, .footer-links a {
    font-size: 0.75rem;
  }
  .scroll-to-top {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    bottom: 10px;
    right: 10px;
  }

  .admin-link-container {
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
  }
  .admin-link {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
  }
}