/* ========================================================
   LOCALIZED INTER FONT (100% Offline)
   ======================================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --r2: color-mix(in srgb, var(--r), #fff 10%);
  --bd: color-mix(in srgb, var(--r), #fff 22%);
  --w: #fcf4ff;
  --g: linear-gradient(135deg, var(--b2), var(--b));
  --on: #26102e;
  --red: #ff6b8f;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  background: transparent;
  color: var(--t);
  font:
    15px var(--font),
    system-ui,
    sans-serif;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--r), transparent 20%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 22px;
}

.lg {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--w);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  cursor: pointer;
}

.lg img {
  height: 32px;
  border-radius: 8px;
}

.lg small {
  font-weight: 500;
  font-size: 12px;
  color: var(--t);
}

.btn {
  border: 0;
  border-radius: var(--rad);
  padding: 8px 15px;
  font-weight: 700;
  cursor: pointer;
  background: var(--r2);
  color: var(--w);
}

.btn:hover {
  filter: brightness(1.15);
}

.btn:disabled {
  opacity: 0.4;
}

.btn.p {
  background: var(--g);
  color: var(--on);
}

.btn.d {
  color: var(--red);
}

.bdg {
  background: var(--g);
  color: var(--on);
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 800;
}

main {
  min-height: calc(100vh - 120px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 22px 140px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tb {
  background: var(--r);
  border: 0;
  border-radius: 99px;
  padding: 8px 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--t);
}

.tb.on {
  box-shadow: inset 0 0 0 2px var(--b);
  color: var(--b);
}

.fl {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.in {
  background: var(--r);
  border: 2px solid transparent;
  border-radius: var(--rad);
  padding: 9px 13px;
  outline: 0;
}

.in:focus {
  border-color: var(--b);
}

.sq {
  flex: 1;
  min-width: 200px;
}

/* ========================================================
   CRAFTINDEX CATALOG GRID & RESOURCE CARD ARCHITECTURE
   ======================================================== */
.craftindex-grid,
.gr {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.craftindex-card,
.cd {
  background: color-mix(in srgb, var(--r), transparent 22%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  border-radius: var(--rad);
  padding: 15px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  position: relative;
  border: 2px solid transparent;
  transition: 0.15s;
}

.craftindex-card:hover,
.cd:hover {
  transform: translateY(-2px);
}

.craftindex-card.is-selected,
.cd.sel {
  border-color: var(--b);
}

.craftindex-card-icon,
.ic {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: var(--r2);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: var(--b);
}

.craftindex-card-title,
.cd h3 {
  margin: 0;
  font-size: 16px;
  color: var(--w);
}

.craftindex-card-title a,
.cd h3 a {
  color: inherit;
  text-decoration: none;
}

.craftindex-card-author,
.by {
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}

.craftindex-card-desc,
.ds {
  margin: 5px 0 8px;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.craftindex-card-meta,
.mt {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}

.craftindex-tag,
.tg {
  background: var(--r2);
  border-radius: 99px;
  padding: 2px 9px;
}

.craftindex-btn-add,
.ad {
  padding: 5px 11px;
  font-size: 13px;
}

.craftindex-card-actions,
.act {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(179, 136, 255, 0.15);
}

.craftindex-actions-right,
.act-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.craftindex-empty-catalog,
.em {
  padding: 50px;
  text-align: center;
  grid-column: 1/-1;
}
  grid-column: 1/-1;
}

.fabs {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 120 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.fabs.h,
body[data-tab="docs"] .fabs,
body[data-tab="socials"] .fabs,
body[data-tab="studio"] .fabs,
body:has(#standaloneSocialsView:not([style*="display: none"])) .fabs,
body:has(#standaloneDocsView:not([style*="display: none"])) .fabs {
  display: none !important;
}

.fabs .btn {
  border-radius: 99px !important;
  background: rgba(26, 18, 44, 0.78) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1px solid rgba(179, 136, 255, 0.28) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
  color: var(--w) !important;
  padding: 10px 20px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.fabs .btn:hover {
  background: rgba(40, 28, 68, 0.9) !important;
  border-color: rgba(179, 136, 255, 0.5) !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5) !important;
}

.fabs .btn.d {
  background: rgba(45, 12, 28, 0.78) !important;
  border-color: rgba(255, 80, 120, 0.3) !important;
  color: #ff6b8f !important;
}

.fabs .btn.d:hover {
  background: rgba(65, 16, 38, 0.9) !important;
  border-color: #ff5078 !important;
  color: #fff !important;
}

.fabs .big {
  padding: 14px 26px !important;
  font-size: 16px !important;
  background: linear-gradient(135deg, #b388ff, #7c4dff) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 30px rgba(124, 77, 255, 0.5) !important;
}

.fabs .big:hover {
  box-shadow: 0 12px 38px rgba(124, 77, 255, 0.65) !important;
  transform: translateY(-2px) scale(1.03) !important;
}

body.light-mode .fabs .btn {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(147, 51, 234, 0.25) !important;
  box-shadow: 0 8px 30px rgba(120, 80, 160, 0.2) !important;
  color: #1a0f2e !important;
}

body.light-mode .fabs .btn.d {
  background: rgba(254, 242, 242, 0.9) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #dc2626 !important;
}

body.light-mode .fabs .big {
  background: linear-gradient(135deg, #9333ea, #c084fc) !important;
  color: #fff !important;
  box-shadow: 0 8px 30px rgba(147, 51, 234, 0.4) !important;
}

/* ========================================================
   CART DRAWER & BACKDROP - CYBER-GLASS THEME
   ======================================================== */
.sc {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99990 !important;
  display: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: auto;
}

.sc.o {
  display: block !important;
  opacity: 1 !important;
}

body.light-mode .sc {
  background: rgba(220, 210, 235, 0.75) !important;
}

.dr {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  background: #0e0a1a !important;
  background: rgba(14, 10, 26, 0.985) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999 !important;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(179, 136, 255, 0.25) !important;
  box-shadow:
    -20px 0 60px rgba(0, 0, 0, 0.88),
    -4px 0 25px rgba(124, 77, 255, 0.25) !important;
}

.dr.o {
  transform: translateX(0) !important;
}

body.light-mode .dr {
  background: #ffffff !important;
  background: rgba(255, 255, 255, 0.985) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-left: 1px solid rgba(147, 51, 234, 0.22) !important;
  box-shadow:
    -20px 0 60px rgba(120, 80, 160, 0.25),
    -4px 0 25px rgba(147, 51, 234, 0.18) !important;
}

/* Drawer Header */
.dr-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(24, 18, 42, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(179, 136, 255, 0.22) !important;
  flex-shrink: 0;
}

body.light-mode .dr-header {
  background: rgba(245, 240, 255, 0.82) !important;
  border-bottom-color: rgba(147, 51, 234, 0.2) !important;
}

.dr-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(179, 136, 255, 0.3) !important;
  background: rgba(30, 20, 52, 0.6) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  color: var(--t) !important;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

.dr-close:hover {
  background: rgba(255, 80, 120, 0.3) !important;
  border-color: #ff5078 !important;
  color: #ffffff !important;
  transform: rotate(90deg) scale(1.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

body.light-mode .dr-close {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(147, 51, 234, 0.25) !important;
  color: #2e1065 !important;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
}

body.light-mode .dr-close:hover {
  background: rgba(254, 226, 226, 0.9) !important;
  border-color: #dc2626 !important;
  color: #b91c1c !important;
  box-shadow: none !important;
}

.dr-header #dc {
  background: rgba(255, 80, 120, 0.16) !important;
  border: 1px solid rgba(255, 107, 143, 0.4) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  color: #ff85a2 !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 99px !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(255, 80, 120, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  cursor: pointer;
}

.dr-header #dc:hover {
  background: rgba(255, 80, 120, 0.3) !important;
  border-color: #ff5078 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 80, 120, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

body.light-mode .dr-header #dc {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #dc2626 !important;
}

body.light-mode .dr-header #dc:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #dc2626 !important;
  color: #991b1b !important;
}

/* Drawer Item List */
.dl {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========================================================
   UNIVERSAL THEMATIC SCROLLBARS (Cyber-Glass Purple)
   ======================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.45) rgba(16, 11, 28, 0.4);
}

body.light-mode * {
  scrollbar-color: rgba(147, 51, 234, 0.45) rgba(240, 230, 255, 0.5);
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(16, 11, 28, 0.45);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.45);
  border-radius: 99px;
  border: 1.5px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(192, 132, 252, 0.8);
  box-shadow: none;
}

::-webkit-scrollbar-thumb:active {
  background: #c084fc;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body.light-mode ::-webkit-scrollbar-track {
  background: rgba(240, 230, 255, 0.65);
}

body.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.4);
  border: 1.5px solid transparent;
  background-clip: padding-box;
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 51, 234, 0.75);
  box-shadow: none;
}

body.light-mode ::-webkit-scrollbar-thumb:active {
  background: #7c3aed;
}

/* Modal Body (.mbd) Scrollbar */
.mbd::-webkit-scrollbar,
#mb::-webkit-scrollbar,
.dl::-webkit-scrollbar {
  width: 7px;
}

.mbd::-webkit-scrollbar-track,
#mb::-webkit-scrollbar-track,
.dl::-webkit-scrollbar-track {
  background: rgba(14, 9, 24, 0.35);
  margin: 6px 0;
  border-radius: 99px;
}

.mbd::-webkit-scrollbar-thumb,
#mb::-webkit-scrollbar-thumb,
.dl::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.5), rgba(124, 58, 237, 0.65));
  border-radius: 99px;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.mbd::-webkit-scrollbar-thumb:hover,
#mb::-webkit-scrollbar-thumb:hover,
.dl::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c084fc, #9333ea);
  box-shadow: none;
}

body.light-mode .mbd::-webkit-scrollbar-track,
body.light-mode #mb::-webkit-scrollbar-track,
body.light-mode .dl::-webkit-scrollbar-track {
  background: rgba(235, 225, 250, 0.6);
}

body.light-mode .mbd::-webkit-scrollbar-thumb,
body.light-mode #mb::-webkit-scrollbar-thumb,
body.light-mode .dl::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.45), rgba(192, 132, 252, 0.55));
  border-color: rgba(147, 51, 234, 0.3);
}

body.light-mode .mbd::-webkit-scrollbar-thumb:hover,
body.light-mode #mb::-webkit-scrollbar-thumb:hover,
body.light-mode .dl::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7c3aed, #9333ea);
}

/* Item Rows */
.rw {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(26, 19, 44, 0.6) !important;
  border: 1px solid rgba(179, 136, 255, 0.18) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rw:hover {
  background: rgba(35, 25, 58, 0.8) !important;
  border-color: rgba(179, 136, 255, 0.4) !important;
  transform: translateX(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.light-mode .rw {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(147, 51, 234, 0.18) !important;
  box-shadow: 0 4px 14px rgba(160, 120, 180, 0.1);
}

body.light-mode .rw:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #9333ea !important;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.18);
}

.rw .ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 18px;
  flex: none;
  background: rgba(179, 136, 255, 0.12);
  border: 1px solid rgba(179, 136, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rw .t {
  flex: 1;
  min-width: 0;
}

.rw b {
  color: var(--w);
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-mode .rw b {
  color: #1a0f2e;
}

.rw span {
  font-size: 12px;
  color: var(--b);
  font-weight: 600;
  text-transform: capitalize;
}

.x {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 80, 120, 0.3);
  background: rgba(255, 80, 120, 0.08);
  color: #ff6b8f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.x:hover {
  background: rgba(255, 80, 120, 0.28);
  border-color: #ff5078;
  color: #ffffff;
  transform: scale(1.1);
}

/* Empty Cart View */
.dr-empty {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: auto 0;
}

.dr-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(179, 136, 255, 0.08);
  border: 1px solid rgba(179, 136, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  /* animation removed */
}

/* @keyframes floatCart removed for minimal design standards */
  100% { transform: translateY(-6px); }
}

body.light-mode .dr-empty-icon {
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.22);
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.15);
}

.dr-empty-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--w);
  letter-spacing: -0.01em;
}

body.light-mode .dr-empty-title {
  color: #1a0f2e;
}

.dr-empty-sub {
  font-size: 13.5px;
  color: rgba(232, 224, 245, 0.65);
  max-width: 270px;
  line-height: 1.55;
}

body.light-mode .dr-empty-sub {
  color: #6a5585;
}

/* Drawer Footer - Cyber-Glass Dock */
.dr-footer {
  padding: 16px 20px;
  background: rgba(18, 12, 32, 0.82) !important;
  border-top: 1px solid rgba(179, 136, 255, 0.25) !important;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  overflow: visible !important;
  position: relative;
  z-index: 100;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35) !important;
}

body.light-mode .dr-footer {
  background: rgba(248, 244, 255, 0.88) !important;
  border-top-color: rgba(147, 51, 234, 0.22) !important;
  box-shadow: 0 -10px 30px rgba(120, 80, 160, 0.1) !important;
}

/* Cart Action Wrappers & Menus */
.cart-action-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-popover-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 290px;
  background: rgba(18, 12, 34, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(179, 136, 255, 0.35) !important;
  border-radius: 18px !important;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.75),
    inset 0 1px 1px rgba(255, 255, 255, 0.16) !important;
  padding: 12px !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 100050 !important;
}

/* Hover bridge between button and popover so mouse move never loses hover */
.cart-popover-menu::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  height: 20px;
  pointer-events: auto;
  background: transparent;
}

/* Active Popover State */
.cart-action-wrap.hover-open .cart-popover-menu,
.cart-popover-menu.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.cart-popover-head {
  padding: 2px 6px 8px 6px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cph-title {
  font-size: 13px;
  font-weight: 800;
  color: #f3e8ff;
  letter-spacing: -0.01em;
}

.cph-desc {
  font-size: 11px;
  color: #c4b5fd;
  font-weight: 500;
}

.cart-popover-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(35, 22, 60, 0.55);
  border: 1px solid rgba(179, 136, 255, 0.2);
  color: #f1ecff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cart-popover-item:hover {
  background: rgba(147, 51, 234, 0.38) !important;
  border-color: rgba(216, 180, 254, 0.65) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.35);
}

.cart-popover-item:active {
  transform: scale(0.98);
}

.cpi-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cpi-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cpi-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.cpi-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cpi-badge.mrpack {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
}

.cpi-desc {
  font-size: 11px;
  color: #c4b5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 450;
}

/* Light mode styles for cart popovers */
body.light-mode .cart-popover-menu {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(147, 51, 234, 0.25) !important;
  box-shadow:
    0 20px 48px rgba(120, 80, 160, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .cph-title {
  color: #2e1065;
}

body.light-mode .cph-desc {
  color: #7c3aed;
}

body.light-mode .cart-popover-head {
  border-bottom-color: rgba(147, 51, 234, 0.15);
}

body.light-mode .cart-popover-item {
  background: rgba(245, 240, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.18);
  color: #2e1065;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.08);
}

body.light-mode .cart-popover-item:hover {
  background: rgba(237, 225, 255, 0.98) !important;
  border-color: #9333ea !important;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.2);
}

body.light-mode .cpi-icon {
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.16);
}

body.light-mode .cpi-title {
  color: #2e1065;
}

body.light-mode .cpi-desc {
  color: #6b21a8;
}

body.light-mode .cpi-badge {
  background: rgba(147, 51, 234, 0.12);
  color: #6b21a8;
  border-color: rgba(147, 51, 234, 0.25);
}

body.light-mode .cpi-badge.mrpack {
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.35);
}

.dr-tool-btn {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  background: rgba(30, 20, 52, 0.6) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(179, 136, 255, 0.3) !important;
  color: #f1ecff !important;
  font-size: 16px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
}

