/* ============================================================
   Fire-RO Classic 4.0 — White / Orange Theme
   ============================================================ */

:root {
  --orange: #ff6a00;
  --orange-2: #ff7a1a;
  --orange-3: #ff8c2a;
  --orange-dark: #e55f00;
  --ink: #2b1b12;
  --ink-2: #5c4033;
  --ink-3: #888888;
  --line: #ffe0cc;
  --line-2: #ffd1b3;
  --bg: #ffffff;
  --bg-soft: #fff7f1;
  --bg-soft-2: #fff3ea;
  --green: #2eb872;
  --red: #e23b3b;
  --shadow-sm: 0 2px 10px rgba(255, 106, 0, 0.08);
  --shadow-md: 0 6px 24px rgba(255, 106, 0, 0.12);
  --shadow-lg: 0 12px 36px rgba(255, 106, 0, 0.16);
  --radius: 12px;
  --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', 'Segoe UI', Tahoma, 'Leelawadee UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

/* decorative background จาง ๆ (เมฆ/ประกาย/เส้นโค้งสีส้ม) — ไม่บังเนื้อหา */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(3px 3px at 12% 24%, rgba(255, 106, 0, 0.06), transparent 100%),
    radial-gradient(2px 2px at 78% 14%, rgba(255, 106, 0, 0.06), transparent 100%),
    radial-gradient(3px 3px at 88% 62%, rgba(255, 106, 0, 0.05), transparent 100%),
    radial-gradient(2px 2px at 32% 78%, rgba(255, 106, 0, 0.06), transparent 100%),
    radial-gradient(2px 2px at 60% 42%, rgba(255, 106, 0, 0.05), transparent 100%),
    radial-gradient(420px 220px at 6% 88%, rgba(255, 106, 0, 0.04), transparent 70%),
    radial-gradient(520px 260px at 96% 30%, rgba(255, 106, 0, 0.04), transparent 70%),
    radial-gradient(closest-side at 18% 12%, rgba(255, 106, 0, 0.03), transparent),
    repeating-radial-gradient(circle at 110% 110%, transparent 0 120px, rgba(255, 106, 0, 0.025) 120px 122px, transparent 122px 240px);
}
/* poring silhouette มุมล่างซ้าย จางมาก */
body::after {
  content: '';
  position: fixed;
  left: -40px;
  bottom: -30px;
  width: 280px;
  height: 280px;
  z-index: -1;
  pointer-events: none;
  background: url('/img/mascot-poring.png') no-repeat center / contain;
  opacity: 0.05;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-fire,
.btn-gold {
  background: linear-gradient(135deg, var(--orange-2), var(--orange));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.3);
}
.btn-fire:hover,
.btn-gold:hover {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 106, 0, 0.4);
}

.btn-outline {
  background: #fff;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-outline:hover {
  background: var(--bg-soft);
  color: var(--orange-dark);
  transform: translateY(-2px);
}

.btn-white,
.btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover,
.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.btn-discord {
  background: linear-gradient(135deg, #6573f5, #5865f2);
  color: #fff;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.26);
}
.btn-discord:hover {
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.36);
}

