/* YK FAMILY - Pastel Palette Design Architecture */
:root {
  --om-bg: #fff0f5;
  --om-card: rgba(255, 255, 255, 0.92);
  --om-border: rgba(255, 255, 255, 0.95);
  --om-border-hover: #ffa4b6;
  --om-font: 'Prompt', 'Kanit', sans-serif;
  --pastel-pink: #ffa4b6;
  --pastel-pink-dark: #ff7597;
  --pastel-blue: #93c5fd;
  --pastel-lavender: #c084fc;
}

body {
  font-family: var(--om-font);
  background-color: #1e1b2e;
  color: #334155;
  background: 
    linear-gradient(180deg, rgba(15, 23, 42, 0.20) 0%, rgba(15, 23, 42, 0.32) 100%),
    linear-gradient(180deg, rgba(147, 197, 253, 0.10) 0%, rgba(244, 114, 182, 0.15) 100%),
    url('/assets/bg.png') no-repeat center top / cover fixed;
  overflow-x: hidden;
}

/* ========================================================
   OVERMINE FLOATING NAVBAR & ORB - PASTEL PALETTE ARCHITECTURE
   ======================================================== */
.om-nav-header {
  position: sticky;
  top: 0.75rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.75rem;
  width: 100%;
}

@media (min-width: 640px) {
  .om-nav-header {
    top: 1rem;
    padding: 0 1rem;
  }
}

.om-nav-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 1220px;
}

@media (min-width: 640px) {
  .om-nav-container {
    gap: 0.75rem;
  }
}

.om-nav-pill {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 32px -8px rgba(255, 164, 182, 0.28), 0 4px 12px rgba(147, 197, 253, 0.12);
  transition: all 0.25s ease;
}

@media (min-width: 640px) {
  .om-nav-pill {
    min-height: 60px;
    padding: 0.45rem 1rem;
  }
}

.om-nav-orb {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px -8px rgba(255, 164, 182, 0.28), 0 4px 12px rgba(147, 197, 253, 0.12);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .om-nav-orb {
    width: 58px;
    height: 58px;
  }
}

.om-nav-orb:hover {
  transform: scale(1.06);
  border-color: #ffa4b6;
  box-shadow: 0 14px 34px -6px rgba(255, 164, 182, 0.4);
}

.om-nav-auth {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 164, 182, 0.35);
  box-shadow: 0 4px 14px -2px rgba(255, 164, 182, 0.25);
  padding: 0.25rem 0.75rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .om-nav-auth {
    height: 48px;
    padding: 0.35rem 0.85rem;
  }
}

.om-nav-auth:hover {
  border-color: #ffa4b6;
  box-shadow: 0 8px 24px -4px rgba(255, 164, 182, 0.4);
}

.om-nav-link {
  font-family: 'Prompt', 'Kanit', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  height: 42px;
  border-radius: 1rem; /* rounded-2xl like Uniquecraft */
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1e293b; /* crisp dark slate */
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1.5px solid transparent;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .om-nav-link {
    padding: 0.48rem 1.25rem;
    font-size: 15.5px;
    height: 44px;
  }
}

.om-nav-link i {
  font-size: 0.9rem;
  transition: transform 0.2s ease, color 0.2s ease;
  color: #ffa4b6;
}

.om-nav-link:hover {
  color: #e11d48;
  background: rgba(255, 164, 182, 0.16);
  transform: translateY(-1.5px);
}

.om-nav-link:hover i {
  transform: scale(1.1);
  color: #ff7597;
}

/* ========================================================
   ACTIVE STATE: Styled exactly like Uniquecraft's "เข้าสู่ระบบ"
   - Solid / Rich pastel gradient
   - Crisp white text & icon
   - rounded-2xl (1rem)
   - Font weight 800 / font-black
   - Signature Uniquecraft colored glow / shadow-lg
   - Subtle scale-102 & smooth elevation
   - Active press scale-95
   ======================================================== */