.dr-tool-btn:hover {
  background: rgba(60, 36, 100, 0.75) !important;
  border-color: rgba(216, 180, 254, 0.7) !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

body.light-mode .dr-tool-btn {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(147, 51, 234, 0.28) !important;
  color: #2e1065 !important;
  box-shadow:
    0 4px 14px rgba(147, 51, 234, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .dr-tool-btn:hover {
  background: rgba(245, 238, 255, 0.95) !important;
  border-color: #9333ea !important;
  color: #581c87 !important;
  box-shadow:
    0 6px 18px rgba(147, 51, 234, 0.25) !important;
}

.dr-footer #am {
  background: rgba(30, 20, 52, 0.6) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(179, 136, 255, 0.3) !important;
  color: #f1ecff !important;
  border-radius: 14px !important;
  padding: 11px 16px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
}

.dr-footer #am:hover {
  background: rgba(60, 36, 100, 0.75) !important;
  border-color: rgba(216, 180, 254, 0.7) !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

body.light-mode .dr-footer #am {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(147, 51, 234, 0.28) !important;
  color: #2e1065 !important;
  box-shadow:
    0 4px 14px rgba(147, 51, 234, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .dr-footer #am:hover {
  background: rgba(245, 238, 255, 0.95) !important;
  border-color: #9333ea !important;
  color: #581c87 !important;
  box-shadow:
    0 6px 18px rgba(147, 51, 234, 0.25) !important;
}

.dr-footer #dd {
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.85), rgba(124, 77, 255, 0.95)) !important;
  backdrop-filter: blur(16px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  border-radius: 14px !important;
  padding: 11px 18px !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.02em;
  box-shadow:
    0 6px 22px rgba(124, 77, 255, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer;
}

.dr-footer #dd:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 10px 28px rgba(124, 77, 255, 0.75),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

body.light-mode .dr-footer #dd {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(192, 132, 252, 0.9)) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow:
    0 6px 20px rgba(147, 51, 234, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

.dr-footer #dd:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(179, 136, 255, 0.6) !important;
}

body.light-mode .dr-footer #dd {
  background: linear-gradient(135deg, #9333ea, #c084fc) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(147, 51, 234, 0.35) !important;
}

/* Modals (Download, Presets, History) */
.md {
  position: fixed;
  inset: 0;
  z-index: 100100 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 14, 0.72) !important;
  backdrop-filter: blur(18px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(190%) !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.md.o {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.mx {
  background: rgba(20, 15, 34, 0.94) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.75),
    inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(179, 136, 255, 0.28) !important;
  width: min(460px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  position: relative;
  animation: none !important;
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, opacity;
}

.md.o .mx {
  transform: scale(1) translateY(0) !important;
  opacity: 1 !important;
}

body.light-mode .mx {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(147, 51, 234, 0.25) !important;
  box-shadow:
    0 24px 70px rgba(120, 80, 160, 0.22) !important;
}

.mh {
  padding: 18px 24px;
  background: rgba(26, 19, 44, 0.65);
  border-bottom: 1px solid rgba(179, 136, 255, 0.18);
  border-radius: 20px 20px 0 0;
  color: var(--w);
  font-weight: 800;
  font-size: 18px;
}

body.light-mode .mh {
  background: rgba(245, 240, 255, 0.75);
  border-bottom-color: rgba(147, 51, 234, 0.15);
  color: #1a0f2e;
}

.mbd {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  z-index: 50 !important;
  overflow: visible !important;
}

.mbd label:not(.settings-switch) {
  display: block;
  width: 100%;
}

.mbd .glass-select-wrap {
  width: 100% !important;
  display: block !important;
  margin-top: 6px;
}

.mbd .glass-select-trigger {
  width: 100% !important;
  display: flex !important;
  box-sizing: border-box !important;
}

.mbd .glass-select-menu {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.mx.settings-mode .mbd,
.mx.sources-mode .mbd {
  max-height: 70vh;
  overflow-y: auto !important;
}

.mf {
  padding: 14px 24px;
  background: rgba(20, 14, 34, 0.88);
  border-top: 1px solid rgba(179, 136, 255, 0.18);
  border-radius: 0 0 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  z-index: 10 !important;
}

body.light-mode .mf {
  background: rgba(248, 244, 255, 0.92);
  border-top-color: rgba(147, 51, 234, 0.15);
}

.s {
  font-size: 12px;
  font-weight: 800;
  border-radius: 99px;
  padding: 3px 10px;
  background: var(--r2);
  white-space: nowrap;
}

.s.ok {
  color: var(--b);
}

.s.w {
  color: #ffc27a;
}

.s.b {
  color: var(--red);
}

.pg {
  height: 9px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}

.pg i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--g);
}

.tt {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--r2);
  color: var(--w);
  padding: 9px 16px;
  border-radius: 99px;
  z-index: 60;
  display: none;
}

.hl {
  outline: 3px solid var(--b) !important;
  outline-offset: 4px;
  border-radius: 8px;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--b), transparent 72%);
  animation: hlp 1s ease-in-out infinite alternate;
}

@keyframes hlp {
  to {
    outline-offset: 7px;
  }
}

.pgc {
  line-height: 1.6;
}

.pgc h1,
.pgc h2,
.pgc h3 {
  color: var(--w);
}

.pgc a {
  color: var(--b);
}

.pgc code,
.pgc pre {
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 6px;
}

.pgc pre {
  padding: 10px;
  overflow: auto;
}

.pgc blockquote {
  border-left: 3px solid var(--b);
  margin: 8px 0;
  padding-left: 12px;
}

.pgc img {
  max-width: 100%;
  border-radius: 10px;
}

footer {
  text-align: center;
  padding: 26px;
  font-size: 13px;
}

footer a {
  color: var(--b);
  margin: 0 6px;
}

/* Dynamic Video Background */
.bg-video-container {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg);
  contain: strict;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  filter: saturate(1.1) brightness(0.9);
}

.bg-video.active {
  opacity: 1;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  transition:
    background 0.8s ease,
    backdrop-filter 0.8s ease;
  pointer-events: none;
}

