/* ==========================================================================
   YULGANG EASY — Mystic Cosmic Violet & Crystal Amethyst Theme
   ==========================================================================
   Theme: Electric Purple, Cosmic Amethyst, Diamond Starlight & Crystal Glass
   Matched to: yulgang_easy_logo.png
   ========================================================================== */

/* --- 1. CSS VARIABLES / COSMIC CRYSTAL DESIGN TOKENS --- */
:root {
  /* Electric Purple, Violet & Neon Amethyst */
  --cyan-primary: #c084fc;
  --cyan-bright: #e879f9;
  --cyan-light: #f5d0fe;
  --cyan-glow: rgba(168, 85, 247, 0.5);
  --cyan-glow-intense: rgba(217, 70, 239, 0.8);

  /* Deep Cosmic Violet & Void Space */
  --blue-azure: #9333ea;
  --blue-vibrant: #7e22ce;
  --blue-deep: #581c87;
  --blue-darkest: #090314;
  --blue-navy: #130626;

  /* Golden Sand & Starlight Gold */
  --gold-sand: #ffd166;
  --gold-sand-light: #ffe494;
  --gold-amber: #f59e0b;
  --gold-glow: rgba(255, 209, 102, 0.45);

  /* Neon Pink & Crystal Magenta */
  --coral-pink: #f472b6;
  --coral-red: #e11d48;

  /* Frosted Cosmic Glass Backgrounds */
  --glass-bg-panel: rgba(19, 7, 38, 0.86);
  --glass-bg-card: rgba(15, 5, 30, 0.9);
  --glass-bg-inner: rgba(11, 3, 22, 0.82);
  --glass-bg-hover: rgba(36, 13, 68, 0.92);
  --glass-blur: blur(14px) saturate(180%);

  /* Borders & Accents */
  --border-cyan-glow: 1px solid rgba(192, 132, 252, 0.55);
  --border-cyan-bright: 1.5px solid rgba(232, 121, 249, 0.85);
  --border-sand-glow: 1px solid rgba(255, 209, 102, 0.6);

  /* Typography */
  --font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-main: #ffffff;
  --text-sub: #e9d5ff;
  --text-muted: #a89cb8;
  --text-sand: #ffd166;
  --text-cyan: #d8b4fe;

  /* Layout Dimensions */
  --container-max-width: 1040px;
  --sidebar-width: 310px;
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --transition-speed: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 2. RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--blue-darkest);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.28) 0%, transparent 60%),
    radial-gradient(circle at 15% 30%, rgba(126, 34, 206, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(217, 70, 239, 0.18) 0%, transparent 50%),
    url('images/bg.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: scroll;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #080210;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c084fc 0%, #7e22ce 100%);
  border-radius: 4px;
  border: 1px solid rgba(232, 121, 249, 0.5);
}
::-webkit-scrollbar-thumb:hover {
  background: #e879f9;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-speed);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* Cosmic Violet Sparkle Ambient Effect */
.bg-atmosphere {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 8%, rgba(232, 121, 249, 0.16) 0%, rgba(168, 85, 247, 0.12) 40%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Page Wrapper */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 12px 10px;
}

/* --- 3. HERO / HEADER LOGO BANNER --- */
.hero-header {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: visible;
}

.hero-header__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 540px;
  padding: 40px 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-header__logo {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 0 45px rgba(168, 85, 247, 0.95)) drop-shadow(0 15px 30px rgba(0, 0, 0, 0.95));
  animation: logoFloat 4s ease-in-out infinite alternate;
}

/* --- 4. TOP NAVIGATION BAR (TROPICAL SEA-GLASS MENU) --- */
.nav-container {
  position: relative;
  width: 100%;
  margin: -12px auto 18px;
  z-index: 10;
}

.nav-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(46, 16, 88, 0.94) 0%, rgba(20, 7, 44, 0.98) 100%);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.6);
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 28px rgba(168, 85, 247, 0.4);
  position: relative;
  overflow: hidden;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px 10px;
  text-align: center;
  position: relative;
  transition: all var(--transition-speed);
  border-right: 1px solid rgba(192, 132, 252, 0.25);
  border-left: 1px solid rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #c084fc, #e879f9, #ffd166, transparent);
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.nav-item:first-child {
  border-left: none;
}