.om-nav-link.active {
  background: linear-gradient(135deg, #ffa4b6 0%, #ff829d 100%);
  color: #ffffff !important;
  font-weight: 800;
  border-radius: 1rem; /* rounded-2xl */
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px 0 rgba(255, 117, 151, 0.48), 0 2px 6px rgba(0, 0, 0, 0.04);
  transform: translateY(-1.5px) scale(1.02);
}

.om-nav-link.active i {
  color: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.om-nav-link.active:hover {
  background: linear-gradient(135deg, #ff95aa 0%, #ff7391 100%);
  box-shadow: 0 6px 20px 0 rgba(255, 117, 151, 0.58), 0 3px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px) scale(1.04);
}

.om-nav-link:active {
  transform: scale(0.96) !important;
}

/* Tiles Row */
.tiles-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
}

.tile-fx {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 1.6rem;
  overflow: hidden;
  position: relative;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 30px -8px rgba(255, 175, 200, 0.24), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.tile-fx:hover {
  transform: translateY(-8px);
  border-color: var(--g, #ffa4b6);
  box-shadow: 0 22px 45px -10px rgba(255, 164, 182, 0.38), 0 0 25px -4px var(--g, rgba(255, 164, 182, 0.35));
}

.tile-fx .tile-btn {
  background: var(--g);
  color: #ffffff;
  box-shadow: 0 3px 10px -2px rgba(0, 0, 0, 0.16), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tile-fx:hover .tile-btn {
  opacity: 0.96;
}

/* Float Animations */
@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-14px);
  }
}

.hero-float {
  animation: heroFloat 3s ease-in-out infinite;
  display: inline-block;
  will-change: transform;
}

/* Solid Crisp Card (Non-transparent in light & dark mode) */
.glass-card {
  background: #ffffff;
  border: 1.5px solid #f1f5f9;
  border-radius: 1.6rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

/* Tab Panes */
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar - Pastel Theme */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fff0f5;
}
::-webkit-scrollbar-thumb {
  background: #fbcfe8;
  border-radius: 9999px;
  border: 2px solid #fff0f5;
}
::-webkit-scrollbar-thumb:hover {
  background: #f472b6;
}

/* YK Family Ranking Podium & Grid Styles */
.ranking-podium-slot {
  position: relative;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.ranking-podium-slot:hover {
  transform: translateY(-8px);
}

.ranking-rank-grid .group:hover {
  transform: translateY(-4px);
}

/* ========================================================
   DARK THEME ARCHITECTURE & SYSTEM PREFERENCE SUPPORT
   ======================================================== */
html.dark body {
  color: #f1f5f9;
  background: 
    linear-gradient(180deg, rgba(12, 13, 20, 0.88) 0%, rgba(12, 13, 20, 0.95) 100%),
    linear-gradient(180deg, rgba(255, 164, 182, 0.06) 0%, rgba(147, 197, 253, 0.04) 100%),
    url('/assets/bg.png') no-repeat center top / cover fixed;
}

html.dark .om-nav-pill,
html.dark .om-nav-orb,
html.dark .om-nav-auth {
  background: rgba(18, 18, 28, 0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(255, 164, 182, 0.12);
}

html.dark .om-nav-orb:hover,
html.dark .om-nav-auth:hover {
  border-color: #ffa4b6;
  box-shadow: 0 14px 34px -6px rgba(255, 164, 182, 0.4);
}

html.dark .om-nav-link {
  color: #cbd5e1;
}

html.dark .om-nav-link i {
  color: #ffa4b6;
}

html.dark .om-nav-link:hover {
  color: #ffa4b6;
  background: rgba(255, 164, 182, 0.18);
}

html.dark .om-nav-link.active {
  background: linear-gradient(135deg, #ffa4b6 0%, #ff7597 100%) !important;
  color: #ffffff !important;
}

html.dark .om-nav-link.active i {
  color: #ffffff !important;
}

html.dark .glass-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(255, 164, 182, 0.08) !important;
}

html.dark .tile-fx {
  background: rgba(24, 24, 38, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.6) !important;
}

html.dark .tile-fx:hover {
  border-color: #ffa4b6 !important;
  box-shadow: 0 22px 45px -10px rgba(0, 0, 0, 0.75), 0 0 25px -4px rgba(255, 164, 182, 0.35) !important;
}

html.dark #mobile-menu {
  background: rgba(20, 20, 32, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7) !important;
}

html.dark #mobile-menu button {
  color: #e2e8f0 !important;
}

html.dark #mobile-menu button:hover {
  background: rgba(255, 164, 182, 0.16) !important;
}

html.dark .ranking-podium-slot {
  background: linear-gradient(180deg, rgba(28, 28, 44, 0.95) 0%, rgba(18, 18, 28, 0.88) 100%) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6) !important;
}