/* Dark mode video overlay - deep cosmic purple translucent scrim */
.bg-overlay.dark {
  background: radial-gradient(
    circle at 50% 20%,
    rgba(12, 9, 21, 0.55) 0%,
    rgba(12, 9, 21, 0.82) 100%
  );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Light mode video overlay - soft sakura translucent scrim */
.bg-overlay.light {
  background: radial-gradient(
    circle at 50% 20%,
    rgba(255, 240, 248, 0.22) 0%,
    rgba(245, 235, 250, 0.42) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ========================================================
   LIGHT THEME LUXURY GLASSMORPHISM (Sakura Forest Palette)
   ======================================================== */
body.light-mode {
  --bg: #f8f4fc;
  --r: rgba(255, 255, 255, 0.65);
  --t: #3d2b56;
  --w: #180c2e;
  --bd: rgba(225, 210, 240, 0.75);
  --r2: rgba(255, 255, 255, 0.85);
  --b: #9333ea;
  --b2: #c084fc;
  --g: linear-gradient(135deg, #9333ea, #c084fc);
  --on: #ffffff;
}

body.light-mode header {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(225, 210, 240, 0.65);
  box-shadow: 0 4px 20px rgba(160, 120, 180, 0.08);
}

body.light-mode .cd {
  background: rgba(255, 255, 255, 0.58) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 8px 30px rgba(150, 110, 175, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

body.light-mode .cd:hover {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: #a855f7;
  box-shadow: 0 14px 36px rgba(168, 85, 247, 0.22);
}

body.light-mode .cd h3,
body.light-mode .cd h3 a {
  color: #1a0f2e;
  font-weight: 700;
}

body.light-mode .ds {
  color: #48395f;
}

body.light-mode .by {
  color: #735f8e;
}

body.light-mode .tb {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(225, 210, 240, 0.7);
  color: #3b2854;
  box-shadow: 0 2px 8px rgba(160, 120, 180, 0.06);
}

body.light-mode .tb:hover {
  background: rgba(255, 255, 255, 0.88);
  color: #6b21a8;
}

body.light-mode .tb.on {
  background: rgba(255, 255, 255, 0.94);
  color: #7e22ce;
  box-shadow:
    0 4px 14px rgba(168, 85, 247, 0.25),
    inset 0 0 0 2px #a855f7;
}

body.light-mode .in {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(225, 210, 240, 0.85);
  color: #24143d;
  box-shadow: 0 2px 10px rgba(160, 120, 180, 0.06);
}

body.light-mode .in:focus {
  background: rgba(255, 255, 255, 0.92);
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

body.light-mode .btn {
  background: rgba(255, 255, 255, 0.68);
  color: #24143d;
  border: 1px solid rgba(225, 210, 240, 0.85);
}

body.light-mode .btn:hover {
  background: rgba(255, 255, 255, 0.92);
}

body.light-mode .btn.p {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  color: #ffffff !important;
  border: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

body.light-mode .btn.p:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
}

body.light-mode .bdg {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  color: #ffffff;
}

body.light-mode .tg {
  background: rgba(240, 230, 252, 0.85);
  color: #6b21a8;
  font-weight: 600;
  border: 1px solid rgba(215, 195, 235, 0.5);
}


body.light-mode .mx {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(225, 210, 240, 0.9);
}

body.light-mode footer {
  color: #5c4777;
  font-weight: 500;
}

/* ========================================================
   FUTURISTIC COSMIC CYBER-GLASS REDESIGN (CraftIndex)
   ======================================================== */

/* Header - Floating Cyber Glass */
header {
  position: sticky;
  top: 0;
  z-index: 100 !important;
  background: color-mix(in srgb, var(--bg), transparent 25%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(179, 136, 255, 0.22) !important;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 44px !important;
}

.lg {
  font-weight: 800;
  font-size: 22px !important;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: var(--w) !important;
  cursor: pointer;
  user-select: none;
  border-radius: 12px;
  outline: none;
  transition: opacity 0.2s ease;
}

.lg:visited,
.lg:hover,
.lg:active {
  text-decoration: none !important;
  color: var(--w) !important;
}

.lg:focus-visible {
  outline: 2px solid var(--b, #b388ff) !important;
  outline-offset: 4px;
}

.lg img {
  height: 36px !important;
  border-radius: 12px !important;
  /* drop-shadow glow removed */
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lg:hover img {
  transform: scale(1.08) rotate(4deg);
}

/* Widescreen Main Container */
main {
  max-width: min(95vw, 1720px) !important;
  margin: 0 auto !important;
  padding: 28px 40px 140px !important;
}

/* Category Navigation (Tabs) - Futuristic Glass Capsule Bar */
.tabs {
  display: inline-flex !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  background: rgba(22, 17, 38, 0.45) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1px solid rgba(179, 136, 255, 0.2) !important;
  border-radius: 99px !important;
  padding: 5px !important;
  gap: 6px !important;
  margin-bottom: 20px !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
}

.tabs::-webkit-scrollbar {
  display: none !important;
}

.tb {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.tb {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 99px !important;
  padding: 9px 24px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 0.02em !important;
  color: var(--t) !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.tb:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.tb.on {
  background: linear-gradient(
    135deg,
    rgba(179, 136, 255, 0.25),
    rgba(124, 77, 255, 0.4)
  ) !important;
  border-color: rgba(179, 136, 255, 0.5) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

/* Filter & Search Bar - Glass Cyber Dock */
.fl {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px !important;
  background: rgba(22, 17, 38, 0.45) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  padding: 10px 14px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(179, 136, 255, 0.18) !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  position: relative !important;
  z-index: 50 !important;
}

.in {
  background: rgba(12, 9, 21, 0.5) !important;
  border: 1px solid rgba(179, 136, 255, 0.2) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  color: var(--w) !important;
  font-size: 14px !important;
  outline: none;
  transition: all 0.25s ease !important;
}

.in:focus {
  border-color: var(--b) !important;
  box-shadow:
    0 0 0 3px rgba(179, 136, 255, 0.25) !important;
  background: rgba(12, 9, 21, 0.7) !important;
}

/* The Grid - Organised strictly in 3 cards in one line on desktop */
.gr {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch !important;
  position: relative;
  z-index: 1;
}

@media (max-width: 1080px) {
  .gr {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 680px) {
  .gr {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* Futuristic Cards - Holographic Glassmorphism */
.cd {
  background: linear-gradient(
    145deg,
    rgba(28, 20, 52, 0.55) 0%,
    rgba(14, 10, 26, 0.65) 100%
  ) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 18px !important;
  padding: 20px !important;
  display: grid !important;
  grid-template-columns: 84px 1fr !important;
  grid-template-rows: 1fr auto !important;
  gap: 16px !important;
  position: relative;
  border: 1px solid rgba(179, 136, 255, 0.22) !important;
  box-shadow:
    0 12px 36px -10px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15) !important;
  height: 100% !important;
  align-self: stretch !important;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease !important;
}

.cd:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(179, 136, 255, 0.65) !important;
  box-shadow:
    0 22px 50px -10px rgba(124, 77, 255, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
}

.cd.sel {
  border-color: var(--b) !important;
  box-shadow:
    0 0 0 2px var(--b),
    0 18px 45px -10px rgba(124, 77, 255, 0.55) !important;
}

/* Mod Icon with Cyber Frame */
.ic {
  width: 84px !important;
  height: 84px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.25s ease !important;
}

.cd:hover .ic {
  transform: translateY(-1px);
}

.cd h3 {
  margin: 0;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  color: var(--w);
  line-height: 1.3;
}

.cd h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cd h3 a:hover {
  color: var(--b);
}

.by {
  font-size: 12px;
  font-weight: 400;
  color: rgba(207, 195, 230, 0.7);
  margin-left: 6px;
}

.ds {
  margin: 8px 0 12px !important;
  font-size: 14px;
  line-height: 1.5 !important;
  color: var(--t);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Metadata Stats & Tags */
.mt {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  align-items: center;
}

.mt span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tg {
  background: rgba(179, 136, 255, 0.15) !important;
  border: 1px solid rgba(179, 136, 255, 0.25) !important;
  border-radius: 99px !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #d8c2ff !important;
}

/* Card Action Buttons Bar */
.act {
  grid-column: 1/-1 !important;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(179, 136, 255, 0.12) !important;
}

/* Futuristic Buttons */
.btn {
  border-radius: 12px !important;
  padding: 9px 18px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--w) !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.btn.p {
  background: linear-gradient(135deg, #b388ff, #7c4dff) !important;
  border: 0 !important;
  color: #ffffff !important;
  box-shadow:
    0 4px 18px rgba(124, 77, 255, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

.btn.p:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 26px rgba(179, 136, 255, 0.6) !important;
}

.bdg {
  background: linear-gradient(135deg, #b388ff, #7c4dff) !important;
  box-shadow: none !important;
  color: #fff !important;
  border-radius: 99px !important;
  padding: 2px 9px !important;
}

/* Light Theme Precision Tuning */
body.light-mode header {
  background: rgba(255, 255, 255, 0.72) !important;
  border-bottom: 1px solid rgba(220, 200, 240, 0.7) !important;
  box-shadow: 0 4px 24px rgba(160, 120, 180, 0.1) !important;
}

body.light-mode .tabs {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(220, 200, 240, 0.8) !important;
  box-shadow: 0 10px 30px rgba(160, 120, 180, 0.12) !important;
}

body.light-mode .fl {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(220, 200, 240, 0.8) !important;
  box-shadow: 0 10px 30px rgba(160, 120, 180, 0.12) !important;
}

body.light-mode .in {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(220, 200, 240, 0.9) !important;
  color: #1a0f2e !important;
}

body.light-mode .cd {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(250, 242, 255, 0.65) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow:
    0 12px 32px -10px rgba(160, 120, 180, 0.18),
    inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .cd:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 20px 48px -10px rgba(168, 85, 247, 0.28) !important;
}

body.light-mode .cd h3,
body.light-mode .cd h3 a {
  color: #1a0f2e !important;
}

body.light-mode .ds {
  color: #43325c !important;
}

body.light-mode .tg {
  background: rgba(240, 230, 252, 0.9) !important;
  border-color: rgba(215, 195, 235, 0.8) !important;
  color: #6b21a8 !important;
}

body.light-mode .act {
  border-top-color: rgba(220, 200, 240, 0.6) !important;
}

body.light-mode .btn.p {
  background: linear-gradient(135deg, #9333ea, #c084fc) !important;
  color: #fff !important;
}

/* ========================================================
   INFINITE SCROLL LOADER & LOW-NETWORK RETRY BUTTON
   ======================================================== */
.auto-loader {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(22, 17, 38, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(179, 136, 255, 0.25);
  border-radius: 99px;
  color: var(--t);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: opacity 0.3s ease;
}

.cyber-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(179, 136, 255, 0.25);
  border-top-color: var(--b);
  border-radius: 50%;
  animation: cyberSpin 0.75s linear infinite;
  box-shadow: none;
}

@keyframes cyberSpin {
  to {
    transform: rotate(360deg);
  }
}

#mo {
  background: rgba(24, 18, 42, 0.72) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(179, 136, 255, 0.35) !important;
  color: #ffffff !important;
  padding: 12px 36px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  border-radius: 99px !important;
  cursor: pointer !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#mo.hidden,
#mo[hidden],
#mo[style*="display: none"] {
  display: none !important;
}

#mo:hover {
  background: rgba(45, 28, 80, 0.85) !important;
  border-color: rgba(216, 180, 254, 0.65) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow:
    0 12px 38px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
}

#mo:active {
  transform: translateY(0) scale(0.98) !important;
}

#mo.retry-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 80, 120, 0.28),
    rgba(179, 136, 255, 0.32)
  ) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 107, 143, 0.55) !important;
  color: #ffffff !important;
  padding: 12px 32px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 99px !important;
  box-shadow:
    0 8px 30px rgba(255, 80, 120, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  /* animation removed */
}

#mo.retry-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 80, 120, 0.4),
    rgba(179, 136, 255, 0.45)
  ) !important;
  border-color: #ff5078 !important;
  box-shadow:
    0 10px 35px rgba(255, 80, 120, 0.45) !important;
}

body.light-mode #mo {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(147, 51, 234, 0.32) !important;
  color: #2e1065 !important;
  box-shadow:
    0 8px 25px rgba(147, 51, 234, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode #mo:hover {
  background: rgba(246, 240, 255, 0.95) !important;
  border-color: #9333ea !important;
  box-shadow:
    0 12px 32px rgba(147, 51, 234, 0.25) !important;
}

body.light-mode #mo.retry-btn {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.9), rgba(243, 232, 255, 0.9)) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #991b1b !important;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.18) !important;
}

/* @keyframes pulseButton removed for minimal design standards */
  50% {
    transform: scale(1.03);
  }
}

body.light-mode .auto-loader {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(220, 200, 240, 0.85);
  color: #3b2854;
  box-shadow: 0 8px 24px rgba(160, 120, 180, 0.12);
}

body.light-mode .cyber-spinner {
  border-color: rgba(147, 51, 234, 0.25);
  border-top-color: #9333ea;
}

/* Ensure Load More is never visible on Mod Loaders and Server Softwares */
body[data-tab="modloaders"] #mo-wrap,
body[data-tab="serversoftwares"] #mo-wrap,
body[data-tab="modloaders"] #mo,
body[data-tab="serversoftwares"] #mo,
body[data-tab="modloaders"] #auto-loader,
body[data-tab="serversoftwares"] #auto-loader {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* ========================================================
   FUTURISTIC GLASS SELECT DROPDOWNS
   ======================================================== */
.fl select:not(.src-perm-dropdown):not(.settings-select),
select[data-glass-inited],
select.glass-replaced {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.glass-select-wrap {
  position: relative;
  display: inline-block;
  user-select: none;
}

.glass-select-wrap.open,
.glass-select-wrap:hover,
.glass-select-wrap:focus-within,
.glass-select-wrap:has(.glass-select-menu.open) {
  z-index: 500 !important;
}

.glass-select-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  cursor: pointer !important;
  min-width: 145px;
  background: rgba(12, 9, 21, 0.5) !important;
  border: 1px solid rgba(179, 136, 255, 0.22) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  color: var(--w) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.glass-select-trigger:hover,
.glass-select-trigger.active {
  border-color: var(--b) !important;
  box-shadow:
    0 0 0 3px rgba(179, 136, 255, 0.25) !important;
  background: rgba(22, 16, 38, 0.75) !important;
}

.glass-select-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.glass-select-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--b);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
}

.glass-select-trigger.active .glass-select-arrow {
  transform: rotate(180deg);
}

.glass-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  max-width: 320px;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  padding: 6px;
  border-radius: 16px;
  background: #0f0a1c !important;
  background: rgba(15, 10, 28, 0.99) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(179, 136, 255, 0.4) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.92),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  display: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition:
    opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Invisible Hover Bridge: ensures cursor moving down into options list never leaves the hover boundary */
.glass-select-menu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -8px;
  right: -8px;
  height: 16px;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

/* Lateral safety padding */
.glass-select-menu::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: -8px;
  left: -8px;
  right: -8px;
  background: transparent;
  pointer-events: auto;
  z-index: -1;
}

.glass-select-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Custom Cosmic Scrollbar */
.glass-select-menu::-webkit-scrollbar {
  width: 6px;
}

.glass-select-menu::-webkit-scrollbar-track {
  background: transparent;
}

.glass-select-menu::-webkit-scrollbar-thumb {
  background: rgba(179, 136, 255, 0.35);
  border-radius: 99px;
}

.glass-select-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(179, 136, 255, 0.6);
}

.glass-select-option {
  padding: 9px 14px;
  border-radius: 10px;
  margin: 3px 0;
  cursor: pointer;
  color: var(--t);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glass-select-option:hover {
  background: linear-gradient(
    135deg,
    rgba(179, 136, 255, 0.25),
    rgba(124, 77, 255, 0.35)
  );
  color: #ffffff;
  transform: translateX(3px);
  box-shadow: none;
}

.glass-select-option.selected {
  background: linear-gradient(135deg, #b388ff, #7c4dff);
  color: #ffffff;
  font-weight: 700;
  box-shadow:
    0 4px 14px rgba(124, 77, 255, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Light Theme Styling for Glass Dropdowns */
body.light-mode .glass-select-trigger {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(220, 200, 240, 0.9) !important;
  color: #1a0f2e !important;
  box-shadow:
    0 4px 16px rgba(160, 120, 180, 0.12),
    inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .glass-select-trigger:hover,
body.light-mode .glass-select-trigger.active {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #9333ea !important;
  box-shadow:
    0 0 0 3px rgba(168, 85, 247, 0.25),
    0 8px 24px rgba(160, 120, 180, 0.18) !important;
}

body.light-mode .glass-select-arrow {
  color: #9333ea;
}

body.light-mode .glass-select-menu {
  background: #ffffff !important;
  background: rgba(255, 255, 255, 0.985) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(220, 200, 240, 0.95) !important;
  box-shadow:
    0 24px 60px rgba(160, 120, 180, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .glass-select-option {
  color: #3b2854;
}

body.light-mode .glass-select-option:hover {
  background: rgba(240, 230, 252, 0.9);
  color: #6b21a8;
}

body.light-mode .glass-select-option.selected {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  color: #ffffff;
}

body.light-mode .glass-select-menu::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.35);
}

/* ========================================================
   CARD ACTION BAR: INFO BUTTON (LEFT), SOURCE (CENTER), ADD (RIGHT)
   ======================================================== */
.btn-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: rgba(179, 136, 255, 0.14);
  border: 1px solid rgba(179, 136, 255, 0.38);
  color: #d1b3ff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.btn-info:hover {
  background: rgba(179, 136, 255, 0.32);
  border-color: #b388ff;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: none;
}

body.light-mode .btn-info {
  background: rgba(147, 51, 234, 0.1);
  border-color: rgba(147, 51, 234, 0.3);
  color: #7e22ce;
}

body.light-mode .btn-info:hover {
  background: rgba(147, 51, 234, 0.22);
  border-color: #9333ea;
  color: #581c87;
  box-shadow: none;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(235, 226, 250, 0.85);
  letter-spacing: 0.3px;
  text-align: center;
  flex: 1;
  justify-content: center;
}

body.light-mode .source-badge {
  color: #44305c;
}

.source-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6.5px;
  padding: 5px 13px;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.35px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  line-height: 1.25;
}

.source-link.modrinth {
  color: #00e676;
  background: rgba(0, 230, 118, 0.14);
  border: 1.5px solid rgba(0, 230, 118, 0.45);
  box-shadow: 0 2px 10px rgba(0, 230, 118, 0.16);
}

.source-link.modrinth:hover {
  background: rgba(0, 230, 118, 0.28);
  border-color: #00e676;
  box-shadow: 0 3px 12px rgba(0, 230, 118, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

.source-link.curseforge {
  color: #ff7043;
  background: rgba(255, 112, 67, 0.14);
  border: 1.5px solid rgba(255, 112, 67, 0.45);
  box-shadow: 0 2px 10px rgba(255, 112, 67, 0.16);
}

.source-link.curseforge:hover {
  background: rgba(255, 112, 67, 0.28);
  border-color: #ff7043;
  box-shadow: 0 3px 12px rgba(255, 112, 67, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

.source-link.bukkit {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.16);
}

.source-link.bukkit:hover {
  background: rgba(251, 191, 36, 0.28);
  border-color: #fbbf24;
  box-shadow: 0 3px 12px rgba(251, 191, 36, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.bukkit {
  color: #b45309;
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.12);
}

body.light-mode .source-link.bukkit:hover {
  background: rgba(251, 191, 36, 0.32);
  border-color: #d97706;
  color: #78350f;
  box-shadow: none;
}

/* Hangar / PaperMC */
.source-link.hangar {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.16);
}

.source-link.hangar:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.hangar {
  color: #0284c7;
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.12);
}

body.light-mode .source-link.hangar:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #0284c7;
  color: #075985;
}

/* SpigotMC */
.source-link.spigotmc {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.14);
  border: 1.5px solid rgba(251, 146, 60, 0.45);
  box-shadow: 0 2px 10px rgba(251, 146, 60, 0.16);
}

.source-link.spigotmc:hover {
  background: rgba(251, 146, 60, 0.28);
  border-color: #fb923c;
  box-shadow: 0 3px 12px rgba(251, 146, 60, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.spigotmc {
  color: #ea580c;
  background: rgba(251, 146, 60, 0.16);
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.12);
}

body.light-mode .source-link.spigotmc:hover {
  background: rgba(251, 146, 60, 0.3);
  border-color: #ea580c;
  color: #9a3412;
}

/* Sponge */
.source-link.sponge {
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  box-shadow: 0 2px 10px rgba(250, 204, 21, 0.16);
}

.source-link.sponge:hover {
  background: rgba(250, 204, 21, 0.28);
  border-color: #facc15;
  box-shadow: 0 3px 12px rgba(250, 204, 21, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.sponge {
  color: #ca8a04;
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(202, 138, 4, 0.5);
  box-shadow: 0 2px 10px rgba(202, 138, 4, 0.12);
}

body.light-mode .source-link.sponge:hover {
  background: rgba(250, 204, 21, 0.32);
  border-color: #ca8a04;
  color: #713f12;
}

/* Polymart (Cyan/Teal Theme) */
.source-link.polymart {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.14);
  border: 1.5px solid rgba(6, 182, 212, 0.45);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.16);
}

.source-link.polymart:hover {
  background: rgba(6, 182, 212, 0.28);
  border-color: #06b6d4;
  box-shadow: 0 3px 12px rgba(6, 182, 212, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.polymart {
  color: #0891b2;
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: 0 2px 10px rgba(8, 145, 178, 0.12);
}

body.light-mode .source-link.polymart:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: #0891b2;
  color: #164e63;
}

/* Smithed (Amber/Fire Theme) */
.source-link.smithed {
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
  border: 1.5px solid rgba(249, 115, 22, 0.45);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.16);
}

.source-link.smithed:hover {
  background: rgba(249, 115, 22, 0.28);
  border-color: #f97316;
  box-shadow: 0 3px 12px rgba(249, 115, 22, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.smithed {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(194, 65, 12, 0.45);
  box-shadow: 0 2px 10px rgba(194, 65, 12, 0.12);
}

body.light-mode .source-link.smithed:hover {
  background: rgba(249, 115, 22, 0.3);
  border-color: #c2410c;
  color: #7c2d12;
}

/* GitHub (Silver/Slate Theme) */
.source-link.github {
  color: #f1f5f9;
  background: rgba(241, 245, 249, 0.14);
  border: 1.5px solid rgba(241, 245, 249, 0.45);
  box-shadow: 0 2px 10px rgba(241, 245, 249, 0.16);
}

.source-link.github:hover {
  background: rgba(241, 245, 249, 0.28);
  border-color: #f8fafc;
  box-shadow: 0 3px 12px rgba(241, 245, 249, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.github {
  color: #1e293b;
  background: rgba(30, 41, 59, 0.12);
  border-color: rgba(30, 41, 59, 0.45);
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.1);
}

body.light-mode .source-link.github:hover {
  background: rgba(30, 41, 59, 0.22);
  border-color: #0f172a;
  color: #0f172a;
}

/* PlanetMinecraft (Emerald / Earth Theme) */
.source-link.planetminecraft {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
  border: 1.5px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.16);
}

.source-link.planetminecraft:hover {
  background: rgba(34, 197, 94, 0.28);
  border-color: #22c55e;
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.planetminecraft {
  color: #15803d;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(22, 163, 74, 0.5);
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.12);
}

body.light-mode .source-link.planetminecraft:hover {
  background: rgba(34, 197, 94, 0.32);
  border-color: #16a34a;
  color: #14532d;
  box-shadow: none;
}

/* MinecraftMaps (Golden Amber Theme) */
.source-link.minecraftmaps {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.16);
}

.source-link.minecraftmaps:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.25);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.03);
}

body.light-mode .source-link.minecraftmaps {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.12);
}

body.light-mode .source-link.minecraftmaps:hover {
  background: rgba(245, 158, 11, 0.32);
  border-color: #d97706;
  color: #78350f;
}

/* Multi-Source Container in Card Bottom-Middle */
.source-badge.multi-source {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  padding: 2px 4px !important;
}

.source-multi-tag {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: rgba(216, 180, 254, 0.9) !important;
}

body.light-mode .source-multi-tag {
  color: #7e22ce !important;
}

.source-pill-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  align-items: center !important;
  justify-content: center !important;
}

.source-pill-row .source-link {
  padding: 3.5px 9px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
}

/* ========================================================
   SOURCE SELECTION & PERMANENT PREFERENCES MODAL
   ======================================================== */
.src-dialog-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--t);
  text-align: left;
}

.src-dialog-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.18);
}

.src-dialog-header .ic {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(179, 136, 255, 0.1);
  border: 1px solid rgba(179, 136, 255, 0.25);
  overflow: hidden;
}

.src-dialog-header .ic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.src-dialog-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--w);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.src-dialog-sub {
  font-size: 13px;
  color: rgba(220, 205, 245, 0.8);
  line-height: 1.4;
}

body.light-mode .src-dialog-sub {
  color: #584177;
}

.src-dialog-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--b2);
}

.src-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.src-card-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(22, 17, 38, 0.6);
  border: 1.5px solid rgba(179, 136, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  user-select: none;
}

body.light-mode .src-card-choice {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.2);
}

.src-card-choice:hover {
  background: rgba(179, 136, 255, 0.12);
  border-color: rgba(179, 136, 255, 0.5);
  transform: translateY(-1px);
}

.src-card-choice.active {
  background: rgba(168, 85, 247, 0.18) !important;
  border-color: #c084fc !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

body.light-mode .src-card-choice.active {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: #9333ea !important;
  box-shadow: none;
}

.src-card-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.src-card-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(179, 136, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.src-card-choice.active .src-card-dot {
  border-color: #c084fc;
  background: #c084fc;
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.35);
}

.src-card-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #180c2e;
  opacity: 0;
  transition: opacity 0.2s;
}

.src-card-choice.active .src-card-dot::after {
  opacity: 1;
}

.src-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.src-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.src-card-ver,
.src-card-dl {
  font-size: 12px;
  font-weight: 600;
  color: var(--t);
  opacity: 0.85;
}

.src-card-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--b2);
  text-decoration: none;
}

.src-card-link:hover {
  text-decoration: underline;
  color: #fff;
}