.btn-disabled {
  background: #f0f0f0;
  color: #aaa;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-xs { padding: 4px 12px; font-size: 12px; border-width: 1px; border-radius: 8px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(43, 27, 18, 0.06);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 24px rgba(255, 106, 0, 0.14), 0 2px 8px rgba(43, 27, 18, 0.08);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 76px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-logo { flex-shrink: 0; display: flex; align-items: center; }
.header-logo img { height: 54px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  position: relative;
  padding: 26px 11px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14.5px;
  transition: color 0.25s ease, transform 0.25s ease;
}
.main-nav a:hover {
  color: var(--orange);
  transform: translateY(-2px);
}
.main-nav a.active { color: var(--orange); font-weight: 600; }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 16px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffb066, var(--orange), var(--orange-dark));
  box-shadow: 0 1px 6px rgba(255, 106, 0, 0.4);
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 0 9px;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--orange);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============ Hero ============ */
/* ภาพ hero เต็มความกว้าง viewport — จางด้วย overlay เท่านั้น ห้ามใส่ opacity ที่ตัวรูป */
.hero {
  position: relative;
  min-height: 490px;
  overflow: hidden;
  background-color: var(--bg-soft);
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
/* overlay ขาวฝั่งซ้ายแบบเบา — เห็นตึก/เมืองด้านซ้ายชัด ตัวละครขวาชัดเกือบเต็ม
   backdrop-filter ช่วยดันคอนทราสต์/สีของภาพพื้นหลังให้คมขึ้นโดยไม่แตะตัวรูป */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.3) 30%,
    rgba(255, 255, 255, 0.15) 55%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: contrast(1.12) saturate(1.28);
  -webkit-backdrop-filter: contrast(1.12) saturate(1.28);
  z-index: 1;
  pointer-events: none;
}
/* ไล่ขาวเฉพาะขอบล่างให้กลืนกับ status bar */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 70%, #fff 100%);
  z-index: 2;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  min-height: 490px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
}
.hero-content {
  position: relative;
  width: 540px;
  max-width: 100%;
  /* กันพื้นที่ใต้ปุ่ม CTA ไว้ให้ status card ที่ลอยทับขอบล่าง hero (-62px) ไม่ทับปุ่ม */
  padding: 14px 0 90px;
  text-align: center;
}
/* glow สีส้มอ่อนรองหลังโลโก้ + ปุ่ม CTA — ช่วยให้บล็อกกลางเด่นขึ้นโดยไม่ทับตัวละครขวา */
.hero-content::before {
  content: '';
  position: absolute;
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 115%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 28%, rgba(255, 150, 60, 0.28), transparent 75%),
    radial-gradient(closest-side at 50% 85%, rgba(255, 120, 30, 0.18), transparent 70%);
}
.hero-logo {
  display: block;
  width: 450px;
  max-width: 100%;
  margin: 12px auto 26px;
  /* ขยับขวาเล็กน้อยให้โลโก้อยู่กลางพื้นที่ hero ฝั่งซ้ายมากขึ้น (เฉพาะ desktop)
     ใช้ตัวแปรเพื่อให้ keyframes ลอยขึ้นลงคงค่าแกน X นี้ไว้ได้ */
  --logo-shift: 24px;
  transform: translateX(var(--logo-shift));
  filter:
    drop-shadow(0 0 22px rgba(255, 106, 0, 0.4))
    drop-shadow(0 0 48px rgba(255, 140, 50, 0.25))
    drop-shadow(0 14px 30px rgba(120, 55, 12, 0.16));
  will-change: transform, filter;
  /* ลอยกับเรืองแสงใช้คาบต่างกันเล็กน้อย จังหวะจะเหลื่อมกันดูเป็นธรรมชาติ */
  animation:
    hero-logo-float 4s ease-in-out infinite,
    hero-logo-glow 5s ease-in-out infinite;
}
@keyframes hero-logo-float {
  0%, 100% { transform: translateX(var(--logo-shift)) translateY(0); }
  50% { transform: translateX(var(--logo-shift)) translateY(-10px); }
}
@keyframes hero-logo-glow {
  0%, 100% {
    filter:
      drop-shadow(0 0 18px rgba(255, 106, 0, 0.3))
      drop-shadow(0 0 40px rgba(255, 140, 50, 0.18))
      drop-shadow(0 14px 30px rgba(120, 55, 12, 0.16));
  }
  50% {
    filter:
      drop-shadow(0 0 32px rgba(255, 106, 0, 0.62))
      drop-shadow(0 0 62px rgba(255, 140, 50, 0.4))
      drop-shadow(0 14px 30px rgba(120, 55, 12, 0.16));
  }
}
/* ===== ประกายไฟลอยรอบโลโก้ ===== */
/* คลุมพื้นที่โลโก้ (กว้างเท่าโลโก้ + เผื่อขอบ) แล้วให้เม็ดไฟลอยขึ้นจากโซนล่างของโลโก้ */
.hero-sparks {
  position: absolute;
  top: 0;
  left: 50%;
  /* เลื่อนตามแกน X เดียวกับโลโก้ (desktop ขยับขวา 24px) */
  transform: translateX(calc(-50% + 24px));
  width: 470px;
  max-width: 100%;
  height: 250px;
  pointer-events: none;
  z-index: 1;
}
.hero-sparks span {
  position: absolute;
  bottom: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3d6 0%, #ffc070 35%, #ff8c2a 60%, rgba(255, 106, 0, 0) 80%);
  box-shadow:
    0 0 10px 3px rgba(255, 150, 50, 0.7),
    0 0 22px 6px rgba(255, 110, 10, 0.35);
  opacity: 0;
  will-change: transform, opacity;
  animation: spark-rise 4.5s ease-out infinite;
}
/* แต่ละเม็ดต่างตำแหน่ง/ขนาด/ทิศเอียง/คาบ/ดีเลย์ ให้ดูสุ่มเป็นธรรมชาติ */
.hero-sparks span:nth-child(1) { left: 8%;  width: 7px;  height: 7px;  --sx: -14px; --rise: -150px; animation-duration: 4.2s; }
.hero-sparks span:nth-child(2) { left: 18%; width: 10px; height: 10px; --sx: 10px;  --rise: -170px; animation-duration: 5.1s; animation-delay: 1.2s; }
.hero-sparks span:nth-child(3) { left: 30%; width: 6px;  height: 6px;  --sx: -8px;  --rise: -120px; animation-duration: 3.6s; animation-delay: 0.6s; }
.hero-sparks span:nth-child(4) { left: 44%; width: 9px;  height: 9px;  --sx: 16px;  --rise: -180px; animation-duration: 4.8s; animation-delay: 2s; }
.hero-sparks span:nth-child(5) { left: 55%; width: 7px;  height: 7px;  --sx: -12px; --rise: -140px; animation-duration: 3.9s; animation-delay: 0.3s; }
.hero-sparks span:nth-child(6) { left: 66%; width: 11px; height: 11px; --sx: 8px;   --rise: -165px; animation-duration: 5.4s; animation-delay: 1.7s; }
.hero-sparks span:nth-child(7) { left: 78%; width: 6px;  height: 6px;  --sx: -10px; --rise: -125px; animation-duration: 4.4s; animation-delay: 2.6s; }
.hero-sparks span:nth-child(8) { left: 88%; width: 9px;  height: 9px;  --sx: 14px;  --rise: -155px; animation-duration: 4s;   animation-delay: 0.9s; }
.hero-sparks span:nth-child(9) { left: 50%; width: 7px;  height: 7px;  --sx: -6px;  --rise: -135px; animation-duration: 5s;   animation-delay: 3.2s; }
@keyframes spark-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.5);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  60% {
    opacity: 0.75;
  }
  100% {
    transform: translate3d(var(--sx, 10px), var(--rise, -150px), 0) scale(1.05);
    opacity: 0;
  }
}

