/* DUtility Client In-Game GUI - Exact 1:1 Implementation of GlRnd.java */

:root {
  --gl-bg-top: #16171b;
  --gl-bg-bot: #0e0f12;
  --gl-side-bg: #121317;
  --gl-split-line: #22242b;
  --gl-gold: #f4c050;
  --gl-gold-bright: #fff3d2;
  --gl-gold-glow: rgba(244, 192, 80, 0.4);
  --gl-card-normal-top: #16171d;
  --gl-card-normal-bot: #111216;
  --gl-card-active-top: #1f222b;
  --gl-card-active-bot: #171920;
  --gl-txt: #e8ebf1;
  --gl-txt-active: #f7efd8;
  --gl-txt-muted: #8c94a5;
  --gl-txt-dim: #60667a;
  --gl-toggle-off: #2a303c;
  --gl-track-bg: #2a2f3a;
  --gl-pill-bg: #20242e;
  --gl-keybind-bg: #181c26;
}

/* Layout in #socials */
.showcase-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  width: 100%;
}

@media (max-width: 1380px) {
  .showcase-grid {
    flex-direction: column;
    gap: 56px;
  }
}

/* Master GUI Window (Exact 900x560 in GlRnd.java) */
.gl-gui-window {
  background: linear-gradient(180deg, var(--gl-bg-top) 0%, var(--gl-bg-bot) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 
    0 30px 80px -15px rgba(0, 0, 0, 0.98),
    0 4px 24px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -2px 6px rgba(0, 0, 0, 0.85);
  display: flex;
  height: 560px;
  width: 900px;
  min-width: 900px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  user-select: none;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, sans-serif;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .gl-gui-window {
    width: 100%;
    min-width: 100%;
  }
}

/* Sidebar - Exactly 220px wide */
.gl-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--gl-side-bg);
  border-right: 1px solid var(--gl-split-line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  box-sizing: border-box;
  position: relative;
}

/* DUtility Shimmer Brand Header - Exactly matching GlRnd.java (band sweep 0xFFFFF3D2 over 0xFFF4C050) */
.gl-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 22px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  position: relative;
}

.gl-brand-text {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(
    90deg,
    #F4C050 0%,
    #F4C050 38%,
    #FFF3D2 47%,
    #FFFFFF 50%,
    #FFF3D2 53%,
    #F4C050 62%,
    #F4C050 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: glGoldShimmer 5.2s linear infinite;
  display: inline-block;
  user-select: none;
}

@keyframes glGoldShimmer {
  0% {
    background-position: 130% 0;
  }
  50% {
    background-position: -30% 0;
  }
  100% {
    background-position: -30% 0;
  }
}

/* Navigation List with Floating Active Indicator */
.gl-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  position: relative;
}

/* Sliding active pill indicator */
.gl-nav-active-pill {
  position: absolute;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(180deg, rgba(244, 192, 80, 0.22) 0%, rgba(244, 192, 80, 0.08) 100%);
  border: 1.2px solid rgba(244, 192, 80, 0.35);
  border-radius: 9px;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  z-index: 1;
}

.gl-nav-active-pill::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6px;
  height: 18px;
  border-radius: 1.3px;
  background: var(--gl-gold);
  box-shadow: 0 0 8px var(--gl-gold);
}

.gl-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  height: 38px;
  border-radius: 9px;
  color: var(--gl-txt-muted);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.gl-nav-item:hover {
  color: var(--gl-txt);
}

.gl-nav-item.active {
  color: var(--gl-txt);
}