/* Permanent source preferences container */
.src-perm-container {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(14, 10, 25, 0.7);
  border: 1px solid rgba(179, 136, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.light-mode .src-perm-container {
  background: rgba(245, 238, 252, 0.9);
  border-color: rgba(147, 51, 234, 0.2);
}

.src-perm-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.src-perm-ico {
  font-size: 20px;
}

.src-perm-head b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--w);
}

.src-perm-head span {
  font-size: 12px;
  color: rgba(220, 205, 245, 0.75);
}

body.light-mode .src-perm-head span {
  color: #634a85;
}

.src-perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .src-perm-grid {
    grid-template-columns: 1fr;
  }
}

.src-perm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.src-perm-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--t);
  letter-spacing: 0.02em;
}

.src-perm-dropdown,
select.src-perm-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  pointer-events: auto !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: rgba(22, 16, 40, 0.95) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23b388ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 14px) center !important;
  border: 1.5px solid rgba(179, 136, 255, 0.38) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  padding: 8px 38px 8px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.src-perm-dropdown:hover,
select.src-perm-dropdown:hover {
  border-color: rgba(179, 136, 255, 0.65) !important;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.25) !important;
}

.src-perm-dropdown:focus,
select.src-perm-dropdown:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.35) !important;
}

.src-perm-dropdown option,
select.src-perm-dropdown option {
  background-color: #140d24 !important;
  color: #ffffff !important;
  padding: 10px 14px !important;
  font-weight: 500 !important;
  font-size: 13px !important;
}

body.light-mode .src-perm-dropdown,
body.light-mode select.src-perm-dropdown {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237c3aed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
  border: 1.5px solid rgba(124, 58, 237, 0.35) !important;
  color: #1a102f !important;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.1) !important;
}

body.light-mode .src-perm-dropdown option,
body.light-mode select.src-perm-dropdown option {
  background-color: #ffffff !important;
  color: #1a102f !important;
}

/* Fallback Notice Banner */
.src-fallback-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}

.src-fallback-banner b {
  color: #fef08a;
}

body.light-mode .src-fallback-banner {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(217, 119, 6, 0.4);
  color: #b45309;
}

body.light-mode .src-fallback-banner b {
  color: #78350f;
}

.src-fallback-ico {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Source Preferences Dialog Flow Steps */
.src-flow-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(179, 136, 255, 0.15);
}

body.light-mode .src-flow-steps {
  background: rgba(147, 51, 234, 0.04);
  border-color: rgba(147, 51, 234, 0.15);
}

.src-flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--t);
  line-height: 1.4;
}

.src-flow-step b {
  color: var(--w);
}

.src-flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(179, 136, 255, 0.2);
  color: #d1b3ff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

body.light-mode .src-flow-num {
  background: rgba(147, 51, 234, 0.15);
  color: #7e22ce;
}

/* Category Cards Grid in Source Preferences Modal (Replaces horizontal slider) */
.src-cat-grid,
.src-cat-nav {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 8px !important;
  padding: 0 !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid rgba(179, 136, 255, 0.18) !important;
  padding-bottom: 14px !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

.src-cat-grid::-webkit-scrollbar,
.src-cat-nav::-webkit-scrollbar {
  display: none !important;
}

@media (max-width: 580px) {
  .src-cat-grid,
  .src-cat-nav {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 380px) {
  .src-cat-grid,
  .src-cat-nav {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.src-cat-card,
.src-cat-pill {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 8px 6px 7px !important;
  border-radius: 12px !important;
  background: rgba(22, 16, 42, 0.7) !important;
  border: 1px solid rgba(179, 136, 255, 0.22) !important;
  color: rgba(230, 215, 255, 0.9) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  min-height: 64px !important;
  gap: 3px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.src-cat-card:hover,
.src-cat-pill:hover {
  background: rgba(179, 136, 255, 0.2) !important;
  border-color: #b388ff !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.28) !important;
}

.src-cat-card.active,
.src-cat-pill.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(124, 58, 237, 0.55)) !important;
  border-color: #c084fc !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) !important;
}

.src-cat-card.active::before,
.src-cat-pill.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #b388ff, #f472b6);
}

.src-card-ico {
  font-size: 19px !important;
  line-height: 1 !important;
  display: inline-block !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.src-cat-card:hover .src-card-ico,
.src-cat-card.active .src-card-ico,
.src-cat-pill:hover .src-card-ico,
.src-cat-pill.active .src-card-ico {
  transform: scale(1.15) !important;
}

.src-card-name {
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: inherit !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.src-card-badge {
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #c084fc !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  background: rgba(168, 85, 247, 0.16) !important;
  border: 1px solid rgba(192, 132, 252, 0.25) !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  max-width: 90% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 1px !important;
}

.src-cat-card.active .src-card-badge,
.src-cat-pill.active .src-card-badge {
  color: #f3e8ff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Light mode styling */
body.light-mode .src-cat-card,
body.light-mode .src-cat-pill {
  background: rgba(245, 240, 255, 0.88) !important;
  border-color: rgba(147, 51, 234, 0.22) !important;
  color: #3b0764 !important;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.08) !important;
}

body.light-mode .src-cat-card:hover,
body.light-mode .src-cat-pill:hover {
  background: rgba(237, 225, 255, 0.98) !important;
  border-color: #9333ea !important;
  color: #180c2e !important;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.2) !important;
}

body.light-mode .src-cat-card.active,
body.light-mode .src-cat-pill.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.18), rgba(192, 132, 252, 0.35)) !important;
  border-color: #7e22ce !important;
  color: #180c2e !important;
  box-shadow: none !important;
}

body.light-mode .src-card-badge {
  color: #6b21a8 !important;
  background: rgba(147, 51, 234, 0.1) !important;
  border-color: rgba(147, 51, 234, 0.22) !important;
}

body.light-mode .src-cat-card.active .src-card-badge,
body.light-mode .src-cat-pill.active .src-card-badge {
  color: #3b0764 !important;
  background: rgba(147, 51, 234, 0.18) !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
}

.src-cat-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.src-cat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.src-cat-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--w);
}

.src-cat-panel-desc {
  font-size: 12px;
  color: rgba(220, 205, 245, 0.7);
  line-height: 1.4;
}

body.light-mode .src-cat-panel-desc {
  color: #634a85;
}

.src-cat-manage-link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--b2);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
}

.src-cat-manage-link:hover {
  color: #ffffff;
}

body.light-mode .src-cat-manage-link:hover {
  color: #7e22ce;
}

.src-perm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t);
  cursor: pointer;
  margin-top: 2px;
  line-height: 1.4;
}

.src-perm-check input {
  accent-color: #a855f7;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-change-source {
  background: transparent;
  border: 1px dashed rgba(179, 136, 255, 0.35);
  color: var(--b2);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 6px;
}

.btn-change-source:hover {
  background: rgba(179, 136, 255, 0.15);
  border-color: #c084fc;
  color: #fff;
}

.rw-source-badge {
  padding: 2px 7px !important;
  font-size: 11px !important;
  margin-left: 6px;
  border-radius: 6px !important;
}

.source-link .ext-icon {
  font-size: 11.5px;
  font-weight: 800;
  opacity: 0.9;
  transform: translateY(-0.5px);
}

/* ========================================================
   RESOURCE DETAIL DASHBOARD MODAL
   ======================================================== */
.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 100200 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.dash-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 5, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.light-mode .dash-backdrop {
  background: rgba(230, 220, 245, 0.62);
}

.dash-window {
  position: relative;
  z-index: 2;
  width: min(94vw, 1080px);
  height: min(90vh, 880px);
  display: flex;
  flex-direction: column;
  background: rgba(20, 15, 34, 0.94);
  border: 1px solid rgba(179, 136, 255, 0.3);
  border-radius: 22px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: scale(0.95) translateY(14px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-modal.open .dash-window {
  transform: scale(1) translateY(0);
}

body.light-mode .dash-window {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(147, 51, 234, 0.25);
  box-shadow:
    0 24px 60px rgba(120, 80, 160, 0.22);
  color: #1a0f2e;
}

/* Dashboard Header */
.dash-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.18);
  background: rgba(14, 10, 24, 0.6);
  flex-shrink: 0;
}

body.light-mode .dash-header {
  background: rgba(245, 240, 255, 0.7);
  border-bottom-color: rgba(147, 51, 234, 0.15);
}

.dash-icon {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(179, 136, 255, 0.1);
  border: 1px solid rgba(179, 136, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--b);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dash-title-wrap {
  flex: 1;
  min-width: 0;
}

.dash-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.light-mode .dash-title {
  color: #1a0f2e;
}

.dash-title a {
  color: inherit;
  text-decoration: none;
}

.dash-title a:hover {
  color: var(--b);
}

.dash-author {
  font-size: 13.5px;
  color: rgba(232, 224, 245, 0.7);
  margin-top: 3px;
}

body.light-mode .dash-author {
  color: #5a4870;
}

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

.dash-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(179, 136, 255, 0.25);
  background: rgba(179, 136, 255, 0.08);
  color: var(--t);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dash-close:hover {
  background: rgba(255, 80, 120, 0.25);
  border-color: #ff5078;
  color: #ffffff;
  transform: rotate(90deg);
}

body.light-mode .dash-close {
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.2);
  color: #1a0f2e;
}

/* Metrics Bar */
.dash-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(28, 20, 48, 0.4);
  border-bottom: 1px solid rgba(179, 136, 255, 0.12);
  flex-wrap: wrap;
  flex-shrink: 0;
}

body.light-mode .dash-metrics {
  background: rgba(240, 232, 252, 0.5);
  border-bottom-color: rgba(147, 51, 234, 0.1);
}

.dash-metric-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(232, 224, 245, 0.85);
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(179, 136, 255, 0.08);
}

body.light-mode .dash-metric-item {
  color: #3b2854;
  background: rgba(147, 51, 234, 0.08);
}

/* Navigation Tabs */
.dash-nav {
  display: flex;
  gap: 4px;
  padding: 8px 24px;
  background: rgba(18, 13, 30, 0.7);
  border-bottom: 1px solid rgba(179, 136, 255, 0.15);
  flex-shrink: 0;
  overflow-x: auto;
}

body.light-mode .dash-nav {
  background: rgba(248, 244, 255, 0.85);
  border-bottom-color: rgba(147, 51, 234, 0.15);
}

.dash-tab {
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: rgba(232, 224, 245, 0.75);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border-radius: 99px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dash-tab:hover {
  color: #ffffff;
  background: rgba(179, 136, 255, 0.12);
}

.dash-tab.active {
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.28), rgba(124, 77, 255, 0.38));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px #b388ff;
}

body.light-mode .dash-tab {
  color: #5a4870;
}

body.light-mode .dash-tab:hover {
  color: #1a0f2e;
  background: rgba(147, 51, 234, 0.1);
}

body.light-mode .dash-tab.active {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}

/* Content Area */
.dash-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  color: var(--t);
  font-size: 14.5px;
  line-height: 1.65;
}

.dash-content::-webkit-scrollbar {
  width: 7px;
}

.dash-content::-webkit-scrollbar-thumb {
  background: rgba(179, 136, 255, 0.3);
  border-radius: 99px;
}

body.light-mode .dash-content::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.3);
}

/* Documentation / Readme view */
.dash-readme {
  max-width: 900px;
  margin: 0 auto;
}

.dash-readme h1,
.dash-readme h2,
.dash-readme h3,
.dash-readme h4 {
  color: #ffffff;
  margin: 24px 0 12px;
  font-weight: 800;
  border-bottom: 1px solid rgba(179, 136, 255, 0.15);
  padding-bottom: 6px;
}

body.light-mode .dash-readme h1,
body.light-mode .dash-readme h2,
body.light-mode .dash-readme h3,
body.light-mode .dash-readme h4 {
  color: #1a0f2e;
  border-bottom-color: rgba(147, 51, 234, 0.15);
}

.dash-readme p {
  margin: 12px 0;
}

.dash-readme a {
  color: var(--b);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dash-readme a:hover {
  color: #d1b3ff;
}

.dash-readme img {
  max-width: 100%;
  border-radius: 12px;
  margin: 12px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.dash-readme pre {
  background: rgba(10, 7, 18, 0.85);
  border: 1px solid rgba(179, 136, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 13.5px;
  color: #e0d0f5;
}

body.light-mode .dash-readme pre {
  background: rgba(240, 235, 250, 0.9);
  border-color: rgba(147, 51, 234, 0.2);
  color: #2e174d;
}

.dash-readme code {
  background: rgba(179, 136, 255, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  color: #e8dbff;
}

body.light-mode .dash-readme code {
  background: rgba(147, 51, 234, 0.12);
  color: #581c87;
}

.dash-readme blockquote {
  border-left: 4px solid var(--b);
  background: rgba(179, 136, 255, 0.08);
  margin: 14px 0;
  padding: 8px 16px;
  border-radius: 0 8px 8px 0;
}

.dash-readme table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.dash-readme th,
.dash-readme td {
  border: 1px solid rgba(179, 136, 255, 0.2);
  padding: 8px 12px;
  text-align: left;
}

.dash-readme th {
  background: rgba(179, 136, 255, 0.12);
  color: #ffffff;
}

body.light-mode .dash-readme th {
  background: rgba(147, 51, 234, 0.1);
  color: #1a0f2e;
}

/* Versions & Single Download View */
.dash-versions-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-versions-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.15);
  position: relative;
  z-index: 10;
}

.dash-version-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(28, 21, 46, 0.55);
  border: 1px solid rgba(179, 136, 255, 0.18);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-version-card:hover {
  background: rgba(35, 26, 58, 0.8);
  border-color: rgba(179, 136, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.light-mode .dash-version-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(147, 51, 234, 0.18);
}

body.light-mode .dash-version-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #9333ea;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.15);
}

.dash-version-info {
  flex: 1;
  min-width: 0;
}

.dash-version-title {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.light-mode .dash-version-title {
  color: #1a0f2e;
}

.release-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.release-badge.release {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #00e676;
}

.release-badge.beta {
  background: rgba(255, 171, 0, 0.15);
  border: 1px solid rgba(255, 171, 0, 0.4);
  color: #ffab00;
}

.release-badge.alpha {
  background: rgba(255, 64, 129, 0.15);
  border: 1px solid rgba(255, 64, 129, 0.4);
  color: #ff4081;
}

.dash-version-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(232, 224, 245, 0.7);
  margin-top: 4px;
  flex-wrap: wrap;
}

body.light-mode .dash-version-meta {
  color: #5a4870;
}

.btn-single-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--b2), var(--b));
  color: #ffffff;
  border: 0;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-single-dl:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 136, 255, 0.5);
  filter: brightness(1.1);
}

/* Gallery View */
.dash-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dash-gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 14, 32, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}

.dash-gallery-card:hover {
  transform: translateY(-3px);
  border-color: #b388ff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dash-gallery-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.dash-gallery-card:hover img {
  transform: scale(1.04);
}

.dash-gallery-title {
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(14, 10, 24, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-mode .dash-gallery-title {
  background: rgba(255, 255, 255, 0.9);
  color: #1a0f2e;
}

/* Lightbox Modal */
.dash-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100300 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.dash-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.dash-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 10, 0.88);
  backdrop-filter: blur(12px);
}

.dash-lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dash-lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(179, 136, 255, 0.3);
}

.dash-lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(20, 15, 35, 0.7);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-lightbox-caption {
  margin-top: 10px;
  color: #e8e0f5;
  font-size: 14px;
  text-align: center;
}

/* External Links Grid */
.dash-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.dash-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(28, 20, 48, 0.55);
  border: 1px solid rgba(179, 136, 255, 0.2);
  text-decoration: none;
  color: #ffffff;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-link-card:hover {
  background: rgba(40, 28, 68, 0.8);
  border-color: #b388ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.light-mode .dash-link-card {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(147, 51, 234, 0.2);
  color: #1a0f2e;
}

body.light-mode .dash-link-card:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: #9333ea;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.18);
}