.nav-item:last-child {
  border-right: none;
}

.nav-item__en {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 12px rgba(192, 132, 252, 0.7);
  line-height: 1.2;
  transition: all var(--transition-speed);
}

.nav-item__th {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-sub);
  margin-top: 2px;
  line-height: 1.2;
  transition: all var(--transition-speed);
}

/* Nav Item Hover & Active States */
.nav-item:hover, .nav-item--active {
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.55) 0%, rgba(88, 28, 135, 0.8) 100%);
}

.nav-item:hover::before, .nav-item--active::before {
  opacity: 1;
}

.nav-item:hover .nav-item__en, .nav-item--active .nav-item__en {
  color: #ffffff;
  text-shadow: 0 0 14px #e879f9, 0 0 24px rgba(217, 70, 239, 0.95);
  transform: translateY(-1px);
}

.nav-item:hover .nav-item__th, .nav-item--active .nav-item__th {
  color: var(--gold-sand-light);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--glass-bg-panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-cyan-glow);
  color: var(--cyan-light);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: var(--border-radius-sm);
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.mobile-nav-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: var(--cyan-bright);
}

/* --- 5. MAIN CONTENT 2-COLUMN GRID --- */
.main-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 18px;
  align-items: start;
  position: relative;
}

/* --- 6. SIDEBAR STYLES --- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Sea Glassmorphism Panel */
.metal-panel {
  background: var(--glass-bg-panel);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.45);
  border-top: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(147, 51, 234, 0.25);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.metal-panel:hover {
  border-color: rgba(232, 121, 249, 0.75);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 25px rgba(168, 85, 247, 0.4);
}

/* Cosmic Metallic Header Banner */
.metal-panel__header {
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.92) 0%, rgba(88, 28, 135, 0.96) 100%);
  border-bottom: 1px solid rgba(232, 121, 249, 0.4);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.metal-panel__title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(232, 121, 249, 0.6);
}

.metal-panel__body {
  padding: 10px;
  background: var(--glass-bg-inner);
}

/* Pulsing Indicator */
.status-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #e879f9;
  box-shadow: 0 0 8px #e879f9, 0 0 14px rgba(232, 121, 249, 0.9);
  animation: pulse-violet 2s infinite ease-in-out;
}

@keyframes pulse-violet {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px #e879f9, 0 0 14px rgba(232, 121, 249, 0.9); }
  50% { opacity: 0.5; transform: scale(0.85); box-shadow: 0 0 4px #e879f9; }
}

.server-status-frame {
  width: 100%;
  min-height: 140px;
  border: none;
  border-radius: var(--border-radius-sm);
  background: #080210;
  display: block;
}

/* Action Buttons */
.metal-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(38, 14, 76, 0.88) 0%, rgba(18, 6, 38, 0.94) 100%);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.45);
  border-top: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-align: left;
  position: relative;
  transition: all var(--transition-speed);
  overflow: hidden;
}

.metal-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(30deg);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.metal-btn:hover::after {
  transform: rotate(30deg) translate(300%, 0);
}

.metal-btn:hover {
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.55) 0%, rgba(88, 28, 135, 0.8) 100%);
  border-color: #e879f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 18px rgba(168, 85, 247, 0.5), inset 0 0 12px rgba(217, 70, 239, 0.3);
  transform: translateY(-2px);
}

.metal-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.metal-btn__icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(192, 132, 252, 0.25);
  box-shadow: inset 0 0 8px rgba(168, 85, 247, 0.15);
  transition: all var(--transition-speed);
}

.metal-btn:hover .metal-btn__icon {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(232, 121, 249, 0.65);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.4);
  transform: scale(1.06);
}

.metal-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.metal-btn__en {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 2px #000, 0 0 8px rgba(192, 132, 252, 0.6);
  line-height: 1.2;
  white-space: nowrap;
}

.metal-btn__th {
  font-size: 0.74rem;
  color: var(--text-sub);
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
}

.metal-btn:hover .metal-btn__en {
  color: #ffffff;
  text-shadow: 0 0 12px var(--cyan-bright);
}