.gl-cat-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gl-cat-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Inactive category icon colors from GlRnd.java DOT array */
.gl-nav-item .icon-cmbt { color: #78BEDC; }
.gl-nav-item .icon-vsl  { color: #96D29B; }
.gl-nav-item .icon-msc  { color: #EBA564; }
.gl-nav-item .icon-gui  { color: #B48CE6; }
.gl-nav-item .icon-cfg  { color: #E0C088; }

/* Active category icon color from GlRnd.java (GOLD) */
.gl-nav-item.active .gl-cat-icon {
  color: #F4C050 !important;
}

.gl-nav-name {
  white-space: nowrap;
  font-size: 14px;
  letter-spacing: -0.01em;
}

/* Discord chip bottom */
.gl-user-chip {
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 12px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  box-sizing: border-box;
}

.gl-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.gl-user-info {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gl-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gl-txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-user-sub {
  font-size: 11px;
  color: var(--gl-txt-dim);
}

/* Main Content Area */
.gl-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Top bar - Exactly 62px */
.gl-topbar {
  height: 62px;
  min-height: 62px;
  border-bottom: 1px solid var(--gl-split-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

.gl-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gl-topbar-bar {
  width: 3px;
  height: 18px;
  border-radius: 1.5px;
  background: var(--gl-gold);
}

.gl-topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gl-txt);
  letter-spacing: -0.01em;
}

.gl-topbar-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--gl-txt-dim);
}

.gl-search-box {
  position: relative;
  width: 190px;
  height: 30px;
}

.gl-search-input {
  width: 100%;
  height: 30px;
  background: #16181f;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: var(--gl-txt);
  font-family: inherit;
  font-size: 13px;
  padding: 0 12px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.gl-search-input:focus {
  background: #20232b;
  border-color: rgba(244, 192, 80, 0.35);
}

.gl-search-input::placeholder {
  color: var(--gl-txt-dim);
}

/* Custom In-GUI Gold Scrollbar (Exact 0x66F4C050 from GlRnd.java) */
.gl-scroll-track {
  position: absolute;
  top: 66px;
  bottom: 10px;
  right: 5px;
  width: 9px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.gl-scroll-thumb {
  position: absolute;
  top: 0;
  left: 2px;
  width: 5px;
  min-height: 28px;
  border-radius: 2px;
  background: rgba(244, 192, 80, 0.4);
  transition: opacity 0.2s ease, background 0.15s ease;
  cursor: grab;
}

.gl-scroll-thumb:hover,
.gl-scroll-thumb.active {
  background: rgba(244, 192, 80, 0.85);
  cursor: grabbing;
}

/* Scroll Container */
.gl-scroll-view {
  flex: 1;
  overflow-y: scroll;
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none; /* Hide default native bar */
  -ms-overflow-style: none;
  position: relative;
}

.gl-scroll-view::-webkit-scrollbar {
  display: none;
}

/* Mod Card - Matching GlRnd.java */
.gl-card {
  background: linear-gradient(180deg, var(--gl-card-normal-top) 0%, var(--gl-card-normal-bot) 100%);
  border-radius: 12px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  position: relative;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.gl-card:hover {
  background: linear-gradient(180deg, #1b1c24 0%, #14151b 100%);
}

.gl-card.enabled {
  background: linear-gradient(180deg, var(--gl-card-active-top) 0%, var(--gl-card-active-bot) 100%);
  box-shadow: inset 0 0 0 1px rgba(244, 192, 80, 0.25);
}

.gl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  min-height: 54px;
  cursor: pointer;
  gap: 12px;
  box-sizing: border-box;
}

.gl-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
}

.gl-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gl-card-name {
  font-size: 15.5px;
  font-weight: 700;
  color: #d8dbe4;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.gl-card.enabled .gl-card-name {
  color: var(--gl-txt-active);
}

.gl-card-chevron {
  font-size: 11px;
  color: var(--gl-txt-dim);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.gl-card.expanded .gl-card-chevron {
  transform: rotate(180deg);
  color: var(--gl-gold);
}

.gl-card-desc {
  font-size: 12px;
  color: var(--gl-txt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.gl-card-ctrls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Keybind Badge */
.gl-keybind-btn {
  background: var(--gl-keybind-bg);
  border-radius: 6px;
  padding: 0 10px;
  height: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gl-txt-muted);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.gl-keybind-btn:hover {
  color: var(--gl-gold);
  background: #202430;
}

.gl-keybind-btn.binding {
  color: var(--gl-gold);
  background: #252838;
}

/* Master Toggle Switch (40x20px with 15px white knob) */
.gl-toggle {
  width: 40px;
  height: 20px;
  border-radius: 10px;
  background: var(--gl-toggle-off);
  position: relative;
  cursor: pointer;
  transition: background 0.22s ease, box-shadow 0.22s ease;
  flex-shrink: 0;
}

.gl-toggle.on {
  background: var(--gl-gold);
  box-shadow: 0 0 12px var(--gl-gold-glow);
}

.gl-toggle-knob {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fcfcfc;
  position: absolute;
  left: 3px;
  top: 2.5px;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.gl-toggle.on .gl-toggle-knob {
  transform: translateX(19px);
}

/* Smooth Accordion Settings Body */
.gl-card-settings-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.gl-card.expanded .gl-card-settings-wrap {
  max-height: 800px;
}

.gl-card-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 20px 20px;
  background: rgba(0, 0, 0, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Setting Row */
.gl-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
}

.gl-set-label {
  font-size: 13px;
  color: #ced2dc;
  font-weight: 500;
}

/* Boolean Mini Toggle (34x18px) */
.gl-mini-toggle {
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: var(--gl-toggle-off);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.gl-mini-toggle.on {
  background: var(--gl-gold);
}

.gl-mini-toggle-knob {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fcfcfc;
  position: absolute;
  left: 3px;
  top: 2.5px;
  transition: transform 0.2s ease;
}

.gl-mini-toggle.on .gl-mini-toggle-knob {
  transform: translateX(15px);
}

/* Slider Setting */
.gl-slider-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 4px 0;
}

.gl-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gl-slider-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--gl-gold);
}

.gl-slider-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--gl-track-bg);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.gl-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--gl-gold);
  border-radius: 3px;
  pointer-events: none;
}

.gl-slider-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: grab;
  pointer-events: none;
}

.gl-slider-thumb:active {
  cursor: grabbing;
}

/* Range Slider Fill */
.gl-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--gl-gold);
  border-radius: 2px;
}

/* Mode Pill */
.gl-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gl-pill-bg);
  border-radius: 12px;
  height: 24px;
  min-width: 100px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--gl-txt);
  cursor: pointer;
  user-select: none;
}