.dash-link-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(179, 136, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.light-mode .dash-link-icon {
  background: rgba(147, 51, 234, 0.1);
}

.dash-link-title {
  font-weight: 700;
  font-size: 15px;
}

.dash-link-sub {
  font-size: 12px;
  color: rgba(232, 224, 245, 0.65);
  margin-top: 2px;
}

body.light-mode .dash-link-sub {
  color: #6a5585;
}


/* ========================================================
   DEPENDENCIES RESOLUTION MODAL DIALOG (CYBER-GLASS)
   ======================================================== */
.dep-modal {
  position: fixed;
  inset: 0;
  z-index: 100400 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.dep-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.dep-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dep-window {
  position: relative;
  z-index: 2;
  width: min(540px, 94vw);
  background: rgba(16, 11, 28, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(179, 136, 255, 0.35) !important;
  border-radius: 22px !important;
  padding: 24px !important;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px rgba(255, 255, 255, 0.22) !important;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dep-modal.open .dep-window {
  transform: translateY(0) scale(1);
}

body.light-mode .dep-window {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
  box-shadow:
    0 25px 70px rgba(120, 80, 160, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
}

.dep-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.dep-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.3), rgba(124, 77, 255, 0.45));
  border: 1px solid rgba(179, 136, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: none;
}

.dep-header-text {
  flex: 1;
}

.dep-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

body.light-mode .dep-title {
  color: #1f1035;
}

.dep-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(232, 224, 245, 0.7);
  line-height: 1.45;
}

body.light-mode .dep-sub {
  color: #624b7e;
}

.dep-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: rgba(24, 18, 42, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(179, 136, 255, 0.18);
}

body.light-mode .dep-body {
  background: rgba(245, 240, 255, 0.6);
  border-color: rgba(147, 51, 234, 0.15);
}

.dep-checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 22, 54, 0.55);
  border: 1px solid rgba(179, 136, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.dep-checkbox-item:hover {
  background: rgba(179, 136, 255, 0.15);
  border-color: rgba(179, 136, 255, 0.4);
}

.dep-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #b388ff;
  cursor: pointer;
}

.dep-cb-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--t);
  flex: 1;
}

.dep-cb-count {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(179, 136, 255, 0.2);
  color: #d1b3ff;
}

.dep-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* ========================================================
   CART DRAWER ZIP NAME BOX & CATEGORY GROUPS
   ======================================================== */
.dr-zip-box {
  padding: 12px 20px;
  border-top: 1px solid rgba(179, 136, 255, 0.18);
  background: rgba(20, 14, 36, 0.65);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

body.light-mode .dr-zip-box {
  background: rgba(245, 240, 255, 0.7);
  border-top-color: rgba(147, 51, 234, 0.15);
}

.dr-zip-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 224, 245, 0.75);
}

body.light-mode .dr-zip-label {
  color: #654d82;
}

.dr-zip-input-wrap {
  position: relative;
}

.dr-zip-input {
  width: 100%;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: monospace, var(--font) !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  background: rgba(14, 9, 24, 0.8) !important;
  border: 1px solid rgba(179, 136, 255, 0.3) !important;
  color: #ffffff !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

body.light-mode .dr-zip-input {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(147, 51, 234, 0.3) !important;
  color: #1f1035 !important;
}

.dr-zip-input:focus {
  border-color: #b388ff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Cart Category Section */
.cart-cat-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.cart-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 6px 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.14);
}

.cart-cat-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
}

.cart-cat-count {
  font-size: 11px;
  font-weight: 700;
  color: rgba(232, 224, 245, 0.6);
}

/* Category Badge Colors */
.cat-mods, .cart-cat-badge.mods {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #7dd3fc !important;
  box-shadow: none !important;
}

.cat-plugins, .cart-cat-badge.plugins {
  background: rgba(168, 85, 247, 0.18) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #d8b4fe !important;
  box-shadow: none !important;
}

.cat-resourcepacks, .cart-cat-badge.resourcepacks {
  background: rgba(52, 211, 153, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #6ee7b7 !important;
  box-shadow: none !important;
}

.cat-shaders, .cart-cat-badge.shaders {
  background: rgba(251, 146, 60, 0.16) !important;
  border-color: rgba(251, 146, 60, 0.45) !important;
  color: #fdba74 !important;
  box-shadow: none !important;
}

.cat-datapacks, .cart-cat-badge.datapacks {
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  color: #fda4af !important;
  box-shadow: none !important;
}

.cat-modpacks, .cart-cat-badge.modpacks {
  background: rgba(217, 70, 239, 0.16) !important;
  border-color: rgba(217, 70, 239, 0.45) !important;
  color: #f0abfc !important;
  box-shadow: none !important;
}

.cat-worlds, .cart-cat-badge.worlds {
  background: rgba(234, 179, 8, 0.16) !important;
  border-color: rgba(234, 179, 8, 0.45) !important;
  color: #fde047 !important;
  box-shadow: none !important;
}

.cat-serversoftwares, .cart-cat-badge.serversoftwares {
  background: rgba(14, 165, 233, 0.18) !important;
  border-color: rgba(14, 165, 233, 0.5) !important;
  color: #38bdf8 !important;
  box-shadow: none !important;
}

.cat-modloaders, .cart-cat-badge.modloaders {
  background: rgba(249, 115, 22, 0.18) !important;
  border-color: rgba(249, 115, 22, 0.5) !important;
  color: #fb923c !important;
  box-shadow: none !important;
}

.cat-dependencies, .cart-cat-badge.dependencies {
  background: rgba(236, 72, 153, 0.22) !important;
  border-color: rgba(236, 72, 153, 0.6) !important;
  color: #f472b6 !important;
  box-shadow: none !important;
}

/* Card Category Pill */
.card-cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  width: fit-content;
}

.card-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.rw-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.rw-cat-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
}

.rw-parent {
  font-size: 11px;
  color: rgba(236, 72, 153, 0.85);
  font-weight: 600;
}

/* ========================================================
   HOME CATEGORY PORTAL & SHOWCASE GRID
   ======================================================== */
.home-portal-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

.home-hero {
  background: linear-gradient(135deg, rgba(22, 17, 42, 0.78), rgba(45, 20, 80, 0.5));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(179, 136, 255, 0.28);
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.light-mode .home-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 232, 255, 0.85));
  border-color: rgba(147, 51, 234, 0.25);
  box-shadow: 0 16px 40px rgba(147, 51, 234, 0.15);
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 5px 14px;
  border-radius: 99px;
}

body.light-mode .home-hero-badge {
  color: #9333ea;
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.3);
}

.home-hero-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

body.light-mode .home-hero-title {
  color: #180c2e;
}

.home-hero-desc {
  font-size: 15px;
  color: rgba(225, 210, 250, 0.85);
  max-width: 900px;
  line-height: 1.6;
  margin: 0;
}

body.light-mode .home-hero-desc {
  color: #4b3869;
}

.home-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.home-stat-chip {
  padding: 7px 15px;
  border-radius: 99px;
  background: rgba(12, 9, 21, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.2);
  font-size: 12.5px;
  color: var(--w);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.light-mode .home-stat-chip {
  background: #ffffff;
  border-color: rgba(147, 51, 234, 0.25);
  color: #180c2e;
}

.home-stat-chip b {
  color: var(--b2);
}

.home-section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-section-head h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--w);
  letter-spacing: -0.01em;
  margin: 0;
}

.home-section-head span {
  font-size: 14px;
  color: rgba(220, 205, 245, 0.75);
}

body.light-mode .home-section-head span {
  color: #624b80;
}

.home-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.home-cat-card {
  background: rgba(22, 17, 38, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(179, 136, 255, 0.22);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

body.light-mode .home-cat-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(147, 51, 234, 0.2);
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.08);
}

.home-cat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.65);
  box-shadow:
    0 16px 40px rgba(147, 51, 234, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

body.light-mode .home-cat-card:hover {
  border-color: #9333ea;
  box-shadow: 0 16px 36px rgba(147, 51, 234, 0.18);
}

.home-cat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-cat-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.4));
}

.home-cat-count {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--b2);
  background: rgba(168, 85, 247, 0.14);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

body.light-mode .home-cat-count {
  color: #7e22ce;
  background: rgba(147, 51, 234, 0.1);
  border-color: rgba(147, 51, 234, 0.25);
}

.home-cat-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--w);
  letter-spacing: -0.01em;
  margin: 0;
}

.home-cat-desc {
  font-size: 13.5px;
  color: rgba(225, 215, 245, 0.8);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

body.light-mode .home-cat-desc {
  color: #554170;
}

.home-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.home-chip-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(216, 180, 254, 0.85);
  margin-right: 2px;
}

body.light-mode .home-chip-label {
  color: #7e22ce;
}

.home-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(179, 136, 255, 0.1);
  border: 1px solid rgba(179, 136, 255, 0.2);
  color: rgba(235, 225, 250, 0.9);
}

body.light-mode .home-chip {
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.2);
  color: #4c1d95;
}

.home-chip.more {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
}

.home-cat-footer {
  margin-top: 4px;
}

.home-cat-btn {
  width: 100%;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  padding: 10px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s !important;
}

.home-cat-btn .arr {
  transition: transform 0.25s;
}

.home-cat-card:hover .home-cat-btn .arr {
  transform: translateX(4px);
}

/* ========================================================
   LAUNCHERS CATEGORY BADGES & SUB-CATEGORY STYLING
   ======================================================== */
.card-cat-badge.cat-launchers {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

body.light-mode .card-cat-badge.cat-launchers {
  background: rgba(2, 132, 199, 0.12) !important;
  border-color: rgba(2, 132, 199, 0.4) !important;
  color: #0284c7 !important;
}

.card-cat-badge.launcher-type.premium {
  background: rgba(168, 85, 247, 0.18) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  color: #c084fc !important;
}

body.light-mode .card-cat-badge.launcher-type.premium {
  background: rgba(147, 51, 234, 0.14) !important;
  border-color: rgba(147, 51, 234, 0.4) !important;
  color: #7e22ce !important;
}

.card-cat-badge.launcher-type.cracked {
  background: rgba(234, 179, 8, 0.18) !important;
  border-color: rgba(234, 179, 8, 0.45) !important;
  color: #facc15 !important;
}

body.light-mode .card-cat-badge.launcher-type.cracked {
  background: rgba(202, 138, 4, 0.14) !important;
  border-color: rgba(202, 138, 4, 0.4) !important;
  color: #a16207 !important;
}

/* ========================================================
   AIRTIGHT FIX FOR DROPDOWN OPACITY & STACKING
   ======================================================== */
.glass-select-wrap.open,
.glass-select-wrap:has(.glass-select-menu.open) {
  z-index: 1000 !important;
  position: relative !important;
}

.glass-select-menu {
  background: #110c22 !important;
  background-color: #110c22 !important;
  backdrop-filter: blur(40px) saturate(220%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(220%) !important;
  border: 1px solid rgba(179, 136, 255, 0.45) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.98) !important;
  z-index: 10000 !important;
  opacity: 1 !important;
  max-height: 220px !important;
}

body.light-mode .glass-select-menu {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: rgba(147, 51, 234, 0.45) !important;
  box-shadow: 0 20px 48px rgba(147, 51, 234, 0.22) !important;
}

/* ========================================================
   AIRTIGHT FIX FOR DOUBLE LOADING SPINNERS (IMAGE 2 FIX)
   ======================================================== */
#mo-wrap:has(.auto-loader:not([style*="display: none"])) #mo,
.auto-loader:not([style*="display: none"]) ~ #mo {
  display: none !important;
}

body[data-tab="home"] #mo-wrap,
body[data-tab="launchers"] #mo-wrap,
body[data-tab="home"] #auto-loader,
body[data-tab="launchers"] #auto-loader,
body[data-tab="home"] #mo,
body[data-tab="launchers"] #mo {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* ========================================================
   HOME TAB CUSTOM LAYOUT: NO SEARCH BAR, 2-COL HERO, 3-COL GRID
   ======================================================== */
body[data-tab="home"] .fl,
body[data-tab="home"] #fbar,
body[data-tab="home"] .search-bar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

body[data-tab="home"] .gr,
body[data-tab="studio"] .gr,
.gr:has(.studio-container),
.gr.studio-mode,
.gr:has(.home-portal-container) {
  display: block !important;
  width: 100% !important;
}

.home-portal-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 36px !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
}

.home-hero-row {
  display: grid !important;
  grid-template-columns: 1.25fr 1fr !important;
  gap: 24px !important;
  width: 100% !important;
  align-items: stretch !important;
}

@media (max-width: 960px) {
  .home-hero-row {
    grid-template-columns: 1fr !important;
  }
}

.home-hero {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Advertise Yourself Promotional Card */
.home-ad-card {
  background: linear-gradient(135deg, rgba(34, 22, 56, 0.8), rgba(52, 22, 75, 0.65));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(234, 179, 8, 0.45);
  border-radius: 24px;
  padding: 34px 36px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.home-ad-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.home-ad-card:hover {
  transform: translateY(-2px);
  border-color: rgba(250, 204, 21, 0.85);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

body.light-mode .home-ad-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 199, 0.85));
  border-color: rgba(217, 119, 6, 0.4);
  box-shadow: 0 16px 40px rgba(217, 119, 6, 0.12);
}

body.light-mode .home-ad-card:hover {
  border-color: #d97706;
  box-shadow: 0 20px 48px rgba(217, 119, 6, 0.22);
}

.home-ad-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-ad-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #facc15;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 5px 14px;
  border-radius: 99px;
}

body.light-mode .home-ad-badge {
  color: #b45309;
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
}

.home-ad-price-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  padding: 5px 12px;
  border-radius: 99px;
  box-shadow: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.light-mode .home-ad-price-pill {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: none;
  text-shadow: none;
}

.home-ad-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

body.light-mode .home-ad-title {
  color: #180c2e;
}

.home-ad-desc {
  font-size: 14px;
  color: rgba(235, 225, 250, 0.88);
  line-height: 1.55;
  margin: 0;
}

body.light-mode .home-ad-desc {
  color: #4b3869;
}

.home-ad-perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.home-ad-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 235, 255, 0.95);
}

body.light-mode .home-ad-perk {
  color: #2e1065;
}

.home-ad-perk span {
  color: #facc15;
}

body.light-mode .home-ad-perk span {
  color: #d97706;
}

.home-ad-price-perk {
  color: #fde047 !important;
  font-weight: 700 !important;
}

body.light-mode .home-ad-price-perk {
  color: #b45309 !important;
}

.home-ad-footer {
  margin-top: 6px;
}

.home-ad-btn {
  width: 100%;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(124, 77, 255, 0.45) !important;
  transition: all 0.25s !important;
}

.home-ad-btn:hover {
  background: linear-gradient(135deg, #c084fc, #9333ea) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.6) !important;
}

/* Fix Cards placement: exactly 3 in one row */
.home-portal-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
}

@media (max-width: 1140px) {
  .home-portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .home-portal-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================================
   SEAMLESS SINGLE-ROW NAVIGATION BAR (NO AWKWARD WRAPPING)
   ======================================================== */
.tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 6px 10px !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

.tabs::-webkit-scrollbar {
  display: none !important;
}

.tb {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  padding: 8px 16px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
}

/* ========================================================
   CYBER-GLASS THEME TOGGLE BUTTON (#mt)
   ======================================================== */
.theme-toggle-btn,
#mt {
  position: relative !important;
  width: 44px !important;
  height: 38px !important;
  min-width: 44px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  background: linear-gradient(135deg, rgba(34, 22, 58, 0.8), rgba(20, 14, 38, 0.85)) !important;
  border: 1.5px solid rgba(179, 136, 255, 0.38) !important;
  backdrop-filter: blur(18px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(190%) !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

#mt:hover {
  border-color: rgba(179, 136, 255, 0.85) !important;
  transform: translateY(-1.5px) scale(1.06) !important;
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
}

#mt:active {
  transform: scale(0.92) !important;
  transition-duration: 0.12s !important;
}

body.light-mode #mt {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 199, 0.85)) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow:
    0 4px 14px rgba(245, 158, 11, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.85) !important;
}

body.light-mode #mt:hover {
  border-color: #f59e0b !important;
  transform: translateY(-1.5px) scale(1.06) !important;
  box-shadow:
    0 6px 20px rgba(245, 158, 11, 0.32),
    inset 0 1px 1px #ffffff !important;
}