.hero-title {
  font-size: 34px;
  font-weight: 900;
  color: #2b1b12;
  text-shadow:
    0 3px 12px rgba(255, 255, 255, 0.8),
    0 8px 24px rgba(255, 106, 0, 0.18);
}
.hero-sub {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 500;
  color: #5c4033;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.75);
}
/* 3 ปุ่มต้องอยู่บรรทัดเดียวบน desktop — ปุ่มจึงรัดกว่า btn-lg ปกติ */
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 14px;
  margin-top: 24px;
}
.hero-cta .btn {
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(255, 106, 0, 0.28), 0 0 22px rgba(255, 140, 50, 0.25);
  transition: all 0.25s ease;
}
.hero-cta .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(255, 106, 0, 0.38), 0 0 30px rgba(255, 140, 50, 0.32);
}
.hero-cta .btn-discord {
  box-shadow: 0 12px 28px rgba(88, 101, 242, 0.28), 0 0 22px rgba(88, 101, 242, 0.18);
}
.hero-cta .btn-discord:hover {
  box-shadow: 0 18px 38px rgba(88, 101, 242, 0.38), 0 0 30px rgba(88, 101, 242, 0.25);
}

.hero-float {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  will-change: transform;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 10px 16px rgba(43, 27, 18, 0.25)) drop-shadow(0 0 14px rgba(255, 150, 60, 0.35));
}
/* แต่ละตัวลอยคนละระยะ/คาบ/ดีเลย์ ให้ดูเป็นธรรมชาติ — ตัวใหญ่ลอยลึกช้า ตัวเล็กลอยตื้นเร็วกว่า */
.hero-float-1 {
  width: 86px;
  top: 56px;
  left: 46%;
  --float-amp: -10px;
  animation-duration: 5s;
}
.hero-float-2 {
  width: 72px;
  top: 120px;
  right: 6%;
  --float-amp: -6px;
  animation-duration: 6.5s;
  animation-delay: 1s;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--float-amp, -12px)); }
}

