/* =====================================================
   🌌 KingWeb Style - Aurora Background (Full Version)
   ===================================================== */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ======================= Aurora Body ======================= */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Kanit', sans-serif;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: linear-gradient(135deg, #43e97b, #38f9d7, #fa709a, #fee140, #6a11cb, #23a6d5);
  background-size: 600% 600%;
  animation: auroraFlow 25s ease infinite;
}
 body {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
     }
  .menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
    background-color: #ffd700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 1000;
  }
  .menu-btn:hover {
    background-color: #ffcf40;
  }
.menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #1b1b2f, #16213e, #0f3460); /* พื้นเข้มแบบ Aurora */
  box-shadow: 3px 0 15px rgba(0, 0, 0, 0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding: 20px;
  overflow-y: auto;
  z-index: 999;
  border-right: 2px solid rgba(0, 255, 255, 0.3);
}

.menu-panel.active {
  transform: translateX(0);
}

.menu-panel h2 {
  margin-top: 0;
  text-align: center;
  color: #00ffff; /* หัวข้อเมนูเรืองแสงฟ้า */
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
  margin-bottom: 20px;
}

.menu-panel .link-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-panel .link-buttons a {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 10px;
  font-size: 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-panel .link-buttons a:hover {
  background: linear-gradient(135deg, #00eaff, #6a11cb);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
  transform: translateX(5px);
}

  .link-buttons img {
    margin-right: 8px;
  }
@keyframes auroraFlow {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

/* Aurora Glow Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2), transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(255,255,255,0.15), transparent 60%),
              rgba(0, 0, 0, 0.1);
  background-blend-mode: screen;
  animation: auroraLight 40s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes auroraLight {
  0% { transform: scale(1) translate(0, 0); opacity: 0.85; }
  50% { transform: scale(1.05) translate(-2%, 2%); opacity: 1; }
  100% { transform: scale(1.02) translate(2%, -2%); opacity: 0.9; }
}

/* Floating Particle Layer */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ======================= Status Bar ======================= */
.status-bar {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  color: #00ff95;
  font-weight: 600;
  padding: 3px 0;
  font-size: 0.9rem;
  line-height: 1.2;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(0,255,150,0.3);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  margin: 0;
}
.status-bar marquee {
  margin: 0;
  padding: 0;
}
.status-bar marquee a {
  color: #fff;
  font-weight: 500;
}
.status-bar marquee img {
  vertical-align: middle;
}

/* ======================= Header ======================= */
header {
  text-align: center;
  padding: 48px 10px 10px;
  position: relative;
  z-index: 2;
  margin: 0;
}
header .logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 5px;
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  animation: spin 12s linear infinite, glowPulse 3s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 20px rgba(255,255,255,0.5), 0 0 40px rgba(0,255,255,0.3); }
  50% { box-shadow: 0 0 40px rgba(255,255,255,0.9), 0 0 60px rgba(0,255,255,0.5); }
}

header h1 {
  font-size: 1.6rem;
  margin-bottom: 5px;
  text-shadow: 0 0 6px rgba(0,0,0,0.3);
}

header p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}

/* ======================= Hero Slider ======================= */
.hero-section {
  position: relative;
  width: 100%;
  max-width: 850px;
  margin: 10px auto 25px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.carousel-slide { display: none; }
.carousel-slide.active { display: block; }
.carousel-slide img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.prev, .next {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  font-size: 1.6rem;
  color: #fff;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.prev:hover, .next:hover { background: rgba(0,0,0,0.6); }
.prev { left: 10px; }
.next { right: 10px; }

.dots {
  text-align: center;
  margin-top: 8px;
}
.dot {
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  margin: 0 5px;
  display: inline-block;
  transition: all 0.3s ease;
}
.dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* ======================= Emoji Menu ======================= */
.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 25px 0;
  gap: 15px;
}
.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s;
}
.icon-card:hover { transform: scale(1.1); }
.icon-circle {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
  box-shadow: 0 0 10px rgba(255,255,255,0.25);
}
.icon-circle img {
  width: 80%;
  height: auto;
}

/* ---------------------------------------------------
       🔷 วงหมุนสินค้า (Orbit)
    --------------------------------------------------- */
.orbit-card {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 30px;
  background: #e9f4ff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
}

.orbit-container {
  width: 100%;
  height: 200px;
  position: relative;
}

.orbit-ring {
  position: absolute;
  width: 100%;
  height: 100%;
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-item img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.3s ease;
}

.orbit-item img:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: #007bff;
  text-align: center;
  font-size: 1.5rem;
}


.orbit-item a {
  position: relative;
  display: inline-block;
}