/* SPECIAL YULGANG EASY DOWNLOAD BUTTON (CRYSTAL MAGENTA & AMETHYST) */
.metal-btn--download {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 50%, #581c87 100%);
  border: 2px solid #ffd166;
  border-top: 2px solid #ffffff;
  padding: 12px 18px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85), 0 0 24px rgba(168, 85, 247, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
}

.metal-btn--download:hover {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7e22ce 100%);
  border-color: #ffe494;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.95), 0 0 32px rgba(217, 70, 239, 0.9), inset 0 0 16px rgba(255, 255, 255, 0.4);
  transform: translateY(-3px) scale(1.01);
}

.metal-btn--download .metal-btn__icon {
  width: 42px;
  height: 42px;
  font-size: 1.7rem;
  color: var(--gold-sand);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 209, 102, 0.45);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.3);
  animation: bounce-icon 2s infinite ease-in-out;
}

@keyframes bounce-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.metal-btn--download .metal-btn__en {
  font-size: 1.1rem;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(232, 121, 249, 0.9), 0 2px 4px #000;
}

.metal-btn--download .metal-btn__th {
  color: var(--gold-sand-light);
  font-size: 0.8rem;
}

/* Top Ranking & Facebook Panels */
.ranking-frame {
  width: 100%;
  min-height: 380px;
  border: none;
  background: transparent;
  display: block;
}

.facebook-frame-wrap {
  background: #fff;
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* --- 7. MAIN AREA (RIGHT COLUMN) --- */
.main-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* SLIDESHOW (COSMIC AMETHYST GLASS FRAME) */
.scroll-slideshow-container {
  position: relative;
  background: var(--glass-bg-panel);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.55);
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9), 0 0 24px rgba(147, 51, 234, 0.35);
  overflow: hidden;
  padding: 8px;
}

.scroll-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 577 / 317;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  background: #090214;
}

.scroll-slideshow__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-slideshow__slide {
  min-width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Modern Pill Dots */
.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
}

.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(192, 132, 252, 0.35);
  border: 1px solid rgba(192, 132, 252, 0.6);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.slideshow-dot--active, .slideshow-dot:hover {
  width: 22px;
  background: linear-gradient(90deg, #c084fc 0%, #e879f9 100%);
  box-shadow: 0 0 12px #e879f9;
  border-color: #ffd166;
}

/* NEWS & ANNOUNCEMENT BOARD (ELECTRIC PURPLE GRADIENT) */
.news-board {
  position: relative;
  background: var(--glass-bg-panel);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.55);
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9), 0 0 24px rgba(147, 51, 234, 0.3);
  overflow: hidden;
}

.news-board__header {
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 50%, #581c87 100%);
  border-bottom: 1px solid rgba(232, 121, 249, 0.5);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.news-board__title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px #000, 0 0 14px rgba(232, 121, 249, 0.9);
}

.news-board__content-wrap {
  display: flex;
  align-items: stretch;
  position: relative;
  min-height: 240px;
  background: var(--glass-bg-inner);
}