/* ============ Server Status Bar ============ */
/* อยู่นอก .hero (เพราะ hero ใช้ overflow:hidden) แล้วดึงขึ้นมาทับขอบล่าง hero */
.status-bar {
  position: relative;
  /* ลอยทับขอบล่าง hero ให้รู้สึกคั่นระหว่าง hero กับ section ล่าง */
  margin: -62px auto 0;
  /* กว้างเท่า content ด้านล่าง (1200 - padding 16x2) ให้แนวซ้ายขวาตรงกัน */
  width: min(1168px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  z-index: 5;
}
/* การ์ดลอยแยกชิ้น — ตัวการ์ตูนซ้าย ข้อความ 2 บรรทัด (ป้ายชื่อ/ตัวเลข) ขวา */
.status-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f1 100%);
  border: 1px solid rgba(255, 107, 0, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(255, 107, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.status-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(255, 122, 24, 0.18);
}
.status-item:hover .status-ico-img {
  transform: scale(1.1);
}
.status-ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft-2);
  color: var(--orange);
}
.status-ico svg { width: 22px; height: 22px; }
.status-ico-img {
  width: 47px;
  height: 47px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff2e8, #ffe2cc);
  box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.18);
  transition: transform 0.2s ease;
  overflow: hidden;
}
.status-ico-img img { width: 50px; height: 50px; flex-shrink: 0; object-fit: contain; }
.status-ico-green { background: #e6f8ee; color: var(--green); }
.status-text { text-align: center; }
.status-label { font-size: 12.5px; color: var(--ink-3); }
.status-value {
  font-size: 22px;
  font-weight: 800;
  color: #ff6a00;
  line-height: 1.25;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 8px rgba(255, 122, 24, 0.15);
}
.status-value.st-online { color: var(--green); text-shadow: 0 0 12px rgba(46, 184, 114, 0.3); }
.status-value.st-offline { color: #c8504e; text-shadow: 0 1px 10px rgba(200, 80, 78, 0.22); }
/* แยกสีตัวเลขแต่ละการ์ด: ออนไลน์=ฟ้า, แอคเคาท์=ส้ม, ตัวละคร=ชมพู */
.status-value.st-players { color: #2f7fe0; text-shadow: 0 1px 10px rgba(47, 127, 224, 0.22); }
.status-item:nth-child(4) .status-value { color: #e84d8a; text-shadow: 0 1px 10px rgba(232, 77, 138, 0.22); }
/* วงกลมตัวการ์ตูนไล่โทนตามสีตัวเลขของการ์ด */
.status-item:nth-child(1) .status-ico-img { background: linear-gradient(135deg, #eafaf1, #d4f3e2); box-shadow: inset 0 0 0 1px rgba(46, 184, 114, 0.25); }
.status-item:nth-child(2) .status-ico-img { background: linear-gradient(135deg, #ecf4ff, #d9e9ff); box-shadow: inset 0 0 0 1px rgba(47, 127, 224, 0.25); }
.status-item:nth-child(4) .status-ico-img { background: linear-gradient(135deg, #ffeef5, #ffdcea); box-shadow: inset 0 0 0 1px rgba(232, 77, 138, 0.25); }

/* ============ Layout ============ */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 16px 48px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.layout-full {
  grid-template-columns: 1fr;
  position: relative;
}
/* ลดความโล่งของพื้นขาวหลัง status bar — gradient ส้มอ่อน + ประกาย ember จาง ๆ ไม่แย่งสายตา */
.layout-full::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 560px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(3px 3px at 18% 18%, rgba(255, 122, 26, 0.18), transparent 100%),
    radial-gradient(2px 2px at 30% 42%, rgba(255, 106, 0, 0.14), transparent 100%),
    radial-gradient(4px 4px at 72% 24%, rgba(255, 150, 60, 0.16), transparent 100%),
    radial-gradient(2px 2px at 86% 50%, rgba(255, 106, 0, 0.12), transparent 100%),
    radial-gradient(3px 3px at 55% 12%, rgba(255, 140, 42, 0.14), transparent 100%),
    radial-gradient(2px 2px at 8% 60%, rgba(255, 106, 0, 0.1), transparent 100%),
    radial-gradient(480px 320px at 88% 30%, rgba(255, 140, 50, 0.05), transparent 70%),
    linear-gradient(180deg, rgba(255, 240, 228, 0.55) 0%, rgba(255, 247, 241, 0.3) 45%, rgba(255, 255, 255, 0) 100%);
}
/* mascot watermark จางมากหลังโซน Login/News — แค่เติมมิติ ไม่แย่งสายตา */
.layout-full::after {
  content: '';
  position: absolute;
  top: 60px;
  right: -60px;
  width: 380px;
  height: 380px;
  z-index: -1;
  pointer-events: none;
  background: url('/img/mascot-slime.png') no-repeat center / contain;
  opacity: 0.04;
}
.content { min-width: 0; }

/* ============ Home Sections ============ */
.home-section { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.section-ico {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.section-ico img { width: 46px; height: 46px; object-fit: contain; }
.section-title h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.4px;
  line-height: 1.25;
}
.section-title p { font-size: 13.5px; color: var(--ink-3); }
.section-more { margin-left: auto; }

/* ============ Login + Banner ============ */
.main-grid {
  display: grid;
  /* Login ~35% / News ~65% */
  grid-template-columns: minmax(320px, 35fr) 65fr;
  gap: 24px;
  align-items: stretch;
  position: relative;
}
/* poring watermark จางมากฝั่งซ้ายหลัง Login Box — คู่กับ slime ฝั่งขวา */
.main-grid::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -90px;
  width: 300px;
  height: 300px;
  z-index: -1;
  pointer-events: none;
  background: url('/img/mascot-poring.png') no-repeat center / contain;
  opacity: 0.04;
}

.login-card {
  background: linear-gradient(180deg, #fff 0%, #fffaf6 60%, #fff4ec 100%);
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(255, 106, 0, 0.16), 0 3px 10px rgba(43, 27, 18, 0.05), 0 0 0 4px rgba(255, 122, 26, 0.04);
  padding: 22px;
  transition: box-shadow 0.25s ease;
}
.login-card:hover {
  box-shadow: 0 18px 44px rgba(255, 106, 0, 0.2), 0 4px 12px rgba(43, 27, 18, 0.06), 0 0 0 4px rgba(255, 122, 26, 0.06);
}
.login-card .form input {
  margin-bottom: 14px;
}
.login-card .btn-block { margin-top: 2px; }
.login-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 122, 26, 0.14);
}
.login-mascot {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(43, 27, 18, 0.22)) drop-shadow(0 0 8px rgba(255, 150, 60, 0.3));
}
.login-card-head h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.25;
  letter-spacing: 0.3px;
}
.login-card-head p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.login-forgot {
  display: block;
  text-align: center;
  font-size: 13.5px;
  margin: 12px 0;
  color: var(--orange);
}
.welcome { margin-bottom: 14px; color: var(--ink-2); }
.welcome b { color: var(--orange); }

/* Banner Slider */
.banner-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 26, 0.28);
  box-shadow: 0 14px 36px rgba(255, 106, 0, 0.16), 0 4px 12px rgba(43, 27, 18, 0.06), 0 0 0 4px rgba(255, 122, 26, 0.04);
  min-height: 300px;
  background: var(--bg-soft);
}
.banner-track { position: absolute; inset: 0; }
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.banner-slide.active { opacity: 1; }
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* คงใจความกลางภาพแบนเนอร์ไว้เสมอเมื่อถูก crop */
  object-position: center;
  display: block;
}
.banner-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  background: linear-gradient(135deg, var(--orange-2), var(--orange));
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(255, 106, 0, 0.35);
}
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--orange);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(43, 27, 18, 0.18), 0 2px 6px rgba(255, 106, 0, 0.12);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-arrow:hover {
  background: var(--bg-soft-2);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.25);
}
.banner-prev { left: 14px; }
.banner-next { right: 14px; }
.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.banner-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.15s, width 0.15s;
  padding: 0;
}
.banner-dots .dot.active { background: var(--orange); width: 22px; border-radius: 6px; }