.gl-mode-arrow {
  color: var(--gl-txt-muted);
  font-size: 11px;
}

.gl-mode-pill:hover .gl-mode-arrow {
  color: var(--gl-gold);
}

/* Color Preview */
.gl-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gl-pill-bg);
  border-radius: 12px;
  height: 24px;
  padding: 0 10px 0 6px;
  font-size: 12px;
  color: var(--gl-txt);
  font-family: monospace;
}

.gl-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

/* Configs Tab (Empty by default) */
.gl-cfg-save-btn {
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(244, 192, 80, 0.25) 0%, rgba(244, 192, 80, 0.08) 100%);
  border: 1.2px solid rgba(244, 192, 80, 0.35);
  color: var(--gl-gold);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.gl-cfg-save-btn:hover {
  background: linear-gradient(180deg, rgba(244, 192, 80, 0.35) 0%, rgba(244, 192, 80, 0.15) 100%);
  border-color: rgba(244, 192, 80, 0.55);
}

.gl-cfg-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 10px;
  padding: 0 4px;
}

.gl-cfg-status-txt {
  font-size: 12px;
  color: var(--gl-txt-dim);
}

.gl-cfg-refresh-btn {
  width: 92px;
  height: 26px;
  border-radius: 7px;
  background: rgba(80, 144, 240, 0.12);
  border: none;
  color: #70b0ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

.gl-cfg-refresh-btn:hover {
  background: rgba(80, 144, 240, 0.19);
}

.gl-cfg-empty-txt {
  font-size: 12.5px;
  color: var(--gl-txt-dim);
  padding: 12px 4px;
}

/* Config Item Card */
.gl-saved-cfg-card {
  background: linear-gradient(180deg, #191b22 0%, #13141a 100%);
  border-radius: 11px;
  overflow: hidden;
  transition: background 0.15s ease;
}

.gl-saved-cfg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  height: 52px;
  cursor: pointer;
  box-sizing: border-box;
}

.gl-saved-cfg-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gl-saved-cfg-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #2a3040;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-saved-cfg-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0c088;
}

.gl-saved-cfg-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gl-txt);
}

.gl-saved-cfg-sub {
  font-size: 11.5px;
  color: var(--gl-txt-dim);
}

.gl-saved-cfg-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px 14px;
}

.gl-action-btn {
  width: 65px;
  height: 26px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: transform 0.15s ease;
}

.gl-action-btn:active {
  transform: scale(0.96);
}

.btn-load { background: rgba(244, 192, 80, 0.2); color: var(--gl-gold); }
.btn-save { background: rgba(80, 224, 80, 0.2); color: #70e870; }
.btn-rename { background: rgba(80, 144, 240, 0.2); color: #70b0ff; }
.btn-delete { background: rgba(224, 80, 80, 0.2); color: #e87070; }

/* Blurred Mystery State for In-Game GUI Widget */
.gl-gui-window.gl-gui-blurred {
  position: relative;
  overflow: hidden;
  user-select: none;
}

.gl-gui-window.gl-gui-blurred .gl-sidebar,
.gl-gui-window.gl-gui-blurred .gl-main {
  filter: blur(20px);
  -webkit-filter: blur(20px);
  opacity: 0.22;
  transform: scale(0.98);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.gl-gui-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 14, 0.64);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: inherit;
  pointer-events: all;
  user-select: none;
}

.gl-question-mark {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 112px;
  font-weight: 700;
  line-height: 1;
  color: #f4f4f6;
  letter-spacing: -0.04em;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.45),
    0 0 90px rgba(244, 192, 80, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

@media (max-width: 960px) {
  .gl-question-mark {
    font-size: 76px;
    width: 80px;
    height: 80px;
  }
}

