:root {
  --bg: #0b0b0b;
  --card: #111216;
  --soft: #171922;
  --line: #222433;
  --text: #e6e7ef;
  --muted: #a8adbf;
  --red: #e50914;
  --red-2: #ff2442;
  --glow: 0 10px 30px rgba(229,9,20,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Noto Sans Thai", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(229,9,20,.15), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(229,9,20,.12), transparent 60%),
    linear-gradient(180deg,#090909 0%, #0d0d10 40%, #0b0b0b 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
}

/* Containers */
.mx-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.mx-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,18,.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 3px 20px rgba(0,0,0,.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
}
.brand-text { font-weight: 900; letter-spacing: .5px; }
.brand-red { color: var(--red); }
.badge-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--red); box-shadow: 0 0 0 6px rgba(229,9,20,.18); }

.nav { display: flex; gap: 18px; }
.nav-link {
  color: #dfe3ff; text-decoration: none; opacity: .8; padding: 8px 12px; border-radius: 10px; transition: .2s;
}
.nav-link:hover { opacity: 1; background: rgba(255,255,255,.06); }
.nav-link.is-active { background: rgba(229,9,20,.2); color: #fff; box-shadow: var(--glow); }
.nav-link.login { background: linear-gradient(90deg,var(--red),var(--red-2)); color: white; box-shadow: var(--glow); }

.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }

.mobile-menu {
  display: none; position: fixed; top:64px; left:0; right:0;
  background:#0e0f14; border-bottom:1px solid #222; padding:12px 16px; z-index:40;
}
.mobile-menu.open { display:block; animation: drop .2s ease; }
@keyframes drop { from { transform:translateY(-10px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.m-link { display:block; color:#fff; text-decoration:none; padding:12px; border-radius:12px; }
.m-link.is-active, .m-link:hover { background:rgba(229,9,20,.18); }

/* Announcement */
.announce { border-bottom: 1px solid rgba(255,255,255,.06); background:#0c0d12;margin-top: 10px; }
.announce-inner { display:flex; gap:2px; align-items:center; height:44px; }
/*.pill { background:linear-gradient(90deg,var(--red),var(--red-2)); padding:6px 10px; border-radius:25px; font-weight:700; width: 100px; }*/
.pill {
  background:linear-gradient(90deg,var(--red),var(--red-2));
  padding:6px 10px;
  border-radius:25px;
  font-weight:700;
  width: 100px;
  flex: 0 0 100px; 
  min-width: 100px;
  max-width: 100px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.announce-marquee { overflow:hidden; white-space:nowrap; }
.announce-marquee span { display:inline-block; animation: marq 30s linear infinite; }
@keyframes marq { from{transform:translateX(0);} to{transform:translateX(-100%);} }
@media (max-width:1300px){.pill{width: 100px;}}
@media (max-width:600px){.pill{width: 100px;}}
/* Hero Slider */
.hero{padding:20px 0 8px}
.slider{position:relative}
.slides{display:grid;grid-auto-flow:column;grid-auto-columns:100%;overflow:hidden;border-radius:18px;border:1px solid var(--line);background:var(--soft)}
.slide{aspect-ratio:1248/490;background:#0e0f15 url('') center/cover no-repeat;position:relative}
.slide>a,.slide>img{display:block;width:100%;height:100%;object-fit:cover}
/* -Banner */
.hero .slide {
  aspect-ratio: 1440 / 450;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner-progress{
  position:absolute;
  left:14px;
  bottom:14px;
  width:42px;
  height:42px;
  border-radius:50%;
  background:conic-gradient(#ff0033 var(--progress, 0deg), rgba(255,255,255,.18) 0deg);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:5;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
}
.banner-progress::before{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:50%;
  background:rgba(12,13,18,.88);
}
.banner-progress span{
  position:relative;
  z-index:1;
  font-size:12px;
  font-weight:900;
  color:#fff;
}
.announce-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.announce-rate{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(124,242,164,.32);
  background:rgba(124,242,164,.08);
  color:#7cf2a4;
  font-weight:900;
  font-size:13px;
  white-space:nowrap;
}



.skeleton{background:linear-gradient(90deg,#14161f 25%,#1c2030 37%,#14161f 63%);background-size:400% 100%;animation:shimmer 1.2s infinite}
@keyframes shimmer{0%{background-position:100% 0}100%{background-position:0 0}}
.slider-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:rgba(12,12,16,.5);backdrop-filter: blur(6px);color:#fff;cursor:pointer;z-index: 5;}
.slider-nav:hover{box-shadow:var(--glow)}
.slider-nav.left{left:12px}
.slider-nav.right{right:12px}
.dots{display:flex;gap:8px;justify-content:center;margin-top:10px}
.dot{width:10px;height:10px;border-radius:999px;background:#3b3e4e;cursor:pointer}
.dot.active{background:linear-gradient(90deg,var(--red),var(--red-2));box-shadow:var(--glow)}

/* Section */
.section { padding:26px 0; }
.section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.title { margin:0; font-size:22px; }
.progress-rail { width:180px; height:10px; background:#1a1d2a; border-radius:999px; overflow:hidden; }
.progress-bar { width:0; height:100%; background:linear-gradient(90deg,var(--red),var(--red-2)); color:#fff; text-align:right; font-size:10px; padding-right:4px; }

/* Cards */
.cards-row { display:grid; grid-auto-flow:column; grid-auto-columns:140px; gap:14px; overflow-x:auto; padding-bottom:8px; scroll-snap-type:x mandatory; }
.cards-row::-webkit-scrollbar { height:8px; }
.cards-row::-webkit-scrollbar-thumb { background:#2a2e40; border-radius:999px; }
.row-btn { width:38px; height:38px; border:1px solid rgba(255,255,255,.18); border-radius:12px; background:#0f1118; color:#fff; cursor:pointer; }
.row-btn:hover { box-shadow:var(--glow); }

.cards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:14px; }
@media (max-width:1200px){.cards-grid{grid-template-columns:repeat(6,1fr)}.nav{display:none} .hamburger{display:block}.slider-nav{width: 30px;height: 30px;border-radius:8px;}}
@media (max-width:900px){.cards-grid{grid-template-columns:repeat(4,1fr)} }
@media (max-width:600px){.cards-grid{grid-template-columns:repeat(3,1fr)}.badge.effect{font-size:7.5px}.badge.discount{font-size:8px}.effect2{font-size:16px}.cards-row{grid-auto-columns: 110px;}.slider-nav{width: 25px;height: 25px;border-radius:5px;}}

/* ===== Card ===== */
.card {
  background:linear-gradient(180deg,#0f1118,#0c0d13);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  transition:transform .2s,box-shadow .2s,border-color .2s;
  scroll-snap-align:center;
  position:relative;
}
.card:hover { transform:translateY(-2px); box-shadow:var(--glow); border-color:rgba(229,9,20,.4); }
/* badge */
.card-thumb{
  position: relative;
  overflow: hidden;
  border-radius: 14px;


  --pad: clamp(6px, 1.2vw, 12px);
  --fs-badge: clamp(9px, 1.2vw, 12px);
  --fs-effect: clamp(9px, 1.1vw, 11.5px);
  padding: var(--pad);
}


.card-thumb img{
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  /*object-fit: contain;*/
  display: block;
  margin: 0;
  border-radius: 10px;
  background: #0e0f15;
}

.card-thumb img{
  position: relative;
  z-index: 0;
}

/* badge ตั้งไว้ข้างบนจะได้มองเห็นแหละ */
.card-thumb .badge,
.card-thumb .effect2{
  position: absolute;   /* เผื่อบางตัวไม่ได้กำหนดไว้ก่อนค่อยมาดู */
  z-index: 1;
}


/* badge ส่วนลด ขวาบน */
.card-thumb .badge.discount{
  position: absolute;
  top: var(--pad);
  right: var(--pad);
  font-size: var(--fs-badge);
  background: linear-gradient(90deg,var(--red),var(--red-2));
  color: #fff;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  box-shadow: var(--glow);
}

/* badge effect ล่างซ้าย */
.card-thumb .badge.effect{
  position: absolute;
  bottom: var(--pad);
  left: var(--pad);
  font-size: var(--fs-effect);
  color: #fff;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}

/* effect2 (ไอคอน ⚙️🔥⭐) ซ้ายบน */
.card-thumb .effect2{
  position: absolute;
  top: var(--pad);
  left: var(--pad);
  font-size: clamp(16px, 2vw, 20px);
  animation: pop 1.5s ease-in-out infinite;
}

/* style effect*/
.effect2.fire { color: #ff3c00; text-shadow: 0 0 10px #ff7040; }
.effect2.news { color: #fff; text-shadow: 0 0 10px #00a4ff; animation: pop 2.0s linear(0 0%, 0 2.27%, 0.02 4.53%, 0.04 6.8%, 0.06 9.07%, 0.1 11.33%, 0.14 13.6%, 0.25 18.15%, 0.39 22.7%, 0.56 27.25%, 0.77 31.8%, 1 36.35%, 0.89 40.9%, 0.85 43.18%, 0.81 45.45%, 0.79 47.72%, 0.77 50%, 0.75 52.27%, 0.75 54.55%, 0.75 56.82%, 0.77 59.1%, 0.79 61.38%, 0.81 63.65%, 0.85 65.93%, 0.89 68.2%, 1 72.7%, 0.97 74.98%, 0.95 77.25%, 0.94 79.53%, 0.94 81.8%, 0.94 84.08%, 0.95 86.35%, 0.97 88.63%, 1 90.9%, 0.99 93.18%, 0.98 95.45%, 0.99 97.73%, 1 100%) infinite; }
.effect2.star { color: #ffd700; text-shadow: 0 0 10px #fff4b0; animation: spin 2s linear infinite; }
.effect2.gear { color: #ccc; text-shadow: 0 0 8px #777; animation: spin 2s linear infinite; }

@keyframes pop {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* สีพื้นหลังป้าย effect */
.effect-1 { background: linear-gradient(90deg,#ff4141,#ff7a7a); }
.effect-2 { background: linear-gradient(90deg,#ff9900,#ffd966); }
.effect-3 { background: linear-gradient(90deg,#41ff79,#7affb1); }
.effect-4 { background: linear-gradient(90deg,#4a9cff,#89c7ff); }
.effect-5 { background: linear-gradient(90deg,#ff00ff,#ff55aa); }

/* ตำแหน่งล่างซ้าย (ยึด var(--pad)*/
.card-thumb .badge.effect{
  bottom: var(--pad);
  left: var(--pad);
  font-size: var(--fs-effect);
  color: #fff;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}



/* Card body */
.card-body { padding:10px; }
.card-title { margin:0; font-size:13px; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;text-align: center; }
@media (max-width:900px){.card-title{white-space: nowrap;font-size:13px;}}
@media (max-width:500px){.card-title{white-space: nowrap;font-size:9px;}}

.price { display:flex; gap:8px; margin-top:6px; }
.price-now { font-weight:800; font-size:13px; }
.price-old { color:var(--muted); text-decoration:line-through; font-size:12px; }
.progress {
  position: relative;
  background: #1a1d2a;
  height: 18px;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 4px rgba(255,255,255,0.1);
}
.progress > span:not(.progress-text) {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--red-2));
}
.progress-text {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  text-align: center;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* Tabs + Search */
.tabs{display:flex;gap:8px}
.tab{background:#0f1118;border:1px solid var(--line);color:#cfd5f7;padding:8px 12px;border-radius:10px;cursor:pointer}
.tab.is-active{background:linear-gradient(90deg,var(--red),var(--red-2));color:#fff;box-shadow:var(--glow)}
.tab-panels .panel{display:none}
.tab-panels .panel.is-active{display:block}

.searchbar{position:relative;margin:12px 0 18px}
.searchbar input{
  width:100%;background:#0f1118;border:1px solid var(--line);color:#fff;
  padding:12px 44px;border-radius:12px;outline:none;transition:border-color .2s;
}
.searchbar input:focus{border-color:rgba(229,9,20,.6);box-shadow:var(--glow)}
.searchbar i{position:absolute;left:12px;top:50%;transform:translateY(-50%);opacity:.75}
.suggest{position:absolute;left:0;right:0;top:100%;background:#0f1118;border:1px solid var(--line);border-radius:12px;margin-top:6px;list-style:none;padding:6px 0;display:none;z-index:5;max-height:260px;overflow:auto}
.suggest li{padding:10px 12px;cursor:pointer}
.suggest li:hover{background:#141726}

/* Footer */
.footer { margin-top:30px; border-top:1px solid rgba(255,255,255,.06); padding:24px 0; background:#0c0d12; }
.footer-inner { display:grid; grid-template-columns:2fr 1fr 1fr; gap:18px; }
.footer a { display:block; color:#cfd5f7; text-decoration:none; margin:6px 0; }
.footer a:hover { color:#fff; }
.foot-note { opacity:.8; margin:6px 0 0; }
.copyright { text-align:center; font-size:13px; opacity:.6; padding-top:8px; border-top:1px solid rgba(255,255,255,.06); }

/* ===== CUSTOMER ORDER NOTIFICATION (RED-THEME VERSION) ===== */
#notification-container {
  position: fixed;
  bottom: 120px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 9998;
  transition: right 0.4s ease, bottom 0.4s ease;
}
#notification-container.closed {
  right: -360px;
}

/* กล่องแจ้งเตือน */
.notification {
  display: flex;
  align-items: flex-start;
  background: rgba(20, 20, 25, 0.85);
  color: #fff;
  padding: 12px;
  border-radius: 12px;
  max-width: 320px;
  font: 14px/1.4 "Noto Sans Thai", sans-serif;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  border: 1px solid rgba(229,9,20,0.35);
  box-shadow: 0 0 15px rgba(229,9,20,0.25);
  backdrop-filter: blur(8px);
}

/* Animation */
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.8) translateY(20px); }
  60%  { opacity: 1; transform: scale(1.05) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.notification.show {
  animation: popIn 0.5s ease forwards;
}

/* Animation */
@keyframes slideOutRight {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}
.notification.exit {
  animation: slideOutRight 0.5s ease-in-out forwards;
}

/* ภาพสินค้า */
.notification img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 12px;
  box-shadow: 0 0 12px rgba(229,9,20,0.35);
}

/* รายละเอียดข้อความ */
.notification .details {
  display: flex;
  flex-direction: column;
}
.notification .details div {
  margin-bottom: 4px;
}
.notification label {
  font-weight: bold;
  margin-right: 6px;
  min-width: 60px;
  color: var(--red-2);
}

/* ===== TOGGLE BUTTON ===== */
.toggle-btn {
  position: fixed;
  right: 16px;
  bottom: 68px;
  background: linear-gradient(90deg,var(--red),var(--red-2));
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: var(--glow);
  z-index: 1110;
}
.toggle-btn:hover { opacity: 0.9; }

/* ===== RESPONSIVE ===== */
@media (max-width:600px) {
  #notification-container { bottom: 140px; }
  .notification {
    max-width: 200px;
    padding: 8px;
    font: 12px/1.3 "Noto Sans Thai", sans-serif;
    border-radius: 12px;
  }
  .notification img { width: 48px; height: 48px; margin-right: 8px; }
  .notification label { min-width: 50px; margin-right: 4px; }
  #toggle-btn { bottom: 70px; right: 20px; }
}



/*menu*/
.nav-link.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
}
.nav-link.user-info .cash {
  color: var(--red-2);
  font-weight: 800;
}
.nav-link.logout {
  background: none;
  color: #ff8080;
}
.nav-link.logout:hover {
  background: rgba(229,9,20,.25);
  color: #fff;
}

/* ให้ header อยู่เหมือนเป็นลูกของ <body> เพื่อให้ sticky ทำงานยาวทั้งหน้า */
#header-container { display: contents; }

/* ===== Fixed header (CSS only) ===== */
:root { --header-h: 64px; } /* เท่ากับ .header-inner สูง 64px */

.mx-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000; /* สูงกว่า mobile menu (40) และปุ่มสไลด์ (5) */
}
/* ชดเชยระยะให้คอนเทนต์ไม่โดนทับ */
body{ padding-top: var(--header-h); }




/* ===== Scrollbar Theme (แดง-ดำ MxLarenShop) ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0e1a;            /* สีพื้นหลัง scrollbar */
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff0033, #8b0000);
  border-radius: 8px;
  border: 2px solid #0b0e1a;      /* ให้มีขอบดูมีมิติ */
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff3355, #b00000);
}
::-webkit-scrollbar-corner {
  background: #0b0e1a;
}

/* สำหรับ Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #ff0033 #0b0e1a;
}


/*ช่องค้นหา CSS*/
.suggest li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.suggest li:hover {
  background: #141726;
}
.suggest li img.sug-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.suggest li .sug-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* ===== Floating Particles (background) ===== */
#mx-particles{
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden;
  z-index: 0;
}
.mx-dot{
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ff6a80, #e50914 55%, rgba(229,9,20,.5) 100%);
  box-shadow: 0 0 18px rgba(255, 60, 90, .55);
  opacity: .0;
  animation: mx-float var(--dur, 12s) linear infinite;
  transform: translate3d(0,0,0) scale(var(--scale, 1));
  will-change: transform, opacity;
  filter: saturate(1.1) contrast(1.05);
}
@keyframes mx-float{
  0%   { transform: translate3d(var(--x,0), 110vh, 0) scale(var(--scale,1)); opacity: 0; }
  8%   { opacity: .9; }
  50%  { opacity: 1; }
  100% { transform: translate3d(calc(var(--x,0) + var(--drift, 0px)), -10vh, 0) scale(var(--scale,1.1)); opacity: 0; }
}

.mx-dot.s { width: 5px; height: 5px; box-shadow: 0 0 10px rgba(255,40,60,.45); }
.mx-dot.m { width: 8px; height: 8px; }
.mx-dot.l { width: 12px; height: 12px; box-shadow: 0 0 28px rgba(255,50,70,.65); }

@media (prefers-reduced-motion: reduce){
  #mx-particles{ display:none; }
}



/* ===== Wallet badge ข้าง hamburger (มือถือ) ===== */
.wallet-badge {
  display: none;                 /* ปิดไว้ก่อน ให้ JS เปิดตอนล็อกอิน สำหรับมือถือ จำไว้ๆ */
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.wallet-badge {
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}


.wallet-badge i {
  font-size: 16px;
  color: var(--red-2);
}

/* แสดงเฉพาะจอเล็ก (มือถือ) */
@media (max-width: 1200px) {
  .wallet-badge {
    display: flex;
    margin-left: auto;   /* ดันไปขวาสุด */
  margin-right: 8px;   /* ระยะห่างจาก hamburger */
  }
}

/* กันไม่ให้ไปเกะกะบน desktop */
@media (min-width: 1201px) {
  .wallet-badge {
    display: none !important;
  }
}



/* ===== Mini News (max 4) ===== */
.mini-news{ padding: 14px 0 6px; }

.mini-news-card{
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(229,9,20,0.18), rgba(20,20,28,0.95));
  border: 1px solid rgba(229,9,20,0.35);
  box-shadow: 0 10px 30px rgba(229,9,20,.22);
  backdrop-filter: blur(10px);
}

.mini-news-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.mini-news-title{
  font-weight: 900;
  font-size: 14px;
  display:flex; align-items:center; gap: 8px;
}
.mini-news-title i{ color: var(--red); filter: drop-shadow(0 0 10px rgba(229,9,20,.35)); }

.mini-news-more{
  font-size: 12px;
  opacity: .85;
  text-decoration: none;
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}
.mini-news-more:hover{ box-shadow: var(--glow); }

.mini-news-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.mini-news-item{
  display:flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}

.mini-news-meta{
  width: 108px;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.mini-news-time{
  font-size: 11px;
  opacity: .85;
  white-space: nowrap;
}
.mini-news-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
  border: 1px solid rgba(255,255,255,.18);
}
.badge-NEW{ background: linear-gradient(90deg,var(--red),var(--red-2)); box-shadow: var(--glow); }
.badge-UP{ background: rgba(0,255,160,.16); border-color: rgba(0,255,160,.25); }
.badge-DOWN{ background: rgba(255,210,0,.14); border-color: rgba(255,210,0,.28); }
.badge-INFO{ background: rgba(120,180,255,.14); border-color: rgba(120,180,255,.28); }

.mini-news-body{ min-width:0; flex:1; }
.mini-news-h{
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-news-p{
  font-size: 12px;
  opacity: .9;
  display: -webkit-box;
  --webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width:600px){
  .mini-news-meta{ width: 94px; }
  .mini-news-more{ display:none; }
}


/*SEO CONTENT INDEX*/
.seo-highlight{
  padding: 36px 0 42px;
  background: radial-gradient(
    circle at center,
    rgba(255, 0, 0, 0.08),
    rgba(0, 0, 0, 0.9) 65%
  );
  border-top: 1px solid rgba(255,255,255,0.05);
}

.seo-title{
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.seo-title::before{
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #ff2b2b; /* แดงธีม */
}

.seo-desc{
  margin: 0;
  max-width: 900px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
}

/* Mobile */
@media (max-width:600px){
  .seo-highlight{
    padding: 28px 0 32px;
  }
  .seo-title{
    font-size: 17px;
  }
  .seo-desc{
    font-size: 13px;
  }
}
/* ===== SEO 3 CARDS ===== */
.seo-cards{
  padding: 26px 0 34px;
  background: transparent;
}

.seo-cards-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.seo-card{
  background: linear-gradient(
    180deg,
    rgba(229,9,20,0.15),
    rgba(15,16,22,0.95)
  );
  border: 1px solid rgba(229,9,20,0.35);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(229,9,20,.18);
  backdrop-filter: blur(6px);
}

.seo-card i{
  font-size: 22px;
  color: var(--red);
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(229,9,20,.45));
}

.seo-card h3{
  margin: 4px 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.seo-card p{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.75);
}

.seo-card{
  transition: 
    transform 0.35s cubic-bezier(.22,.61,.36,1),
    box-shadow 0.35s cubic-bezier(.22,.61,.36,1);
}

.seo-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 42px rgba(229,9,20,.35);
}



/* Mobile */
@media (max-width: 900px){
  .seo-cards-grid{
    grid-template-columns: 1fr;
  }
}




/* ===== ANNOUNCE BAR (RAZER + NEWS) – SMOOTH VERSION ===== */
.announce-bar{
  padding: 20px 0 10px;
}

.announce-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- CARD BASE ---------- */
.announce-card{
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg,#0f1118,#0c0d13);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;

  /* hover ช้าลง นุ่มขึ้น */
  transition:
    transform 0.55s cubic-bezier(.22,.61,.36,1),
    box-shadow 0.55s cubic-bezier(.22,.61,.36,1),
    border-color 0.55s ease,
    filter 0.55s ease;
}

/* ---------- RAZER ---------- */
.announce-card.razer{
  border-color: rgba(0,255,140,.28);
}

.announce-card.razer:hover{
  transform: translateY(-3px);
  border-color: rgba(0,255,140,.6);

  box-shadow:
    0 0 0 1px rgba(0,255,140,.22),
    0 14px 36px rgba(0,255,140,.28),
    inset 0 0 26px rgba(0,255,140,.18);

  filter: brightness(1.08) saturate(1.12);
}

/* ---------- NEWS ---------- */
.announce-card.news{
  border-color: rgba(255,120,120,.26);
}

.announce-card.news:hover{
  transform: translateY(-3px);
  border-color: rgba(255,120,120,.6);

  box-shadow:
    0 0 0 1px rgba(255,120,120,.22),
    0 14px 36px rgba(255,80,80,.28),
    inset 0 0 26px rgba(255,80,80,.15);

  filter: brightness(1.06) saturate(1.06);
}

/* ---------- CONTENT ---------- */
.announce-icon{
  font-size: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0,0,0,.45));
}

.announce-body h3{
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
}

.announce-body p{
  margin: 0;
  font-size: 13px;
  opacity: .85;
  line-height: 1.5;
}

.announce-btn{
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(90deg,#22c55e,#16a34a);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .4s ease, transform .4s ease;
}

.announce-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,255,140,.45);
}

.announce-list{
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

/* ===== MOBILE ===== */
@media (max-width: 900px){
  .announce-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== ANNOUNCE BG IMAGE LAYER ===== */
.announce-card.has-bg{
  position: relative;
}

/* layer รูป */
.announce-card.has-bg::before{
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.8; /* ความจางของรูป */
  z-index: 0;
}

/* overlay กันข้อความจม */
.announce-card.has-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.68),
    rgba(0,0,0,.38)
  );
  z-index: 1;
}

/* รูปแยกซ้ายขวา */
.announce-card.razer.has-bg::before{
  background-image: url("../images/bg-razer.webp");
}

.announce-card.news.has-bg::before{
  background-image: url("../images/bg-news.webp");
}

/* content อยู่บนสุด */
.announce-card.has-bg > *{
  position: relative;
  z-index: 2;
}


/* ===== Account security / sessions ===== */
.security-page {
  max-width: 1120px;
  padding: 28px 16px 100px;
  color: #f5f7ff;
}

.security-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.security-heading h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: 0;
}

.security-heading h1 i { color: #37b6ff; margin-right: 8px; }
.security-heading p { margin: 5px 0 0; color: #9ca8c7; font-size: 14px; }

.security-refresh,
.security-pager button,
.revoke-session {
  border: 1px solid rgba(255,255,255,.13);
  background: #171b29;
  color: #eef2ff;
  border-radius: 7px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s, background .18s, opacity .18s;
}

.security-refresh { padding: 9px 13px; display: inline-flex; align-items: center; gap: 7px; }
.security-refresh:hover, .security-pager button:hover { background: #202638; border-color: #37b6ff; }

.security-tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 18px;
}

.security-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #9ca8c7;
  font: 700 14px inherit;
  cursor: pointer;
}

.security-tab.active { color: #f5f7ff; border-bottom-color: #37b6ff; }
.security-count { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: #29334b; font-size: 11px; text-align: center; }
.security-tab.active .security-count { background: #087db9; color: #fff; }

.security-panel[hidden] { display: none; }
.session-list { display: grid; gap: 9px; }

.session-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: #141824;
}

.session-row.current { border-color: rgba(55,182,255,.55); background: #151d2c; }
.session-device-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: #20283b; color: #63c7ff; font-size: 20px; }
.session-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-weight: 800; font-size: 15px; }
.current-badge, .online-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.current-badge { color: #8dd7ff; background: rgba(55,182,255,.14); }
.online-status { color: #929bb5; background: rgba(255,255,255,.06); }
.online-status.online { color: #68e29a; background: rgba(38,190,105,.13); }
.online-status.online::before { content: ""; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #36d77d; }

.session-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 7px; color: #9ca8c7; font-size: 12px; }
.session-meta i { width: 14px; color: #7784a6; }
.revoke-session { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: #ff9ba2; border-color: rgba(255,92,105,.28); }
.revoke-session:hover { background: rgba(255,75,90,.1); border-color: #ff6673; }
.revoke-session:disabled, .security-pager button:disabled { opacity: .4; cursor: not-allowed; }

.security-table-wrap { overflow: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: #141824; }
.security-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.security-table th { padding: 12px 14px; background: #10131d; color: #aeb8d3; font-size: 12px; text-align: left; }
.security-table td { padding: 13px 14px; border-top: 1px solid rgba(255,255,255,.07); color: #dce2f4; font-size: 13px; vertical-align: middle; }
.security-table td:first-child { min-width: 220px; }
.security-table small { display: block; max-width: 420px; margin-top: 4px; color: #8490ae; font-size: 11px; }
.security-ip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.history-event { display: inline-block; padding: 3px 7px; border-radius: 5px; background: rgba(55,182,255,.12); color: #7fd2ff; font-weight: 800; font-size: 11px; }
.history-event.warning { color: #ffd36a; background: rgba(255,190,54,.11); }
.history-event.logout { color: #ff9ba2; background: rgba(255,92,105,.1); }

.security-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; color: #aab3ce; font-size: 13px; }
.security-pager button { width: 36px; height: 34px; }
.security-loading, .security-empty { padding: 40px 16px; color: #9ca8c7; text-align: center; }
.security-empty i { display: block; margin-bottom: 10px; font-size: 28px; color: #66708c; }
.security-message { position: fixed; z-index: 1000; right: 20px; bottom: 24px; max-width: min(390px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #e95b68; border-radius: 7px; background: #291820; color: #ffc6ca; box-shadow: 0 12px 28px rgba(0,0,0,.32); }
.security-message.success { border-color: #36bd74; background: #11271c; color: #8becb5; }

@media (max-width: 720px) {
  .security-page { padding: 18px 12px 100px; }
  .security-heading { align-items: flex-start; }
  .security-heading h1 { font-size: 21px; }
  .security-refresh span { display: none; }
  .security-tab { flex: 1; justify-content: center; padding: 0 8px; font-size: 12px; }
  .session-row { grid-template-columns: 42px minmax(0, 1fr); padding: 13px; gap: 11px; }
  .session-device-icon { width: 40px; height: 40px; }
  .revoke-session { grid-column: 1 / -1; justify-content: center; width: 100%; }
  .session-meta { display: grid; gap: 5px; }
  .security-message { right: 16px; bottom: 88px; }
}