/* ============ News ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.news-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(255, 106, 0, 0.15);
  border-color: #ffc59e;
}
.news-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-soft);
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--orange);
}
.badge-event { background: linear-gradient(135deg, #e64ca0, #c93384); }
.badge-guild { background: linear-gradient(135deg, #8a6cd9, #6c4cc9); }
.badge-boss { background: linear-gradient(135deg, #e25555, #c93333); }
.badge-newbie { background: linear-gradient(135deg, #38b8e0, #2196c9); }
.badge-update { background: linear-gradient(135deg, var(--orange-3), var(--orange)); }
.badge-news { background: linear-gradient(135deg, var(--orange-3), var(--orange)); }

.news-body {
  padding: 13px 13px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.3px;
  line-height: 1.35;
}
.news-body p {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 4px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-date {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.4px;
  margin: 8px 0 10px;
}

/* ============ Features ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  padding: 24px 14px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(255, 106, 0, 0.15);
  border-color: #ffc59e;
}
.feature-img {
  height: 84px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 12px rgba(43, 27, 18, 0.22)) drop-shadow(0 0 10px rgba(255, 150, 60, 0.25));
}
.feature-card h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.feature-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.feature-sub { min-height: 40px; }
.feature-divider {
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 14px 8px;
}
.feature-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}
.feature-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.45;
  white-space: nowrap;
}
.feature-check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feature-check svg { width: 9px; height: 9px; }

/* แถบสรุปท้าย Server Features */
.features-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  padding: 18px 28px;
  background: var(--bg-soft-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.features-banner-trophy {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(255, 106, 0, 0.25));
}
.features-banner-text { text-align: center; }
.fb-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.2px;
}
.fb-sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}
.features-banner-mascot {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(43, 27, 18, 0.2));
}