.news-list {
  flex: 1;
  list-style: none;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 320px;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px dashed rgba(192, 132, 252, 0.22);
  font-size: 0.88rem;
  color: var(--text-main);
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.news-item:hover {
  color: #ffffff;
  background: rgba(147, 51, 234, 0.16);
  padding-left: 10px;
}

.news-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-badge--red {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  border: 1px solid #fb7185;
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

.news-badge--cyan,
.news-badge--purple {
  background: linear-gradient(135deg, #c084fc 0%, #9333ea 50%, #6b21a8 100%);
  border: 1px solid #e879f9;
  color: #fff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.news-badge--gold {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: 1px solid #fde68a;
  color: #000;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.news-item__text {
  flex: 1;
  line-height: 1.45;
}

/* Ribbons / Section Banners (PURPLE CRYSTAL GRADIENT) */
.section-ribbon {
  background: linear-gradient(135deg, #6b21a8 0%, #9333ea 50%, #4c1d95 100%);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.6);
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius-sm);
  padding: 10px 16px;
  text-align: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85), 0 0 24px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  margin-bottom: 2px;
}

.section-ribbon__en {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 4px #000, 0 0 14px rgba(232, 121, 249, 0.95), 0 0 25px rgba(168, 85, 247, 0.6);
}

.section-ribbon__th {
  font-size: 0.82rem;
  color: #e9d5ff;
  margin-top: 1px;
}

/* DISCORD SECTION */
.discord-widget-wrap {
  background: #090214;
  border: 1.5px solid rgba(192, 132, 252, 0.5);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(147, 51, 234, 0.25);
}

.discord-frame {
  width: 100%;
  min-height: 330px;
  border: none;
  display: block;
}

/* FEATURES 2X2 GRID CARDS (VIOLET CRYSTAL GLASS) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--glass-bg-panel);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.45);
  border-top: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85), 0 0 16px rgba(147, 51, 234, 0.25);
  overflow: hidden;
  position: relative;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  border-color: #e879f9;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.95), 0 0 28px rgba(192, 132, 252, 0.65);
  transform: translateY(-4px);
}

.feature-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 308 / 169;
  background: #090214;
  overflow: hidden;
}

.feature-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feature-card__img {
  transform: scale(1.06);
}

.feature-card__caption {
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(28, 10, 56, 0.92) 0%, rgba(16, 5, 34, 0.98) 100%);
  border-top: 1px solid rgba(192, 132, 252, 0.35);
  font-size: 0.88rem;
  color: #f5d0fe;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

/* --- 8. FOOTER (COSMIC CRYSTAL FULL-WIDTH SLIM) --- */
.footer {
  width: 100%;
  margin-top: 28px;
  position: relative;
  z-index: 5;
  padding: 18px 16px 20px;
  background: linear-gradient(180deg, rgba(20, 6, 42, 0.98) 0%, rgba(8, 2, 18, 1) 100%);
  backdrop-filter: var(--glass-blur);
  border: none;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.9), 0 0 25px rgba(168, 85, 247, 0.35);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7e22ce, #c084fc, #e879f9, #ffd166, #e879f9, #c084fc, #7e22ce, transparent);
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.85);
}

.footer__container {
  max-width: var(--container-max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.footer__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px #000, 0 0 12px rgba(192, 132, 252, 0.85);
  line-height: 1.2;
}

.footer__subtitle {
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.2;
}

.footer__copyright {
  font-size: 0.74rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(192, 132, 252, 0.25);
  padding-top: 5px;
  margin-top: 3px;
  width: 100%;
  max-width: 420px;
  line-height: 1.2;
}

.footer__copyright a {
  color: var(--cyan-light);
}

.footer__copyright a:hover {
  color: var(--cyan-bright);
}

/* --- 9. RESPONSIVE MEDIA QUERIES --- */

/* Tablet (Screens <= 1024px) */
@media (max-width: 1024px) {
  :root {
    --container-max-width: 100%;
    --sidebar-width: 280px;
  }
}

/* Tablet Portrait & Small Tablet (Screens <= 820px) */
@media (max-width: 820px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .main-area {
    order: 1;
  }

  .nav-item__en {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  .nav-item__th {
    font-size: 0.7rem;
  }
}

/* Mobile Devices (Screens <= 640px) */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 0 8px 20px;
  }

  .mobile-nav-toggle {
    display: flex;
    cursor: pointer;
    margin-bottom: 8px;
  }

  .nav-bar {
    display: none;
    flex-direction: column;
    margin-top: 4px;
  }

  .nav-bar--open {
    display: flex;
  }

  .nav-item {
    border-right: none;
    border-left: none;
    border-bottom: 1px solid rgba(192, 132, 252, 0.25);
    padding: 10px 16px;
    flex-direction: row;
    justify-content: space-between;
  }

  .nav-item__en {
    font-size: 1rem;
  }

  .nav-item__th {
    font-size: 0.85rem;
    margin-top: 0;
  }

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

/* ==========================================================================
   PHP 8.2 & MSSQL 2012 EXTENSIONS & DYNAMIC COMPONENTS
   ========================================================================== */

/* 1. Database Offline / Notice Banner */
.db-status-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid rgba(251, 191, 36, 0.6);
  border-radius: var(--border-radius-md);
  padding: 10px 16px;
  margin: 10px 0 16px;
  color: #fef3c7;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  animation: bannerPulse 3s infinite alternate;
}