.theme-icon-stage {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.theme-svg {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease !important;
}

/* Default / Dark Mode: Show Moon, Hide Sun */
body:not(.light-mode) .theme-svg-moon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
  /* drop-shadow glow removed */
}

body:not(.light-mode) #mt:hover .theme-svg-moon {
  transform: rotate(14deg) scale(1.08);
  /* drop-shadow glow removed */
}

body:not(.light-mode) .theme-svg-sun {
  transform: rotate(90deg) scale(0.2);
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
}

/* Light Mode: Show Sun, Hide Moon */
body.light-mode .theme-svg-moon {
  transform: rotate(-90deg) scale(0.2);
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
}

body.light-mode .theme-svg-sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
  /* drop-shadow glow removed */
}

body.light-mode #mt:hover .theme-svg-sun {
  transform: rotate(45deg) scale(1.08);
  /* drop-shadow glow removed */
}

/* ========================================================
   RE-ALIGNED 6-TAB NAVIGATION & CYBER SUB-TABS
   ======================================================== */
.tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  padding: 6px 12px !important;
  gap: 6px !important;
  white-space: nowrap !important;
  position: relative !important;
  z-index: 60 !important;
}

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

.tb-arr {
  font-size: 11px;
  margin-left: 6px;
  opacity: 0.75;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-block;
  pointer-events: none;
}

.tb-wrapper:hover .tb-arr,
.tb-wrapper:focus-within .tb-arr,
.tb-wrapper.hover-open .tb-arr {
  opacity: 1;
  transform: rotate(180deg);
}

.tb-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 190px;
  background: rgba(22, 16, 38, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid rgba(179, 136, 255, 0.38) !important;
  border-radius: 16px !important;
  padding: 8px !important;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  display: none !important;
  flex-direction: column;
  gap: 4px;
  z-index: 9999 !important;

  /* Fast, responsive reveal without lingering delay */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.97);
  transition: opacity 0.14s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.14s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.14s;
}

/* Vertical Hover Bridge: strictly covers the 4px vertical gap between button and dropdown */
.tb-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

/* Show only when hover-open is active on this specific wrapper */
.tb-wrapper.hover-open .tb-dropdown {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.tb-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(235, 224, 250, 0.88);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}

.tb-dropdown-item:hover {
  color: #ffffff;
  background: rgba(179, 136, 255, 0.2);
  border-color: rgba(179, 136, 255, 0.4);
  transform: translateX(3px);
}

.tb-dropdown-item.on {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.3), rgba(124, 77, 255, 0.45));
  border-color: rgba(179, 136, 255, 0.6);
  box-shadow: none;
}

body.light-mode .tb-dropdown {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
  box-shadow: 0 16px 40px rgba(147, 51, 234, 0.18) !important;
}

body.light-mode .tb-dropdown-item {
  color: #2e1065;
}

body.light-mode .tb-dropdown-item:hover {
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.3);
  color: #180c2e;
}

body.light-mode .tb-dropdown-item.on {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(192, 132, 252, 0.35));
  border-color: rgba(147, 51, 234, 0.5);
  color: #180c2e;
}

/* Secondary Subtabs Pill Bar */
.subtabs-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 20px 0;
  padding: 6px 14px;
  background: rgba(26, 18, 44, 0.55);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(179, 136, 255, 0.22);
  border-radius: 99px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  animation: fadeInSubtabs 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.subtabs-bar::-webkit-scrollbar {
  display: none;
}

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

.subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(235, 224, 250, 0.78);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.subtab-btn:hover {
  color: #ffffff;
  background: rgba(179, 136, 255, 0.14);
  border-color: rgba(179, 136, 255, 0.3);
  transform: translateY(-1px);
}

.subtab-btn.on {
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.3), rgba(124, 77, 255, 0.45));
  border-color: rgba(179, 136, 255, 0.65);
  color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

body.light-mode .subtabs-bar {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(147, 51, 234, 0.25);
  box-shadow: 0 4px 18px rgba(147, 51, 234, 0.1);
}

body.light-mode .subtab-btn {
  color: #4b3869;
}

body.light-mode .subtab-btn:hover {
  background: rgba(147, 51, 234, 0.12);
  color: #180c2e;
}

body.light-mode .subtab-btn.on {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.22), rgba(192, 132, 252, 0.38));
  border-color: rgba(147, 51, 234, 0.55);
  color: #180c2e;
}

/* ========================================================
   CRAFTINDEX SETTINGS CENTER (Cyber-Glass Edition)
   ======================================================== */
.mx.settings-mode {
  width: min(750px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.mx.settings-mode .mbd {
  padding: 16px 22px 28px !important;
  gap: 12px !important;
  max-height: calc(88vh - 120px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mx.settings-mode .settings-nav {
  margin-bottom: 10px !important;
}

.mx.settings-mode .settings-section {
  padding: 13px 16px !important;
  gap: 8px !important;
}

.mx.settings-mode .settings-row {
  padding: 6px 0 !important;
}

/* Sources Modal Custom Mode */
.mx.sources-mode {
  width: min(740px, 100%) !important;
  max-height: 92vh !important;
}

.mx.sources-mode .mbd {
  padding: 16px 22px 16px !important;
  gap: 10px !important;
}

.mx.sources-mode .src-dialog-wrap {
  gap: 10px !important;
}

.mx.sources-mode .src-perm-container {
  padding: 12px 16px !important;
  gap: 10px !important;
  margin-top: 0 !important;
}

.mx.sources-mode .src-cat-grid {
  margin-bottom: 8px !important;
  padding-bottom: 8px !important;
}

.mx.sources-mode .src-flow-steps {
  padding: 8px 12px !important;
  margin: 4px 0 0 !important;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.smh-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.smh-icon {
  font-size: 22px;
}

.smh-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--w);
}

.smh-badge {
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.settings-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px !important;
  background: rgba(16, 11, 28, 0.6) !important;
  border: 1px solid rgba(179, 136, 255, 0.2) !important;
  border-radius: 14px !important;
  margin-bottom: 14px !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.settings-nav::-webkit-scrollbar {
  display: none;
}

.settings-nav-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: rgba(230, 215, 255, 0.8) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
  min-width: fit-content !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.settings-nav-btn:hover {
  color: #ffffff;
  background: rgba(179, 136, 255, 0.15);
}

.settings-nav-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(124, 58, 237, 0.5));
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: none;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#settingsContentArea {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.settings-section {
  background: rgba(22, 16, 40, 0.65);
  border: 1px solid rgba(179, 136, 255, 0.22);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.settings-section-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f3e8ff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(179, 136, 255, 0.1);
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0 !important;
  max-width: calc(100% - 60px);
}

.settings-row:not(:has(.settings-switch)) .settings-label-wrap {
  max-width: 100%;
}

.settings-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

.settings-desc {
  font-size: 12px;
  color: #c4b5fd;
  line-height: 1.45;
}

/* Custom Cyber-Glass Select Dropdown */
.settings-select,
select.settings-select,
.settings-row select {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  height: 38px !important;
  padding: 6px 36px 6px 14px !important;
  border-radius: 10px !important;
  background-color: rgba(28, 18, 48, 0.9) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23c084fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  border: 1.5px solid rgba(179, 136, 255, 0.35) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.settings-select:hover,
select.settings-select:hover,
.settings-row select:hover {
  border-color: rgba(192, 132, 252, 0.7) !important;
  background-color: rgba(36, 24, 62, 0.95) !important;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.3) !important;
}

.settings-select:focus,
select.settings-select:focus,
.settings-row select:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4) !important;
}

.settings-select option,
select.settings-select option,
.settings-row select option {
  background-color: #140d24 !important;
  color: #ffffff !important;
  padding: 10px 14px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

body.light-mode .settings-select,
body.light-mode select.settings-select,
body.light-mode .settings-row select {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237c3aed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
  border: 1.5px solid rgba(124, 58, 237, 0.3) !important;
  color: #1a102f !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1) !important;
}

body.light-mode .settings-select:hover,
body.light-mode select.settings-select:hover,
body.light-mode .settings-row select:hover {
  border-color: #9333ea !important;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.2) !important;
}

body.light-mode .settings-select:focus,
body.light-mode select.settings-select:focus,
body.light-mode .settings-row select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.25) !important;
}

body.light-mode .settings-select option,
body.light-mode select.settings-select option,
body.light-mode .settings-row select option {
  background-color: #ffffff !important;
  color: #1a102f !important;
}

/* Custom Toggle Switch */
.settings-switch,
label.settings-switch,
.mbd label.settings-switch,
.settings-row .settings-switch {
  position: relative !important;
  display: inline-block !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  flex: 0 0 44px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  margin: 0 0 0 auto !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  overflow: visible !important;
}

.settings-switch input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

.settings-slider {
  position: absolute !important;
  cursor: pointer !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 44px !important;
  max-width: 44px !important;
  height: 24px !important;
  max-height: 24px !important;
  background-color: rgba(30, 20, 52, 0.85) !important;
  border: 1px solid rgba(179, 136, 255, 0.35) !important;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 99px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.settings-slider:before {
  position: absolute !important;
  content: "" !important;
  height: 16px !important;
  width: 16px !important;
  left: 3px !important;
  top: 3px !important;
  background-color: #e9d5ff !important;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45) !important;
}

.settings-switch input:checked + .settings-slider {
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  border-color: #c084fc !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
}

.settings-switch input:checked + .settings-slider:before {
  transform: translateX(20px) !important;
  background-color: #ffffff !important;
}

body.light-mode .settings-slider {
  background-color: rgba(230, 220, 248, 0.8) !important;
  border-color: rgba(147, 51, 234, 0.3) !important;
  box-shadow: inset 0 1px 3px rgba(120, 80, 160, 0.2) !important;
}

body.light-mode .settings-slider:before {
  background-color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(120, 80, 160, 0.3) !important;
}

body.light-mode .settings-switch input:checked + .settings-slider {
  background: linear-gradient(135deg, #9333ea, #7c3aed) !important;
  border-color: #7c3aed !important;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.35) !important;
}

/* Theme selector cards inside settings */
.settings-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-theme-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 20, 52, 0.6);
  border: 1.5px solid rgba(179, 136, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
}

.settings-theme-card:hover {
  background: rgba(179, 136, 255, 0.2);
  border-color: #b388ff;
  transform: translateY(-2px);
}

.settings-theme-card.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.45));
  border-color: #c084fc;
  box-shadow: none;
}

.stc-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stc-title {
  font-size: 13px;
  font-weight: 700;
}

.stc-sub {
  font-size: 11px;
  color: #c4b5fd;
}

/* Action button row */
.settings-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Light mode support for settings */
body.light-mode .settings-nav {
  background: rgba(245, 240, 255, 0.8);
  border-color: rgba(147, 51, 234, 0.2);
}

body.light-mode .settings-nav-btn {
  color: #4c1d95;
}

body.light-mode .settings-nav-btn:hover {
  background: rgba(147, 51, 234, 0.12);
  color: #1e1b4b;
}

body.light-mode .settings-nav-btn.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(192, 132, 252, 0.35));
  border-color: #7e22ce;
  color: #180c2e;
}

body.light-mode .settings-section {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.2);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.08);
}

body.light-mode .settings-section-title {
  color: #2e1065;
}

body.light-mode .settings-label {
  color: #1e1b4b;
}

body.light-mode .settings-desc {
  color: #6b21a8;
}

body.light-mode .settings-row {
  border-bottom-color: rgba(147, 51, 234, 0.12);
}

body.light-mode .settings-theme-card {
  background: rgba(245, 240, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.2);
  color: #2e1065;
}

body.light-mode .settings-theme-card:hover {
  background: rgba(237, 225, 255, 0.98);
  border-color: #9333ea;
}

body.light-mode .settings-theme-card.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.18), rgba(192, 132, 252, 0.3));
  border-color: #7e22ce;
}

body.light-mode .stc-icon {
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.16);
}

body.light-mode .stc-sub {
  color: #6b21a8;
}

/* ========================================================
   PRESETS COMING SOON BANNER
   ======================================================== */
.presets-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 24px 38px;
  gap: 16px;
  background: rgba(22, 16, 40, 0.55);
  border: 1px solid rgba(179, 136, 255, 0.22);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  margin: 4px 0;
}

.presets-coming-soon::before {
  content: "";
  position: absolute;
  top: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(28px);
}

.pcs-icon-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(124, 58, 237, 0.38));
  border: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: none;
  margin-bottom: 4px;
}

.pcs-icon {
  font-size: 38px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.pcs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.35);
  padding: 4px 14px;
  border-radius: 99px;
}

.pcs-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 10%, #d8b4fe 55%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  margin: 0;
}

.pcs-desc {
  max-width: 440px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #c4b5fd;
  margin: 0;
}

/* Light mode support */
body.light-mode .presets-coming-soon {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.22);
  box-shadow: 0 8px 32px rgba(147, 51, 234, 0.1);
}

body.light-mode .presets-coming-soon::before {
  background: radial-gradient(circle, rgba(147, 51, 234, 0.18) 0%, transparent 70%);
}

body.light-mode .pcs-icon-wrap {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(192, 132, 252, 0.25));
  border-color: rgba(147, 51, 234, 0.35);
  box-shadow: none;
}

body.light-mode .pcs-badge {
  color: #7e22ce;
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.3);
}