.orbit-item a::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #007bff, #00b4ff);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
/* ======================= Video Controls ======================= */
.video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px auto;
  max-width: 560px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
}
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px auto 25px;
}
.btn {
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 8px 15px;
  border: 1px solid rgba(0,255,150,0.3);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  transition: all 0.3s ease;
}
.btn:hover {
  background: rgba(0,255,150,0.25);
  box-shadow: 0 0 10px rgba(0,255,150,0.6);
  transform: translateY(-2px);
}

/* ======================= Footer ======================= */
footer {
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(0,255,150,0.3);
  margin-top: 30px;
  position: relative;
  z-index: 2;
}

/* ======================= ปุ่มลิงก์ผลิตภัณฑ์ ======================= */
.link-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 25px auto 40px;
  max-width: 950px;
  padding: 0 10px;
}
.link-buttons a {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
  transition: all 0.35s ease;
  overflow: hidden;
}
.link-buttons a:hover {
  transform: translateY(-4px) scale(1.03);
  background: linear-gradient(135deg, #00eaff, #6a11cb);
  box-shadow: 0 0 20px rgba(0,238,255,0.6), 0 0 35px rgba(106,17,203,0.3);
  border-color: rgba(0,255,255,0.5);
}
.link-buttons a::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.2) 100%);
  transition: 0.5s;
}
.link-buttons a:hover::before {
  left: 100%;
}
@media (max-width: 768px) {
  .link-buttons a {
    width: 100%;
    text-align: center;
    font-size: 1rem;
  }
}
/* ======================= Logo & Title Spin (KingWeb Server) ======================= */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  animation: spinClockwise 14s linear infinite, glowPulse 3s ease-in-out infinite;
}

/* โลโก้หมุนตามเข็ม */
@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* หัวข้อหมุนทวนเข็ม + วิบวับเบา ๆ */
header h1 {
  display: inline-block;
  font-weight: 700;
  font-size: 1.8rem;
  margin-top: 5px;
  animation: spinCounter 18s linear infinite, titleGlow 3s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 25px rgba(0,255,255,0.4);
}

/* หมุนทวนเข็ม */
@keyframes spinCounter {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* แสงกระพริบ Aurora */
@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 8px rgba(255,255,255,0.6),
                 0 0 18px rgba(0,255,255,0.4),
                 0 0 28px rgba(0,255,255,0.3);
  }
  50% {
    text-shadow: 0 0 16px rgba(255,255,255,1),
                 0 0 35px rgba(0,255,255,0.8),
                 0 0 60px rgba(0,180,255,0.5);
  }
}
/* ======================= Logo & Title Spin (Horizontal 3D Edition) ======================= */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  animation: spinClockwise 14s linear infinite, glowPulse 3s ease-in-out infinite;
}

/* โลโก้หมุนตามเข็ม */
@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ======================= 🌐 KingWeb Server 🌐 หมุนแนวนอน ======================= */
header h1 {
  display: inline-block;
  font-weight: 700;
  font-size: 1.8rem;
  margin-top: 5px;
  text-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 25px rgba(0,255,255,0.4);
  animation: horizontalFlip 8s linear infinite, titleAuroraGlow 5s ease-in-out infinite;
  transform-origin: center;
  perspective: 800px;
}

/* หมุนแนวนอน (แกน X) แบบพลิก 3D */
@keyframes horizontalFlip {
  0%   { transform: rotateX(0deg); }
  25%  { transform: rotateX(180deg); }
  50%  { transform: rotateX(360deg); }
  75%  { transform: rotateX(540deg); }
  100% { transform: rotateX(720deg); }
}

/* เอฟเฟกต์ Aurora Glow */
@keyframes titleAuroraGlow {
  0% {
    color: #a8e6ff;
    text-shadow: 0 0 15px #6ef5ff, 0 0 30px #00ffe0, 0 0 60px #00ccff;
  }
  25% {
    color: #ffb7ff;
    text-shadow: 0 0 20px #ff7ee0, 0 0 40px #ff42c2, 0 0 70px #ff00ff;
  }
  50% {
    color: #b0ffb7;
    text-shadow: 0 0 20px #00ffb7, 0 0 40px #00ffa6, 0 0 70px #00ff77;
  }
  75% {
    color: #a8e6ff;
    text-shadow: 0 0 15px #6ef5ff, 0 0 30px #00ffe0, 0 0 60px #00ccff;
  }
  100% {
    color: #ffb7ff;
    text-shadow: 0 0 20px #ff7ee0, 0 0 40px #ff42c2, 0 0 70px #ff00ff;
  }
}