@keyframes bannerPulse {
  0% { border-color: rgba(251, 191, 36, 0.4); }
  100% { border-color: rgba(251, 191, 36, 0.9); }
}

.db-status-banner code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold-sand);
  font-family: monospace;
}

/* 2. Server Status Box (Sidebar) */
.server-status-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.status-online-count {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.28) 0%, rgba(88, 28, 135, 0.45) 100%);
  border: 1px solid rgba(192, 132, 252, 0.55);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  text-align: center;
  box-shadow: inset 0 0 16px rgba(168, 85, 247, 0.25);
}

.online-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 14px #e879f9, 0 0 28px rgba(192, 132, 252, 0.8);
  line-height: 1.1;
}

.online-label {
  font-size: 0.78rem;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(14, 4, 30, 0.7);
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.status-label {
  font-size: 0.85rem;
  color: #e9d5ff;
  font-weight: 500;
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.status-badge--online {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid #c084fc;
  color: #f5d0fe;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.status-badge--offline {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}

.status-rates {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-top: 4px;
}

.rate-chip {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-sand);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.18) 0%, rgba(126, 34, 206, 0.22) 100%);
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 4px;
  padding: 4px 2px;
}

.panel-header-link {
  font-size: 0.75rem;
  color: #f5d0fe;
  margin-left: auto;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-speed);
}
.panel-header-link:hover {
  text-decoration: underline;
  color: #ffffff;
  text-shadow: 0 0 8px #e879f9;
}

/* 3. Mini Ranking List (Sidebar) */
.mini-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(14, 4, 30, 0.75);
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-speed);
}

.mini-ranking-item:hover {
  background: linear-gradient(90deg, rgba(126, 34, 206, 0.5) 0%, rgba(58, 18, 108, 0.6) 100%);
  border-color: rgba(232, 121, 249, 0.7);
  transform: translateX(4px);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.mini-ranking-item--1 {
  border-color: rgba(255, 209, 102, 0.65);
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.18) 0%, rgba(88, 28, 135, 0.5) 100%);
}

.mini-rank-num {
  font-size: 0.85rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #d8b4fe;
}