body.light-mode .pcs-title {
  background: linear-gradient(135deg, #2e1065 15%, #7e22ce 60%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .pcs-desc {
  color: #581c87;
}

/* ========================================================
   CRAFTINDEX UNIVERSAL RESPONSIVE, ACCESSIBILITY & POLISH
   ======================================================== */

/* 1. Global Keyboard Focus Indicators (WCAG 2.2 AA) */
:focus-visible {
  outline: 2px solid var(--b, #b388ff) !important;
  outline-offset: 2px !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #b388ff !important;
  outline-offset: 2px !important;
}

body.light-mode :focus-visible,
body.light-mode button:focus-visible,
body.light-mode input:focus-visible,
body.light-mode select:focus-visible,
body.light-mode a:focus-visible {
  outline: 2px solid #7c4dff !important;
  outline-offset: 2px !important;
}

/* 2. Reduced Motion Support (WCAG 2.2 AA) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bg-video {
    display: none !important;
  }
  .bg-overlay {
    background: var(--bg, #0c0915) !important;
  }
  .cyber-spinner {
    animation: none !important;
  }
  .cd:hover,
  .btn:hover,
  .dr-tool-btn:hover {
    transform: none !important;
  }
}

/* 3. Base Container & Viewport Overflow Safety */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* 4. Logo Sizing & Aspect Ratio Stability */
.lg img {
  width: 36px !important;
  height: 36px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

/* 5. Mobile & Small Screen Responsive Refinements (<= 768px) */
@media (max-width: 768px) {
  .tabs {
    overflow-x: auto !important;
    max-width: 100% !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  header {
    padding: 10px 18px !important;
    gap: 10px !important;
  }

  main {
    padding: 18px 16px 120px !important;
  }

  .btn,
  .dr-tool-btn,
  .dr-close,
  .theme-toggle-btn,
  #mt {
    min-height: 42px;
  }

  .dr-tool-btn {
    min-width: 42px;
  }
}

/* 6. Phone Screen Refinements (<= 600px) */
@media (max-width: 600px) {
  header {
    padding: 10px 14px !important;
    gap: 8px !important;
  }

  .lg {
    font-size: 19px !important;
    gap: 8px !important;
  }

  .lg img {
    width: 32px !important;
    height: 32px !important;
  }

  .dr {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .dash-window {
    width: 98vw !important;
    height: 94vh !important;
    border-radius: 14px !important;
  }

  .dep-window {
    width: 96vw !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .mx {
    width: 96vw !important;
    border-radius: 14px !important;
  }

  .dash-nav {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  .mx.settings-mode {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
  }

  .mx.settings-mode .mbd {
    padding: 12px 14px 24px !important;
  }

  .mx.settings-mode .settings-section {
    padding: 12px 14px !important;
  }

  .settings-theme-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .settings-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .settings-row:has(.settings-switch) {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .settings-row:has(.settings-switch) .settings-label-wrap {
    flex: 1 1 auto !important;
    max-width: calc(100% - 56px) !important;
  }

  .settings-row .settings-select,
  .settings-row select.settings-select,
  .settings-row input.in {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 7. Narrow Phone Refinements (<= 480px, including 320px, 360px, 375px, 390px, 430px) */
@media (max-width: 480px) {
  header {
    padding: 8px 12px !important;
    gap: 6px !important;
  }

  .lg {
    font-size: 17px !important;
    gap: 6px !important;
  }

  .lg img {
    width: 28px !important;
    height: 28px !important;
  }

  .btn {
    padding: 7px 11px !important;
    font-size: 13px !important;
  }

  main {
    padding: 14px 10px 120px !important;
  }

  .gr {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .cd {
    grid-template-columns: 68px 1fr !important;
    padding: 12px !important;
    gap: 10px !important;
  }

  .cd img {
    width: 68px !important;
    height: 68px !important;
  }

  .tabs {
    overflow-x: auto !important;
    max-width: 100% !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
  }

  .tb {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}

/* 8. Ultra-Compact Mobile (<= 360px, e.g. 320px iPhone SE) */
@media (max-width: 360px) {
  header {
    padding: 6px 8px !important;
    gap: 4px !important;
  }

  .lg {
    font-size: 16px !important;
  }

  .btn {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  .cd {
    grid-template-columns: 56px 1fr !important;
    padding: 10px !important;
    gap: 8px !important;
  }

  .cd img {
    width: 56px !important;
    height: 56px !important;
  }
}

/* 9. Ultrawide and 4K Displays (2000px - 3840px) */
@media (min-width: 2000px) {
  main {
    max-width: 1800px !important;
  }

  .gr {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
}

@media (min-width: 3000px) {
  main {
    max-width: 2400px !important;
  }

  .gr {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 28px !important;
  }
}

/* ========================================================
   CRAFTINDEX ABOUT & DOCUMENTATION CENTER MODAL
   ======================================================== */
.about-modal {
  position: fixed;
  inset: 0;
  z-index: 100000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.about-modal.open {
  display: flex !important;
}

.about-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1;
}

.about-window {
  position: relative;
  z-index: 2;
  width: min(1180px, 96vw);
  height: min(91vh, 880px);
  display: flex;
  flex-direction: column;
  background: rgba(18, 12, 32, 0.96);
  border: 1px solid rgba(179, 136, 255, 0.35);
  border-radius: 20px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-modal.open .about-window {
  transform: translateY(0) scale(1);
}

body.light-mode .about-window {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(147, 51, 234, 0.25);
  box-shadow:
    0 28px 70px rgba(120, 80, 160, 0.25);
}

/* Header */
.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.2);
  background: rgba(28, 18, 48, 0.7);
  flex-shrink: 0;
  gap: 12px;
}

body.light-mode .about-header {
  background: rgba(243, 232, 255, 0.8);
  border-bottom-color: rgba(147, 51, 234, 0.2);
}

.about-header-branding {
  display: flex;
  align-items: center;
  gap: 14px;
}

.about-header-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  /* drop-shadow glow removed */
}

.about-header-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

body.light-mode .about-header-title {
  color: #2e1065;
}

.about-header-sub {
  font-size: 11.5px;
  color: #c4b5fd;
  display: block;
}

body.light-mode .about-header-sub {
  color: #6b21a8;
}

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

.about-mobile-nav-toggle {
  display: none;
  font-size: 13px !important;
  padding: 6px 12px !important;
  background: rgba(124, 77, 255, 0.25) !important;
  border: 1px solid rgba(179, 136, 255, 0.4) !important;
}

/* Body & Vertical Sidebar */
.about-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.about-sidebar {
  width: 290px;
  min-width: 290px;
  border-right: 1px solid rgba(179, 136, 255, 0.18);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: rgba(14, 9, 24, 0.6);
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 136, 255, 0.3) transparent;
}

body.light-mode .about-sidebar {
  background: rgba(248, 244, 255, 0.7);
  border-right-color: rgba(147, 51, 234, 0.18);
}

.about-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.about-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #c4b5fd;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
}

body.light-mode .about-nav-item {
  color: #581c87;
}

.about-nav-item:hover {
  background: rgba(124, 77, 255, 0.18);
  color: #ffffff;
  border-color: rgba(179, 136, 255, 0.25);
}

body.light-mode .about-nav-item:hover {
  background: rgba(147, 51, 234, 0.12);
  color: #2e1065;
}

.about-nav-item.active {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.35), rgba(80, 40, 180, 0.45));
  color: #ffffff;
  border: 1px solid rgba(179, 136, 255, 0.5);
  border-left: 4px solid #b388ff;
  box-shadow: 0 2px 10px rgba(124, 77, 255, 0.3);
}

body.light-mode .about-nav-item.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.18), rgba(192, 132, 252, 0.25));
  color: #2e1065;
  border-color: rgba(147, 51, 234, 0.4);
  border-left: 4px solid #7e22ce;
}

.about-nav-item span:first-child {
  font-size: 14px;
  flex-shrink: 0;
}

/* Content Area */
.about-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 60px;
  color: #e8e0f5;
  font-size: 14.5px;
  line-height: 1.65;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 136, 255, 0.3) transparent;
}

body.light-mode .about-content {
  color: #3b0764;
}

.about-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.2);
  letter-spacing: -0.01em;
}

body.light-mode .about-content h2 {
  color: #1e1b4b;
  border-bottom-color: rgba(147, 51, 234, 0.2);
}

.about-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #d1b3ff;
  margin: 22px 0 10px;
}

body.light-mode .about-content h3 {
  color: #6b21a8;
}

.about-content p {
  margin: 0 0 14px;
}

.about-content ul,
.about-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.about-content li {
  margin-bottom: 6px;
}

.doc-lead-desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: #f1ecff;
}

body.light-mode .doc-lead-desc {
  color: #2e1065;
}

/* Creator Card */
.creator-card {
  background: linear-gradient(135deg, rgba(38, 24, 68, 0.75), rgba(22, 14, 42, 0.88));
  border: 1px solid rgba(179, 136, 255, 0.38);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.light-mode .creator-card {
  background: linear-gradient(135deg, rgba(243, 232, 255, 0.85), rgba(250, 245, 255, 0.95));
  border-color: rgba(147, 51, 234, 0.3);
  box-shadow: 0 8px 24px rgba(120, 80, 160, 0.12);
}

.creator-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c4dff, #b388ff);
  color: #0c0915;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex-shrink: 0;
}

.creator-info {
  flex: 1;
  min-width: 140px;
}

.creator-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

body.light-mode .creator-name {
  color: #2e1065;
}

.creator-role {
  font-size: 12.5px;
  font-weight: 600;
  color: #c4b5fd;
}

body.light-mode .creator-role {
  color: #7e22ce;
}

.creator-portfolio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  color: #ffffff !important;
  background: linear-gradient(135deg, #7c4dff, #9333ea);
  border: 1px solid rgba(216, 180, 254, 0.4);
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.4);
  transition: all 0.2s ease;
}

.creator-portfolio-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.6);
}

.creator-bio {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #c4b5fd;
}

body.light-mode .creator-bio {
  color: #581c87;
}

/* Brand Banner inside Overview */
.doc-brand-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.doc-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  /* drop-shadow glow removed */
}

.doc-main-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
}

body.light-mode .doc-main-title {
  color: #1e1b4b;
}

.doc-tagline {
  font-size: 14px;
  font-weight: 700;
  color: #b388ff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.light-mode .doc-tagline {
  color: #7e22ce;
}

/* Callouts */
.doc-callout {
  background: rgba(30, 20, 52, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.25);
  border-left: 4px solid #b388ff;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}

body.light-mode .doc-callout {
  background: rgba(243, 232, 255, 0.7);
  border-color: rgba(147, 51, 234, 0.25);
  border-left-color: #7e22ce;
}

.doc-callout.warning {
  border-left-color: #f59e0b;
  background: rgba(45, 30, 20, 0.6);
}

.doc-callout.info {
  border-left-color: #3b82f6;
}

.doc-callout-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

body.light-mode .doc-callout-title {
  color: #1e1b4b;
}

/* Grid Cards inside Docs */
.doc-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.doc-mini-card {
  background: rgba(26, 17, 44, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.2);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
}

body.light-mode .doc-mini-card {
  background: rgba(245, 238, 255, 0.7);
  border-color: rgba(147, 51, 234, 0.2);
}

.doc-mini-card:hover {
  border-color: rgba(179, 136, 255, 0.5);
  transform: translateY(-2px);
}

.dmc-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.dmc-title {
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 4px;
}

body.light-mode .dmc-title {
  color: #2e1065;
}

.dmc-desc {
  font-size: 12px;
  color: #c4b5fd;
  line-height: 1.5;
}

body.light-mode .dmc-desc {
  color: #6b21a8;
}

/* Tables */
.doc-table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border-radius: 12px;
  border: 1px solid rgba(179, 136, 255, 0.2);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.doc-table th,
.doc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.15);
}

.doc-table th {
  background: rgba(36, 22, 60, 0.7);
  font-weight: 800;
  color: #ffffff;
}

body.light-mode .doc-table th {
  background: rgba(233, 213, 255, 0.7);
  color: #2e1065;
}

.doc-table tr:hover {
  background: rgba(124, 77, 255, 0.08);
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.pass {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

/* Code Blocks */
.doc-code {
  background: rgba(10, 6, 18, 0.85);
  border: 1px solid rgba(179, 136, 255, 0.2);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  color: #e9d5ff;
  line-height: 1.5;
  margin: 16px 0;
}

body.light-mode .doc-code {
  background: rgba(240, 235, 250, 0.9);
  color: #3b0764;
}

.about-content code {
  background: rgba(124, 77, 255, 0.2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  color: #e9d5ff;
}

body.light-mode .about-content code {
  background: rgba(147, 51, 234, 0.15);
  color: #581c87;
}

/* FAQ Items */
.doc-faq-item {
  background: rgba(24, 16, 40, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.18);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

body.light-mode .doc-faq-item {
  background: rgba(245, 238, 255, 0.7);
  border-color: rgba(147, 51, 234, 0.18);
}

.doc-faq-item h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

body.light-mode .doc-faq-item h4 {
  color: #2e1065;
}

.doc-faq-item p {
  margin: 0;
  color: #c4b5fd;
  font-size: 13.5px;
}

body.light-mode .doc-faq-item p {
  color: #581c87;
}

.doc-card-link-box {
  background: rgba(24, 16, 40, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}

.doc-card-link-box p {
  margin: 6px 0;
}

.doc-card-link-box a {
  color: #b388ff;
  text-decoration: underline;
}

/* Mobile Responsiveness for About */
@media (max-width: 768px) {
  .about-modal {
    padding: 0 !important;
  }

  .about-window {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }

  .about-mobile-nav-toggle {
    display: inline-flex !important;
  }

  .about-body {
    flex-direction: column !important;
  }

  .about-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-height: 240px !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(179, 136, 255, 0.2) !important;
    display: none !important;
    flex-shrink: 0;
  }

  .about-sidebar.mobile-open {
    display: flex !important;
  }

  .about-content {
    padding: 16px 14px 50px !important;
  }

  .creator-portfolio-btn {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* ========================================================
   CRAFTINDEX PACK STUDIO & 3-CARD WORKSPACE SUITE
   ======================================================== */
.studio-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.studio-header {
  background: color-mix(in srgb, var(--r), transparent 25%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-title-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--w);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(124, 77, 255, 0.35));
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.5);
  display: inline-block;
  align-self: flex-start;
  box-shadow: none;
}

.studio-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: var(--t);
  line-height: 1.5;
  max-width: 900px;
}

/* 3 CARDS IN ONE LINE (WORKSPACE SUITE) */
.studio-cards-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch !important;
  width: 100% !important;
}

@media (max-width: 1080px) {
  .studio-cards-row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

.studio-card {
  background: color-mix(in srgb, var(--r), transparent 20%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  box-sizing: border-box;
}

.studio-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.studio-section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--w);
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-card-sub {
  font-size: 12px;
  color: var(--t);
  line-height: 1.4;
}

/* CARD 1: FORM INPUTS */
.studio-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.studio-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.studio-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t);
}

.studio-input-full,
.studio-select-full,
.studio-textarea-full {
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit;
  font-size: 13.5px;
}

.studio-textarea-full {
  resize: vertical;
  min-height: 68px;
  line-height: 1.45;
}

/* CARD 2: STATS & OVERVIEW */
.studio-stats-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: space-between;
}

.studio-stat-hero {
  background: rgba(124, 77, 255, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-stat-hero-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--w);
  letter-spacing: -0.02em;
}

.studio-stat-hero-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d8b4fe;
}

.studio-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.studio-stat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-stat-pill-icon {
  font-size: 16px;
  line-height: 1;
}

.studio-stat-pill-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.studio-stat-pill-num {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--w);
}

.studio-stat-pill-name {
  font-size: 10px;
  color: var(--t);
  font-weight: 600;
  text-transform: uppercase;
}

.studio-storage-guarantee {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-storage-icon {
  font-size: 18px;
  line-height: 1;
}

.studio-storage-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.studio-storage-title {
  font-size: 12px;
  color: #6ee7b7;
}

.studio-storage-sub {
  font-size: 10px;
  color: var(--t);
}

/* CARD 3: ACTIONS & PACKAGING */
.studio-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
}

.studio-action-tool-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
  text-align: left !important;
  width: 100% !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}

.studio-action-tool-btn:hover {
  transform: translateY(-2px) !important;
}

.studio-action-tool-btn.danger {
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.studio-action-tool-btn.danger:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

.studio-action-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.studio-action-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.studio-action-name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
}

.studio-action-desc {
  font-size: 10.5px;
  color: var(--t);
  line-height: 1.2;
}

/* COLLECTION CARD (FULL WIDTH) */
.studio-collection-card {
  width: 100%;
}

.studio-collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.studio-indexeddb-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

/* LIGHT MODE COMPATIBILITY FOR STUDIO */
body.light-mode .studio-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(210, 190, 230, 0.8);
  box-shadow: 0 4px 16px rgba(120, 80, 160, 0.08);
}

body.light-mode .studio-card-head,
body.light-mode .studio-collection-head {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .studio-stat-hero {
  background: rgba(124, 77, 255, 0.08);
  border-color: rgba(124, 77, 255, 0.2);
}

body.light-mode .studio-stat-hero-lbl {
  color: #6b21a8;
}

body.light-mode .studio-stat-pill {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .studio-storage-guarantee {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

body.light-mode .studio-storage-title {
  color: #065f46;
}

body.light-mode .studio-indexeddb-badge {
  background: rgba(168, 85, 247, 0.1);
  color: #6b21a8;
  border-color: rgba(168, 85, 247, 0.3);
}

.studio-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.studio-stat-card {
  background: color-mix(in srgb, var(--r), #000 25%);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.studio-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.5);
}

.studio-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--w);
  letter-spacing: -0.01em;
}

.studio-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--t), transparent 25%);
}

.studio-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.studio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.studio-btn-primary {
  background: linear-gradient(135deg, #9333ea, #7c4dff);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.35);
}

.studio-btn-primary:hover {
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
}

.studio-btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.studio-btn-success:hover {
  background: linear-gradient(135deg, #10b981, #34d399);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.studio-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.studio-btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

.studio-btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--w);
  border-color: var(--bd);
}

.studio-btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(192, 132, 252, 0.4);
}

.studio-section {
  background: color-mix(in srgb, var(--r), transparent 30%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--w);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* DROPZONE */
.studio-dropzone {
  border: 2px dashed rgba(168, 85, 247, 0.4);
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  background: color-mix(in srgb, var(--r), #000 40%);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.studio-dropzone:hover,
.studio-dropzone.dragover {
  border-color: #c084fc;
  background: color-mix(in srgb, var(--r), #7c4dff 15%);
  box-shadow: none;
  transform: scale(1.005);
}

.studio-dropzone-icon {
  font-size: 42px;
  line-height: 1;
  /* drop-shadow glow removed */
}

.studio-dropzone h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--w);
}

.studio-dropzone p {
  margin: 0;
  font-size: 13.5px;
  color: var(--t);
  max-width: 600px;
  line-height: 1.5;
}

.studio-file-label {
  margin-top: 6px;
  cursor: pointer;
}

.studio-dropzone-status {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #c084fc;
  min-height: 20px;
}

/* EXPORT SETTINGS CARD */
.studio-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

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

.studio-form-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--t), #fff 20%);
}