/* ============ Ranking Preview ============ */
.rank-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.rank-preview {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.rank-preview:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(255, 106, 0, 0.15);
  border-color: #ffc59e;
}
.rank-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--bg-soft-2);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.4px;
}

.mini-rank { width: 100%; border-collapse: collapse; }
.mini-rank tr { border-bottom: 1px solid #fff1e6; }
.mini-rank tr:last-child { border-bottom: none; }
.mini-rank td { padding: 11px 16px; font-size: 14px; color: var(--ink-2); }
.mini-rank .rank-no {
  width: 40px;
  font-weight: 800;
  color: var(--orange);
  text-align: center;
}
.mini-rank .rank-name { font-weight: 500; color: var(--ink); }
.mini-rank .rank-score,
.mini-rank .lv {
  text-align: right;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}
.mini-rank .top-1 .rank-no { color: #f5a300; font-size: 17px; }
.mini-rank .top-2 .rank-no { color: #9aa4af; font-size: 16px; }
.mini-rank .top-3 .rank-no { color: #c9762c; font-size: 15px; }
.mini-rank .top-1 { background: #fffaf2; }
.rank-empty { padding: 22px 16px; }

/* ============ WoE: กิลด์ที่ครองปราสาท ============ */
.castle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.castle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.castle-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(255, 122, 24, 0.14);
}
.castle-flag { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.castle-info { min-width: 0; }
.castle-line {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.castle-line strong { color: var(--ink); }
.castle-city { color: var(--ink-3); font-size: 12px; }
.ck-castle { color: #e05a3a; font-weight: 700; }
.ck-guild { color: #2f7fe0; font-weight: 700; }
.ck-master { color: var(--green); font-weight: 700; }
.castle-empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--ink-3);
  background: #fff;
  border: 1px dashed rgba(255, 107, 0, 0.35);
  border-radius: 12px;
}

/* ============ Footer ============ */
.footer {
  position: relative;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-soft-2));
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 16px 30px;
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 1fr 1fr;
  gap: 32px;
}
.footer-col { min-width: 0; }
.footer-logo { width: 170px; }
.footer-tagline { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.footer-head {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}
.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
}
.footer-links a {
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--orange); }

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 10px;
  transition: color 0.15s;
}
.footer-social:hover { color: var(--orange); }
.fs-ico {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
}
.fs-ico svg { width: 16px; height: 16px; }
.fs-facebook .fs-ico { background: #1877f2; }
.fs-discord .fs-ico { background: #5865f2; }
.fs-group .fs-ico { background: var(--orange); }

.footer-date { font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; }
.footer-clock {
  font-size: 34px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
  letter-spacing: 1px;
}
.footer-tz { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.footer-mascot {
  position: absolute;
  right: 4%;
  bottom: 52px;
  width: 92px;
  animation: float 3.5s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(43, 27, 18, 0.25)) drop-shadow(0 0 12px rgba(255, 150, 60, 0.3));
}
.footer-copy {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.4px;
}

/* ============ Forms (ใช้ร่วมทุกหน้า) ============ */
.form input[type="text"],
.form input[type="password"],
.form input[type="email"],
.form select {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.14), 0 0 14px rgba(255, 122, 26, 0.22);
}
.form input::placeholder { color: #c4b5aa; }
.form label { font-size: 13.5px; color: var(--ink-2); }

.radio-row { display: flex; gap: 18px; margin-bottom: 12px; }
.radio { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; }
.radio input { accent-color: var(--orange); }

/* ============ Panels / หน้าอื่น ๆ ============ */
.page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--orange);
}
.page-art { width: 64px; height: 64px; object-fit: contain; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 22px;
}
.panel.narrow { max-width: 460px; }
.panel h2, .panel h3 { color: var(--ink); margin-bottom: 12px; font-size: 17px; }
.panel-row { display: flex; gap: 22px; flex-wrap: wrap; }
.panel.half { flex: 1; min-width: 280px; }

.alert {
  padding: 12px 16px;
  border-radius: 9px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid;
}
.alert-error { background: #fdecec; border-color: #f5c2c2; color: #b03030; }
.alert-ok { background: #e9f9f0; border-color: #bce8cf; color: #1e7c4d; }
.alert-info { background: var(--bg-soft-2); border-color: var(--line-2); color: var(--ink-2); }

.muted { color: var(--ink-3); }
.muted.center { text-align: center; }
.gold { color: var(--orange); font-weight: 700; }
.st-up { color: var(--green); font-weight: 600; }
.st-down { color: var(--red); font-weight: 600; }

/* ============ Tabs ============ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
}
.tab:hover { border-color: var(--orange); color: var(--orange); }
.tab.active {
  background: linear-gradient(135deg, var(--orange-2), var(--orange));
  border-color: var(--orange);
  color: #fff;
  font-weight: 600;
}

/* ============ Tables ============ */
.rank-table, .info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rank-table th, .info-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-soft-2);
  color: var(--ink);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.rank-table td, .info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #fff1e6;
  color: var(--ink-2);
}
.rank-table .rank-no { font-weight: 800; color: var(--orange); text-align: center; width: 50px; }
.rank-table .top-1 { background: #fffaf2; }
.rank-table .top-1 .rank-no { color: #f5a300; }
.rank-table .top-2 .rank-no { color: #9aa4af; }
.rank-table .top-3 .rank-no { color: #c9762c; }

/* ============ Download / Vote ============ */
.download-grid, .vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.dl-card, .vote-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.dl-card:hover, .vote-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.dl-card h3, .vote-card h3 { color: var(--orange); margin-bottom: 8px; font-size: 16px; }
.dl-card p, .vote-card p { color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; }

.steps { padding-left: 22px; color: var(--ink-2); }
.steps li { margin-bottom: 8px; }

/* ============ Sidebar (หน้าอื่น) ============ */
.sidebar { min-width: 0; }
.box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}
.box-head {
  padding: 12px 16px;
  background: var(--bg-soft-2);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.box-body { padding: 16px; }

.status-list { list-style: none; }
.status-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #fff1e6;
  font-size: 13.5px;
  color: var(--ink-2);
}
.status-list li:last-child { border-bottom: none; }
.status-list .num { color: var(--orange); font-weight: 700; }

.art-404 { width: 200px; display: block; margin: 0 auto 16px; }

/* ============ Events Page ============ */
/* การ์ดมี display: flex ซึ่งทับ attribute hidden ของ browser เลยต้องบังคับซ่อนเอง */
.news-card[hidden],
.panel[hidden] { display: none !important; }
.events-grid { grid-template-columns: repeat(3, 1fr); }
.events-grid .news-body p {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* แถบเครื่องมือ: แท็บกรองหมวด + ช่องค้นหา */
.events-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-tab {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-tab:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.filter-tab.active {
  background: linear-gradient(135deg, var(--orange-3), var(--orange));
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.3);
}
.event-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 320px;
}
.event-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  pointer-events: none;
}
.event-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}
.event-search input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.14);
}
.event-search input::placeholder { color: #c4b5aa; }

/* ไม่พบผลการค้นหา */
.events-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-2);
}
.events-empty-img {
  width: 90px;
  display: block;
  margin: 0 auto 12px;
}