.mini-rank-num--1 {
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  color: #000;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}
.mini-rank-num--2 {
  background: linear-gradient(135deg, #f5d0fe, #c084fc);
  color: #000;
}
.mini-rank-num--3 {
  background: linear-gradient(135deg, #f97316, #b45309);
  color: #fff;
}

.mini-rank-info {
  flex: 1;
  min-width: 0;
}

.mini-rank-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-rank-meta {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
  align-items: center;
}

.mini-faction-tag {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

.faction--order {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.5);
}

.faction--chaos {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.faction--neutral {
  background: rgba(255, 209, 102, 0.2);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.4);
}

.mini-rank-level {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-sand);
  background: rgba(255, 209, 102, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.mini-ranking-footer {
  margin-top: 10px;
  text-align: center;
}

.view-full-ranking-btn {
  display: block;
  font-size: 0.78rem;
  color: #f5d0fe;
  padding: 7px;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(90deg, rgba(126, 34, 206, 0.25) 0%, rgba(147, 51, 234, 0.35) 100%);
  border: 1px solid rgba(192, 132, 252, 0.45);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
}
.view-full-ranking-btn:hover {
  background: linear-gradient(90deg, #7e22ce 0%, #9333ea 100%);
  border-color: #e879f9;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.6);
}

/* 4. Form Cards & Inputs (Register & ID Manager) */
.form-card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--border-cyan-glow);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

.form-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
}

.form-card__icon {
  font-size: 2rem;
  line-height: 1;
}

.form-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.form-card__subtitle {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.label-text {
  font-weight: 600;
  color: #e2e8f0;
}

.label-req {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.8;
}

.form-input {
  width: 100%;
  padding: 12px 14px 12px 46px;
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(2, 12, 26, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--border-radius-sm);
  color: #ffffff;
  outline: none;
  transition: all var(--transition-speed);
}

.form-input:focus {
  border-color: var(--cyan-primary);
  background: rgba(4, 20, 44, 0.95);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.form-input::placeholder {
  color: #64748b;
  font-size: 0.88rem;
}

.form-rules {
  background: rgba(2, 12, 26, 0.6);
  border-left: 3px solid var(--gold-amber);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.form-rules__title {
  color: var(--gold-sand);
  font-weight: 700;
  margin-bottom: 6px;
}

.form-rules__list {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.submit-btn {
  padding: 14px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, #7e22ce 0%, #9333ea 50%, #c084fc 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 18px rgba(147, 51, 234, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.submit-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 50%, #e879f9 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(217, 70, 239, 0.6);
  border-color: #ffd166;
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.alert--success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #a7f3d0;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.alert--error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fecaca;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

/* 5. Full Ranking Component (ranking.php) */
.ranking-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-filter-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.job-filter-bar {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.job-pill {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(26, 9, 52, 0.85);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 20px;
  color: #e9d5ff;
  text-decoration: none;
  transition: all var(--transition-speed);
}

.job-pill:hover {
  border-color: #e879f9;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.6) 0%, rgba(88, 28, 135, 0.8) 100%);
}

.job-pill--active {
  background: linear-gradient(90deg, #7e22ce 0%, #a855f7 50%, #c084fc 100%);
  color: #ffffff;
  border-color: #ffd166;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.8);
  text-shadow: 0 1px 2px #000;
}

.table-card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid rgba(192, 132, 252, 0.5);
  border-top: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.9), 0 0 24px rgba(147, 51, 234, 0.3);
  overflow: hidden;
}

.table-card__header {
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(46, 16, 88, 0.95) 0%, rgba(24, 8, 48, 0.98) 100%);
  border-bottom: 1px solid rgba(192, 132, 252, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.table-card__title {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.98rem;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
}

.table-card__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.ranking-table th {
  background: linear-gradient(180deg, rgba(62, 20, 118, 0.95) 0%, rgba(36, 12, 72, 0.98) 100%);
  color: #f5d0fe;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1.5px solid rgba(192, 132, 252, 0.5);
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);
}

.ranking-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(192, 132, 252, 0.14);
  vertical-align: middle;
}

.ranking-table tbody tr:hover {
  background: rgba(147, 51, 234, 0.18);
}

.tr-top--1 { background: linear-gradient(90deg, rgba(255, 209, 102, 0.14) 0%, rgba(126, 34, 206, 0.14) 100%); }
.tr-top--2 { background: linear-gradient(90deg, rgba(232, 121, 249, 0.1) 0%, rgba(88, 28, 135, 0.1) 100%); }
.tr-top--3 { background: linear-gradient(90deg, rgba(192, 132, 252, 0.08) 0%, rgba(46, 16, 88, 0.08) 100%); }

.rank-badge {
  font-weight: 800;
  font-size: 0.85rem;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.rank-badge--1 { background: linear-gradient(135deg, #ffd700, #f59e0b); color: #000; font-weight: 900; }
.rank-badge--2 { background: linear-gradient(135deg, #f5d0fe, #c084fc); color: #000; }
.rank-badge--3 { background: linear-gradient(135deg, #f97316, #b45309); color: #fff; }
.rank-badge--other { color: #d8b4fe; }

.char-name {
  font-weight: 600;
  color: #ffffff;
}

.job-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.level-badge {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
  border: 1px solid rgba(255, 209, 102, 0.5);
  color: var(--gold-sand);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.faction-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.table-empty {
  text-align: center;
  padding: 30px !important;
  color: #b8a5d1;
}

/* 6. Download Cards Component (download.php) */
.downloads-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dl-card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--border-cyan-glow);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: all var(--transition-speed);
}

.dl-card--featured {
  border-color: rgba(232, 121, 249, 0.75);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(38, 14, 76, 0.92) 0%, rgba(18, 6, 38, 0.96) 100%);
}

.dl-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.dl-card__icon {
  font-size: 2.2rem;
  line-height: 1;
}

.dl-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.dl-card__sub {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.dl-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-speed);
}

.dl-btn--primary {
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.45);
}
.dl-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.65);
  color: #ffffff;
}

.dl-btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.dl-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  transform: translateY(-2px);
}

.dl-btn--outline {
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.5);
  color: #f5d0fe;
}
.dl-btn--outline:hover {
  background: rgba(147, 51, 234, 0.3);
  border-color: #e879f9;
  transform: translateY(-2px);
}

.dl-btn--driver {
  background: rgba(20, 7, 42, 0.85);
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: #e9d5ff;
}
.dl-btn--driver:hover {
  background: rgba(38, 14, 76, 0.95);
  border-color: #c084fc;
  transform: translateY(-2px);
}

/* 7. Profile Card (ID Manager) */
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-header {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--border-cyan-glow);
  border-radius: var(--border-radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  background: rgba(147, 51, 234, 0.25);
  border: 1px solid rgba(192, 132, 252, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-meta {
  flex: 1;
}

.profile-username {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.profile-status {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.logout-btn {
  padding: 6px 14px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: var(--border-radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.logout-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-box {
  background: var(--glass-bg-card);
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-box__icon {
  font-size: 1.8rem;
}

.stat-box__value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-sand);
}

.stat-box__title {
  font-size: 0.75rem;
  color: var(--text-sub);
}

/* ==========================================================================
   YULGANG EASY - SITE PRELOADER / LOADING SCREEN
   ========================================================================== */
.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  background-color: #06020c;
  background-image: 
    radial-gradient(circle at 50% 45%, rgba(168, 85, 247, 0.22) 0%, rgba(10, 3, 20, 0.9) 55%, #05010a 100%),
    linear-gradient(rgba(192, 132, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 46px 46px, 46px 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
  pointer-events: auto;
  user-select: none;
}

.site-preloader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Preloader Circular Badge */
.preloader-badge-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.5) 0%, rgba(217, 70, 239, 0.2) 60%, transparent 80%);
  filter: blur(18px);
  animation: preloaderGlowPulse 2.4s ease-in-out infinite alternate;
}

.preloader-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(192, 132, 252, 0.75);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.7), inset 0 0 20px rgba(217, 70, 239, 0.4);
}

.preloader-ring-spin {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px dashed rgba(232, 121, 249, 0.7);
  animation: preloaderSpin 9s linear infinite;
}

.preloader-circle-inner {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #240b44 0%, #120422 65%, #07010e 100%);
  border: 1.5px solid rgba(192, 132, 252, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  padding: 10px;
}

.preloader-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(192, 132, 252, 0.9));
  animation: preloaderLogoPulse 2.4s ease-in-out infinite alternate;
}

@keyframes preloaderLogoPulse {
  0% { transform: scale(0.95); filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.8)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 0 22px rgba(232, 121, 249, 1)); }
}

/* Preloader Text & Messages */
.preloader-title {
  font-family: 'Kanit', sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.7), 0 0 24px rgba(168, 85, 247, 0.4);
}

.preloader-subtitle {
  font-family: 'Kanit', sans-serif;
  font-size: 0.84rem;
  font-weight: 400;
  color: #d8b4fe;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  opacity: 0.9;
}

/* Preloader Progress Bar */
.preloader-progress-track {
  width: 290px;
  max-width: 82vw;
  height: 6px;
  background: rgba(14, 4, 28, 0.95);
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
}

.preloader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 45%, #e879f9 75%, #ffd166 100%);
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.95), 0 0 22px rgba(232, 121, 249, 0.8);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* HERO HEADER LOGO OVERLAY */
.hero-header__logo-container {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 100%;
  max-width: 540px;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.hero-header__logo {
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.85)) drop-shadow(0 15px 30px rgba(0, 0, 0, 0.95));
  animation: logoFloat 4s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 35px rgba(168, 85, 247, 0.8)) drop-shadow(0 15px 25px rgba(0, 0, 0, 0.9)); }
  100% { transform: translateY(-12px) scale(1.02); filter: drop-shadow(0 0 55px rgba(232, 121, 249, 1)) drop-shadow(0 20px 35px rgba(0, 0, 0, 0.95)); }
}

/* Animations */
@keyframes preloaderGlowPulse {
  0% { transform: scale(0.94); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 1; }
}

@keyframes preloaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