.studio-input,
.studio-select,
.studio-textarea {
  background: color-mix(in srgb, var(--r), #000 35%);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--w);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.studio-input:focus,
.studio-select:focus,
.studio-textarea:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

/* ITEMS LIST */
.studio-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-item-row {
  background: color-mix(in srgb, var(--r), #000 20%);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s ease;
}

.studio-item-row:hover {
  border-color: rgba(192, 132, 252, 0.4);
  background: color-mix(in srgb, var(--r), #7c4dff 8%);
  transform: translateY(-1px);
}

.studio-item-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.studio-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.studio-item-fallback-icon {
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-item-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.studio-item-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.studio-item-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--w);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.studio-item-author {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
}

.studio-item-author b {
  color: #e9d5ff;
  font-weight: 600;
}

.studio-item-version {
  font-size: 11.5px;
  color: #c084fc;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.studio-item-desc {
  font-size: 13px;
  color: var(--t);
  line-height: 1.45;
  margin: 1px 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.studio-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--t);
  flex-wrap: wrap;
}

.studio-item-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.studio-item-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.studio-item-hash {
  font-family: monospace;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-item-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(124, 77, 255, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(124, 77, 255, 0.35);
}

.studio-item-type-badge.mods {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.35);
}

.studio-item-type-badge.plugins {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}

.studio-item-type-badge.resourcepacks {
  background: rgba(236, 72, 153, 0.18);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.35);
}

.studio-item-type-badge.shaders {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

.studio-item-type-badge.datapacks {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

.studio-binary-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.studio-binary-cached {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.studio-binary-remote {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.studio-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-remove-btn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.32);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.studio-remove-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.55);
  transform: translateY(-1px);
}

/* EMPTY STATE */
.studio-empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--r), #000 25%);
  border: 1px dashed var(--bd);
  border-radius: 14px;
}

.studio-empty-icon {
  font-size: 48px;
  line-height: 1;
}

.studio-empty-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--w);
}

.studio-empty-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--t);
  max-width: 500px;
  line-height: 1.5;
}

/* AUDIT LOG BOX */
.studio-log-box {
  background: rgba(10, 6, 16, 0.85);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 180px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-log-entry {
  padding: 2px 0;
  line-height: 1.4;
  word-break: break-all;
}

.studio-log-entry.success { color: #86efac; }
.studio-log-entry.warning { color: #fde047; }
.studio-log-entry.error   { color: #fca5a5; }
.studio-log-entry.info    { color: #c4b5fd; }

/* INSPECTION MODAL */
.studio-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.studio-modal {
  background: color-mix(in srgb, var(--r), #000 20%);
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.studio-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--w);
}

.studio-modal-close {
  background: none;
  border: none;
  color: var(--t);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.studio-modal-close:hover {
  color: #fff;
}

.studio-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13.5px;
}

.studio-modal-code {
  background: rgba(10, 6, 16, 0.9);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  color: #e2e8f0;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 768px) {
  .studio-container {
    padding: 16px 12px 60px;
  }
  .studio-header {
    padding: 18px 16px;
  }
  .studio-stat-cards {
    grid-template-columns: 1fr;
  }
  .studio-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .studio-btn {
    width: 100%;
    justify-content: center;
  }
  .studio-item-row {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }
  .studio-item-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}



/* ========================================================
   STANDALONE DOCUMENTATION & SEO CRAWLER STYLES
   ======================================================== */
.standalone-docs-container {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  color: var(--t);
  font-family: var(--font, 'Inter', sans-serif);
}

.doc-header-banner {
  background: linear-gradient(135deg, rgba(22, 17, 38, 0.95), rgba(12, 9, 21, 0.98));
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 36px 32px;
  margin-bottom: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body.light-mode .doc-header-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 238, 255, 0.95));
  border-color: rgba(147, 51, 234, 0.25);
  box-shadow: 0 10px 30px rgba(120, 80, 160, 0.12);
}

.doc-header-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(179, 136, 255, 0.12);
  border: 1px solid rgba(179, 136, 255, 0.3);
  color: var(--b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

body.light-mode .doc-header-badge {
  background: rgba(147, 51, 234, 0.1);
  border-color: rgba(147, 51, 234, 0.3);
  color: #7e22ce;
}

.doc-main-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: var(--w);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

body.light-mode .doc-main-title {
  color: #1e1b4b;
}

.doc-main-subtitle {
  font-size: 15px;
  color: var(--t);
  line-height: 1.6;
  max-width: 820px;
  margin: 0 0 24px;
}

body.light-mode .doc-main-subtitle {
  color: #4b3263;
}

.doc-creator-pill-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(34, 26, 58, 0.6);
  border: 1px solid rgba(179, 136, 255, 0.22);
  border-radius: 12px;
  flex-wrap: wrap;
}

body.light-mode .doc-creator-pill-card {
  background: rgba(240, 230, 255, 0.6);
  border-color: rgba(147, 51, 234, 0.2);
}

.doc-creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--b2), var(--b));
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-creator-info {
  flex: 1;
  min-width: 220px;
}

.doc-creator-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--w);
  display: flex;
  align-items: center;
  gap: 8px;
}

body.light-mode .doc-creator-name {
  color: #1e1b4b;
}

.doc-creator-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(179, 136, 255, 0.18);
  color: var(--b);
}

body.light-mode .doc-creator-tag {
  background: rgba(147, 51, 234, 0.15);
  color: #6b21a8;
}

.doc-creator-desc {
  font-size: 12.5px;
  color: var(--t-muted);
  margin-top: 3px;
}

.doc-creator-actions {
  display: flex;
  gap: 10px;
}

.doc-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--b2);
  color: #fff;
  border: 1px solid var(--b);
  transition: all 0.15s ease;
}

.doc-pill-btn:hover {
  background: var(--b);
  color: #0c0915;
  text-decoration: none;
  transform: translateY(-1px);
}

.doc-pill-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(179, 136, 255, 0.25);
  color: var(--t);
}

body.light-mode .doc-pill-btn.secondary {
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.25);
  color: #3b0764;
}

.doc-pill-btn.secondary:hover {
  background: rgba(179, 136, 255, 0.15);
  color: var(--w);
}

.doc-layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.doc-toc-sidebar {
  position: sticky;
  top: 80px;
  background: rgba(22, 17, 38, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

body.light-mode .doc-toc-sidebar {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.2);
}

.doc-toc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--w);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}

body.light-mode .doc-toc-title {
  color: #1e1b4b;
}

.doc-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-toc-list a {
  display: block;
  font-size: 12.5px;
  color: var(--t-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.doc-toc-list a:hover {
  color: var(--w);
  background: rgba(179, 136, 255, 0.1);
  text-decoration: none;
}

body.light-mode .doc-toc-list a:hover {
  color: #2e1065;
  background: rgba(147, 51, 234, 0.1);
}

.doc-article-content {
  background: rgba(22, 17, 38, 0.5);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 36px 40px;
  line-height: 1.7;
}

body.light-mode .doc-article-content {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(147, 51, 234, 0.2);
}

.doc-article-content h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--w);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.2);
}

body.light-mode .doc-article-content h1 {
  color: #1e1b4b;
  border-bottom-color: rgba(147, 51, 234, 0.2);
}

.doc-article-content h1:first-child {
  margin-top: 0;
}

.doc-article-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--w);
  margin: 28px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(179, 136, 255, 0.15);
}

body.light-mode .doc-article-content h2 {
  color: #1e1b4b;
  border-bottom-color: rgba(147, 51, 234, 0.15);
}

.doc-article-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--b);
  margin: 20px 0 10px;
}

body.light-mode .doc-article-content h3 {
  color: #7e22ce;
}

.doc-article-content p {
  margin: 0 0 14px;
  color: var(--t);
  font-size: 14px;
}

body.light-mode .doc-article-content p {
  color: #3b0764;
}

.doc-article-content pre {
  background: rgba(10, 7, 18, 0.85);
  border: 1px solid rgba(179, 136, 255, 0.2);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  font-family: monospace;
  color: #e8e0f5;
  margin: 16px 0;
}

body.light-mode .doc-article-content pre {
  background: rgba(243, 232, 255, 0.6);
  border-color: rgba(147, 51, 234, 0.2);
  color: #2e1065;
}

.doc-article-content code {
  background: rgba(179, 136, 255, 0.15);
  color: var(--b);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: monospace;
}

body.light-mode .doc-article-content code {
  background: rgba(147, 51, 234, 0.12);
  color: #6b21a8;
}

.doc-article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.doc-article-content blockquote {
  border-left: 3px solid var(--b);
  padding: 10px 16px;
  margin: 16px 0;
  background: rgba(179, 136, 255, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--t);
}

.doc-divider {
  border: none;
  border-top: 1px solid rgba(179, 136, 255, 0.18);
  margin: 32px 0;
}

.doc-numbered-step {
  padding: 10px 14px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--b);
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
}

/* SEO Crawler Banner */
.seo-crawler-intro {
  grid-column: 1 / -1;
  width: 100%;
  background: linear-gradient(135deg, rgba(22, 17, 38, 0.8), rgba(12, 9, 21, 0.85));
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

body.light-mode .seo-crawler-intro {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 238, 255, 0.85));
  border-color: rgba(147, 51, 234, 0.2);
}

.seo-breadcrumbs {
  font-size: 12px;
  color: var(--t-muted);
  margin-bottom: 10px;
}

.seo-breadcrumbs a {
  color: var(--b);
  text-decoration: none;
}

.seo-crawler-intro h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--w);
  margin: 0 0 8px;
}

body.light-mode .seo-crawler-intro h1 {
  color: #1e1b4b;
}

.seo-crawler-lead {
  font-size: 14px;
  color: var(--t);
  line-height: 1.5;
  margin: 0 0 16px;
}

body.light-mode .seo-crawler-lead {
  color: #4b3263;
}

.seo-crawler-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.seo-feature-item {
  background: rgba(34, 26, 58, 0.5);
  border: 1px solid rgba(179, 136, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--t);
}

body.light-mode .seo-feature-item {
  background: rgba(240, 230, 255, 0.5);
  border-color: rgba(147, 51, 234, 0.15);
  color: #3b0764;
}

/* Site Footer */
.site-footer {
  margin-top: 48px;
  padding: 40px 24px 32px;
  border-top: 1px solid var(--bd);
  background: rgba(12, 9, 21, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  line-height: 1.6;
  color: var(--t);
  text-align: center;
}

body.light-mode .site-footer {
  background: rgba(255, 255, 255, 0.85);
  border-top-color: rgba(147, 51, 234, 0.2);
}

.site-footer a {
  color: var(--b);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--w);
  text-decoration: underline;
}

body.light-mode .site-footer a {
  color: #7e22ce;
}

body.light-mode .site-footer a:hover {
  color: #1e1b4b;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.site-footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.site-footer-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--w);
}

body.light-mode .site-footer-name {
  color: #1e1b4b;
}

.site-footer-author {
  margin-bottom: 16px;
  color: var(--t);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}

.site-footer-disclaimer {
  max-width: 860px;
  margin: 0 auto 12px;
  font-size: 11.5px;
  color: var(--t-muted);
  line-height: 1.6;
}

.site-footer-privacy {
  max-width: 860px;
  margin: 0 auto;
  font-size: 11.5px;
  color: var(--t-muted);
}

@media (max-width: 900px) {
  .doc-layout-grid {
    grid-template-columns: 1fr;
  }
  .doc-toc-sidebar {
    position: static;
    max-height: none;
  }
}

/* ========================================================
   ADVERTISE MODAL CUSTOM MODE & 10 CARDS GRID
   ======================================================== */
.mx.ad-mode {
  width: min(660px, 94vw) !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
}

.mx.ad-mode .mbd {
  max-height: calc(88vh - 120px) !important;
  overflow-y: auto !important;
  padding: 18px 24px 24px !important;
}

.ad-promote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .ad-promote-grid {
    grid-template-columns: 1fr;
  }
}

.ad-promote-card {
  background: rgba(26, 19, 44, 0.7);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(179, 136, 255, 0.2);
  color: rgba(245, 240, 255, 0.95);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.ad-promote-card:hover {
  background: rgba(38, 28, 64, 0.85);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

body.light-mode .ad-promote-card {
  background: rgba(245, 240, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.22);
  color: #2e1065;
}

body.light-mode .ad-promote-card:hover {
  background: rgba(236, 222, 255, 0.95);
  border-color: rgba(147, 51, 234, 0.45);
}

/* ========================================================
   SOCIALS MODAL & STANDALONE VIEW (ARATA INLOOKER)
   ======================================================== */
.socials-modal {
  position: fixed;
  inset: 0;
  z-index: 100200 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.socials-modal.open {
  display: flex !important;
}

.socials-window {
  width: min(760px, 95vw);
  max-height: min(92vh, 820px);
  height: auto;
  display: flex;
  flex-direction: column;
}

.socials-body {
  padding: 22px 28px 28px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.socials-creator-card {
  background: rgba(26, 19, 44, 0.65);
  border: 1px solid rgba(179, 136, 255, 0.28);
  border-radius: 14px;
  padding: 18px 20px;
}

.socials-dm-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 12.5px;
  font-weight: 600;
}

.socials-dm-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.socials-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .socials-cards-grid {
    grid-template-columns: 1fr;
  }
  .socials-body {
    padding: 16px 18px 22px;
  }
}

.social-card {
  background: rgba(22, 16, 38, 0.75);
  border: 1px solid rgba(179, 136, 255, 0.22);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.social-card:hover {
  background: rgba(30, 22, 52, 0.85);
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.social-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.social-card:hover .social-icon-box {
  transform: scale(1.05);
}

.social-icon-box.discord {
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #5865f2;
}

.social-icon-box.x {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.social-icon-box.instagram {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.18), rgba(247, 119, 55, 0.18));
  border: 1px solid rgba(225, 48, 108, 0.35);
  color: #e1306c;
}

.social-icon-box.email {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

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

.social-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.social-platform-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.social-pill-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(179, 136, 255, 0.15);
  color: var(--t-accent);
  border: 1px solid rgba(179, 136, 255, 0.25);
}

.social-pill-badge.dm-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.social-username {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(235, 225, 250, 0.85);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-card-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--t-muted);
  line-height: 1.5;
}

.social-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-card-actions .btn {
  flex: 1;
  min-width: 120px;
  text-align: center;
  justify-content: center;
  font-size: 12.5px;
  padding: 8px 12px;
}

.btn-success {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

/* Standalone /socials/ view container */
.standalone-socials-container {
  grid-column: 1 / -1;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.socials-hero-banner {
  margin-bottom: 24px;
}

.socials-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  margin-bottom: 12px;
}

.socials-main-title {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.socials-main-subtitle {
  font-size: 14.5px;
  color: var(--t-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* Daylight Crystal Light Mode Overrides */
body.light-mode .socials-window {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(147, 51, 234, 0.25);
  box-shadow: 0 24px 70px rgba(120, 80, 160, 0.25);
}

body.light-mode .socials-creator-card {
  background: rgba(248, 244, 255, 0.85);
  border-color: rgba(147, 51, 234, 0.25);
}

body.light-mode .social-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(147, 51, 234, 0.2);
}

body.light-mode .social-card:hover {
  background: rgba(248, 244, 255, 0.98);
  border-color: rgba(147, 51, 234, 0.45);
  box-shadow: 0 8px 24px rgba(120, 80, 160, 0.15);
}

body.light-mode .social-platform-title {
  color: #1e1035;
}

body.light-mode .social-username {
  color: #4c1d95;
}

body.light-mode .socials-main-title {
  color: #1e1035;
}

body.light-mode .social-icon-box.x {
  background: rgba(15, 10, 30, 0.08);
  border-color: rgba(15, 10, 30, 0.2);
  color: #1e1035;
}