/* ============ News Detail ============ */
/* การ์ดข่าว: รูปกับหัวข้อเป็นลิงก์ไปหน้ารายละเอียด */
a.news-thumb { display: block; }
.news-title-link {
  color: inherit;
  text-decoration: none;
}
.news-title-link:hover { text-decoration: underline; }

.news-detail { padding: 0; overflow: hidden; }
.news-detail-thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.news-detail-thumb img {
  width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.news-detail-body { padding: 26px 32px 30px; }
.news-detail-body h2 { font-size: 22px; color: var(--orange); margin-bottom: 4px; }
.news-detail-body .news-date { margin: 0 0 14px; }
.news-detail-body p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: 10px;
}
.news-detail-back { display: inline-block; margin: 4px 0 18px; }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav a { padding: 26px 7px; font-size: 13.5px; }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 22px; }
  .main-nav a:hover { transform: none; }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { justify-content: space-between; }

  .layout { grid-template-columns: 1fr; }

  .hero-inner { min-height: 430px; }
  .hero-content { padding: 40px 0 95px; }
  .hero-float-2 { display: none; }
  .status-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .main-grid { grid-template-columns: 1fr; }
  .banner-slider { min-height: 0; aspect-ratio: 8 / 3; }

  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .rank-preview-grid { grid-template-columns: 1fr; }
  .castle-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-mascot { display: none; }
}

@media (max-width: 560px) {
  .header-actions { display: none; }
  .hero-logo { width: min(320px, 88vw); margin-top: 0; --logo-shift: 0px; transform: translateX(var(--logo-shift)); }
  .hero-sparks { transform: translateX(-50%); height: 190px; }
  .hero-title { font-size: 23px; }
  .hero-cta { flex-wrap: wrap; }
  .hero-cta .btn { flex: 1; }
  .hero-float-1 { display: none; }

  .status-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .status-value { font-size: 20px; }

  .news-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-sub { min-height: 0; }
  .features-banner { flex-direction: column; gap: 10px; border-radius: var(--radius-lg); padding: 18px 16px; }
  .banner-slider { aspect-ratio: 3 / 2; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============ Accessibility ============ */
/* ผู้ใช้ที่ตั้งค่า reduce motion ไว้ จะเห็นหน้าเว็บนิ่งทั้งหมด (โลโก้ยังคง glow แบบคงที่จาก filter พื้นฐาน) */
@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-float,
  .footer-mascot {
    animation: none !important;
    will-change: auto;
  }
  /* ประกายไฟไม่มีสถานะนิ่งที่สวย — ซ่อนไปเลย */
  .hero-sparks { display: none; }
}