html.dark .ranking-rank-grid .group {
  background: rgba(24, 24, 38, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .bg-white,
html.dark .bg-white\/95,
html.dark .bg-white\/90,
html.dark .bg-white\/80,
html.dark .bg-white\/70 {
  background-color: rgba(22, 22, 34, 0.90) !important;
}

html.dark .border-emerald-100,
html.dark .border-indigo-100,
html.dark .border-purple-100,
html.dark .border-orange-100,
html.dark .border-pink-100,
html.dark .border-pink-100\/90,
html.dark .border-pink-100\/80,
html.dark .border-pink-100\/60,
html.dark .border-pink-50 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .text-slate-900,
html.dark .text-slate-800 {
  color: #f8fafc !important;
}

html.dark .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-600,
html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .text-slate-400 {
  color: #64748b !important;
}

html.dark input,
html.dark select,
html.dark textarea {
  background-color: rgba(15, 15, 24, 0.92) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark #cart-drawer,
html.dark #login-modal .glass-card,
html.dark #promptpay-modal .glass-card,
html.dark #payment-success-modal .glass-card {
  background-color: rgba(18, 18, 28, 0.97) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

footer,
html.dark footer {
  border-color: transparent !important;
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.dark ::-webkit-scrollbar-track {
  background: #0f101a;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #2d2f44;
  border: 2px solid #0f101a;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #ffa4b6;
}

/* ========================================================
   YK FAMILY GUIDE LAYOUT & TYPOGRAPHY
   ======================================================== */
.guide-content h1 {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 1.75rem 0 0.85rem;
  line-height: 1.3;
}
.guide-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.35;
  color: #1e293b;
}
html.dark .guide-content h2 {
  color: #f8fafc;
}
.guide-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: #334155;
}
html.dark .guide-content h3 {
  color: #e2e8f0;
}
.guide-content p {
  margin: 0 0 1rem;
  line-height: 1.8;
  color: #475569;
}
html.dark .guide-content p {
  color: #cbd5e1;
}
.guide-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
  color: #475569;
}
html.dark .guide-content ul {
  color: #cbd5e1;
}
.guide-content ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
  color: #475569;
}
html.dark .guide-content ol {
  color: #cbd5e1;
}
.guide-content li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.guide-content blockquote {
  border-left: 4px solid #ff7597;
  padding: 0.85rem 1.25rem;
  margin: 1.25rem 0;
  background: rgba(255, 164, 182, 0.08);
  border-radius: 0 0.85rem 0.85rem 0;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.7;
}
html.dark .guide-content blockquote {
  background: rgba(255, 117, 151, 0.12);
  color: #cbd5e1;
}
.guide-content table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
}
html.dark .guide-content table {
  border-color: rgba(255, 255, 255, 0.1);
}
.guide-content table th {
  padding: 10px 14px;
  background: rgba(248, 250, 252, 0.95);
  font-weight: 700;
  text-align: left;
  color: #1e293b;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
html.dark .guide-content table th {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.guide-content table td {
  padding: 10px 14px;
  color: #475569;
  border-bottom: 1px solid rgba(241, 245, 249, 0.9);
}
html.dark .guide-content table td {
  color: #cbd5e1;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.guide-content table tr:last-child td {
  border-bottom: none;
}
.guide-content table tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.5);
}
html.dark .guide-content table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}
.guide-content :not(pre) > code {
  display: inline-block;
  background: rgba(255, 164, 182, 0.14);
  color: #e11d48;
  padding: 0.15em 0.5em;
  border-radius: 0.375rem;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
}
html.dark .guide-content :not(pre) > code {
  background: rgba(255, 164, 182, 0.20);
  color: #ffa4b6;
}
.guide-article-item.active {
  background: linear-gradient(135deg, rgba(255, 164, 182, 0.18) 0%, rgba(255, 117, 151, 0.24) 100%) !important;
  border-color: rgba(255, 117, 151, 0.6) !important;
}
html.dark .guide-article-item.active {
  background: linear-gradient(135deg, rgba(255, 164, 182, 0.16) 0%, rgba(255, 117, 151, 0.22) 100%) !important;
  border-color: rgba(255, 117, 151, 0.5) !important;
}

/* ========================================================
   YK FAMILY LEADERBOARD & SOLID CARD ARCHITECTURE
   ======================================================== */
.yk-solid-card {
  background: #ffffff !important;
  border-radius: 1.5rem;
}
html.dark .yk-solid-card {
  background: #1e293b !important;
}

@keyframes lbPopIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lb-pop {
  animation: lbPopIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes lbRowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lb-row-in {
  animation: lbRowIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* ========================================================
   YK FAMILY MODERN FLOATING GAMING SIDEBAR (ISLAND DESIGN)
   ======================================================== */
.gaming-side-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  text-align: left;
  user-select: none;
}
.dark .gaming-side-btn {
  color: #94a3b8;
}
.gaming-side-btn:hover {
  color: #ff7597;
  background: rgba(255, 164, 182, 0.08);
  border-color: rgba(255, 164, 182, 0.2);
  transform: translateX(3px);
}
.gaming-side-btn.active {
  background: linear-gradient(135deg, #ffa4b6 0%, #ff7597 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 20px rgba(255, 117, 151, 0.4);
  transform: translateX(3px);
}
.gaming-side-btn.active .side-icon-box {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}
.gaming-side-btn.active .side-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.side-icon-box {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.side-btn-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-badge {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 0.5rem;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 164, 182, 0.25);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 164, 182, 0.45);
}



