:root {
  --liquid-bg: #f3f5fa;
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-highlight: #ffffff;
  --gold-primary: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.25);
}

html.dark {
  --liquid-bg: #070a14;
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-highlight: rgba(255, 255, 255, 0.32);
  --gold-glow: rgba(212, 175, 55, 0.35);
}

body {
  font-family: 'Sukhumvit Set', 'SukhumvitSet', 'Anuphan', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--liquid-bg);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ================= LIQUID AMBIENT BACKGROUND ================= */
.ambient-canvas {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  mix-blend-mode: normal;
  will-change: transform;
  transition: opacity 0.5s ease;
}

/* Dark Mode Orbs */
html.dark .ambient-orb {
  opacity: 0.45;
  mix-blend-mode: screen;
}
html.dark .orb-gold {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.35) 0%, rgba(217, 119, 6, 0.15) 50%, transparent 70%);
  top: -120px;
  left: 15%;
  animation: float-slow 18s ease-in-out infinite alternate;
}
html.dark .orb-cyan {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, rgba(59, 130, 246, 0.12) 50%, transparent 70%);
  top: 25%;
  right: -100px;
  animation: float-reverse 22s ease-in-out infinite alternate;
}
html.dark .orb-rose {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.28) 0%, rgba(168, 85, 247, 0.12) 50%, transparent 70%);
  bottom: 10%;
  left: -120px;
  animation: float-slow 20s ease-in-out infinite alternate;
}
html.dark .orb-violet {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  bottom: -80px;
  right: 20%;
  animation: float-reverse 19s ease-in-out infinite alternate;
}

/* Light Mode Orbs */
html:not(.dark) .ambient-orb {
  opacity: 0.32;
}
html:not(.dark) .orb-gold {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(251, 191, 36, 0.1) 50%, transparent 70%);
  top: -100px;
  left: 12%;
  animation: float-slow 18s ease-in-out infinite alternate;
}
html:not(.dark) .orb-cyan {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.26) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 70%);
  top: 25%;
  right: -80px;
  animation: float-reverse 22s ease-in-out infinite alternate;
}
html:not(.dark) .orb-rose {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.22) 0%, rgba(251, 113, 133, 0.08) 50%, transparent 70%);
  bottom: 10%;
  left: -100px;
  animation: float-slow 20s ease-in-out infinite alternate;
}
html:not(.dark) .orb-violet {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
  bottom: -80px;
  right: 18%;
  animation: float-reverse 19s ease-in-out infinite alternate;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, 45px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.95); }
}

@keyframes float-reverse {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-45px, -35px) scale(1.1); }
  100% { transform: translate(25px, -15px) scale(0.92); }
}

/* Subtle Liquid Mesh Overlay */
html.dark .liquid-mesh {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
html:not(.dark) .liquid-mesh {
  background-image: radial-gradient(rgba(100, 116, 139, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ================= LIQUID GLASS CORE SPECIFICATIONS ================= */
.liquid-glass-nav {
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
html.dark .liquid-glass-nav {
  background: rgba(13, 19, 34, 0.68);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-highlight);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -1px 1px rgba(0, 0, 0, 0.35),
    0 16px 36px -10px rgba(0, 0, 0, 0.65),
    0 0 25px rgba(212, 175, 55, 0.08);
}
html:not(.dark) .liquid-glass-nav {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-top: 1px solid #ffffff;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    0 14px 34px -8px rgba(100, 116, 139, 0.18),
    0 0 20px rgba(245, 158, 11, 0.1);
}

.liquid-glass-card {
  position: relative;
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
html.dark .liquid-glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(14, 20, 36, 0.62);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-highlight);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -1px 1px rgba(0, 0, 0, 0.25),
    0 20px 45px -15px rgba(0, 0, 0, 0.65);
}
html:not(.dark) .liquid-glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid #ffffff;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    0 18px 40px -12px rgba(100, 116, 139, 0.18);
}

/* Refractive Specular Reflection Lip */
.liquid-glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 35%;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  pointer-events: none;
}
html.dark .liquid-glass-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
}
html:not(.dark) .liquid-glass-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Liquid Glass Buttons & Pills */
.liquid-btn {
  position: relative;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
html.dark .liquid-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%), rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 8px 20px -6px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}
html.dark .liquid-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  border-top-color: rgba(255, 255, 255, 0.6);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    0 12px 28px -6px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(234, 179, 8, 0.2);
}
html:not(.dark) .liquid-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-top: 1px solid #ffffff;
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.95),
    0 8px 18px -4px rgba(100, 116, 139, 0.15);
  color: #1e293b;
}
html:not(.dark) .liquid-btn:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 
    inset 0 1px 1.5px #ffffff,
    0 12px 24px -4px rgba(100, 116, 139, 0.22),
    0 0 20px rgba(245, 158, 11, 0.18);
}

/* Liquid Glass Dock for Filter Navigation */
.liquid-dock {
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  transition: background 0.3s ease, border-color 0.3s ease;
}
html.dark .liquid-dock {
  background: rgba(10, 15, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    0 14px 30px -10px rgba(0, 0, 0, 0.6);
}
html:not(.dark) .liquid-dock {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid #ffffff;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    0 12px 28px -8px rgba(100, 116, 139, 0.16);
}

/* Logo Emblem Shield */
.liquid-emblem {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 244, 235, 0.92) 100%);
  border: 2px solid rgba(245, 158, 11, 0.45);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 35px rgba(234, 179, 8, 0.28),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    0 18px 36px -10px rgba(0, 0, 0, 0.4);
}

/* Role Rims with Neon Liquid Glass Reflections */
.ring-leader {
  box-shadow: 
    0 0 0 3px #f43f5e, 
    0 0 20px rgba(244, 63, 94, 0.6),
    inset 0 0 8px rgba(244, 63, 94, 0.3);
}
.ring-vice {
  box-shadow: 
    0 0 0 3px #0ea5e9, 
    0 0 20px rgba(14, 165, 233, 0.55),
    inset 0 0 8px rgba(14, 165, 233, 0.3);
}
.ring-elder {
  box-shadow: 
    0 0 0 2.5px #10b981, 
    0 0 16px rgba(16, 185, 129, 0.45),
    inset 0 0 6px rgba(16, 185, 129, 0.25);
}
html.dark .ring-member {
  box-shadow: 
    0 0 0 2px rgba(255, 255, 255, 0.25),
    0 0 12px rgba(148, 163, 184, 0.2);
}
html:not(.dark) .ring-member {
  box-shadow: 
    0 0 0 2px rgba(148, 163, 184, 0.45),
    0 0 10px rgba(148, 163, 184, 0.15);
}

/* Scrollbar Hidden for Mobile Tabs */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Shimmer light pass */
@keyframes sheen {
  0% { transform: translateX(-150%) skewX(-20deg); }
  100% { transform: translateX(250%) skewX(-20deg); }
}
.hover-sheen {
  position: relative;
  overflow: hidden;
}
.hover-sheen::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  transform: translateX(-150%) skewX(-20deg);
  pointer-events: none;
  transition: none;
}
.hover-sheen:hover::after {
  animation: sheen 1.2s ease-in-out;
}

/* Mobile Glass Menu Dropdown */
.mobile-menu-drawer {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.97);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.25s ease, 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-drawer.open {
  max-height: 520px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Nav Link Pill Styling */
.nav-link-pill {
  position: relative;
  transition: all 0.2s ease;
}
.nav-link-pill:hover {
  transform: translateY(-1px);
}
