/* ===== พื้นหลังหลัก (Dark Tech Glow) ===== */
html, body {
  background:
    radial-gradient(circle at 20% 10%, rgba(0,140,255,.25), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(120,0,255,.25), transparent 45%),
    linear-gradient(135deg, #02040a 0%, #060f25 45%, #020818 100%) !important;
  color: #e6ebff;
}

/* ===== กล่องเว็บหลัก ===== */
.site,
.site-grid,
.container,
.container-fluid,
main,
#main,
#content {
  background: transparent !important;
}

/* ===== การ์ด / โมดูล (Glass + Glow) ===== */
.card,
.moduletable,
.login,
.box,
.alert {
  background: rgba(6, 14, 32, 0.88) !important;
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(0,180,255,.25);
  box-shadow:
    0 0 0 1px rgba(0,140,255,.15),
    0 15px 40px rgba(0,0,0,.7),
    inset 0 0 30px rgba(0,120,255,.08);
  transition: all .3s ease;
}

/* Hover เรืองแสง */
.card:hover,
.moduletable:hover {
  box-shadow:
    0 0 0 1px rgba(120,0,255,.5),
    0 0 35px rgba(120,0,255,.4),
    0 25px 60px rgba(0,0,0,.8);
}

/* ===== หัวข้อ ===== */
h1, h2, h3 {
  color: #eaf1ff;
  text-shadow: 0 0 12px rgba(0,140,255,.35);
}

/* ===== เมนู / Sidebar ===== */
aside,
.sidebar {
  background: transparent !important;
}

/* ===== ปุ่ม ===== */
button,
.btn {
  background: linear-gradient(135deg, #0a7cff, #6a00ff);
  border: none;
  color: #fff;
  box-shadow: 0 0 20px rgba(0,120,255,.6);
}

button:hover,
.btn:hover {
  box-shadow: 0 0 35px rgba(120,0,255,.9);
}

/* ===== Input ===== */
input, select {
  background: rgba(5,10,25,.85) !important;
  color: #fff;
  border: 1px solid rgba(0,140,255,.4);
}
/* ===== RGB Moving Light Background ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255,0,150,.25), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(0,200,255,.25), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(120,0,255,.25), transparent 45%);
  animation: rgbMove 20s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes rgbMove {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
/* ===== CYBERPUNK BACKGROUND ===== */
body {
  background: linear-gradient(135deg, #050b17, #0b0f1e, #120018);
  color: #e6e6f0;
}

/* RGB Glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(0,255,255,.18), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,0,255,.18), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0,255,140,.15), transparent 50%);
  animation: cyberGlow 18s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes cyberGlow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
/* ===== CYBER FOG LAYER ===== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(0,255,255,.10), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(255,0,255,.10), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0,255,140,.08), transparent 50%);
  filter: blur(60px);
  animation: fogMove 40s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes fogMove {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-120px, -80px); }
  100% { transform: translate(0, 0); }
}
/* ===== BACK FOG ===== */
.site::after {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle, rgba(255,255,255,.05), transparent 60%);
  filter: blur(120px);
  animation: fogSlow 80s ease-in-out infinite;
  z-index: -2;
  pointer-events: none;
}

@keyframes fogSlow {
  0% { transform: translate(0,0); }
  50% { transform: translate(150px,100px); }
  100% { transform: translate(0,0); }
}
/* ===== CONTENT LAYER ===== */
.site,
.container,
.card,
.moduletable {
  position: relative;
  z-index: 2;
}
@keyframes fogPulse {
  0%, 100% { opacity: .9; }
  50% { opacity: .6; }
}

body::after {
  animation:
    fogMove 40s linear infinite,
    fogPulse 8s ease-in-out infinite;
}
/* ลบพื้นหลังดำของกรอบรูป */
.mod-custom,
.moduletable,
.pbck-item,
.pbck-content,
.pbck-image,
.pbck-column,
.pbck-row {
  background: transparent !important;
}
/* ทำให้รูปเต็มกรอบ */
.pbck-image,
.pbck-image img {
  width: 100%;
  height: 100%;
}

.pbck-image img {
  object-fit: cover;   /* สำคัญที่สุด */
  display: block;
}
.my-new-icon {
  background-image: url("../images/sprite.png.png");
  background-position: -128px -64px; /* ตำแหน่งรูปที่คุณเพิ่ม */
  width: 32px;
  height: 32px;
  display: inline-block;
}
.character {
  width: 32px;
  height: 32px;
  background-image: url("/templates/cassiopeia/sprite.png");
  background-repeat: no-repeat;

  animation: walk 0.6s steps(4) infinite;
}

@keyframes walk {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -128px 0;
  }
}
