.commands-container {
  margin-top: 60px;
  display: flex;
  width: 100%;
  min-height: calc(100vh - 120px);
  opacity: 1;
}

.commands-sidebar {
  width: 250px;
  background: #23283a;
  border-radius: 0;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.6);
  padding: 2rem 1rem;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-slide-in-left 0.7s cubic-bezier(.4,0,.2,1) both;
}

.commands-container > .commands-sidebar:last-child {
  background: #20232a;
  border-left: 2px solid #393e4a;
  border-radius: 0;
  box-shadow: -4px 0 16px rgba(0,0,0,0.18);
  padding: 2.2rem 1.3rem 2.2rem 1.7rem;
  min-width: 240px;
  max-width: 320px;
  color: #e0e0e0;
  font-size: 1.01rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.commands-container > .commands-sidebar:last-child > div {
  width: 100%;
}

.commands-container > .commands-sidebar:last-child h3,
.commands-container > .commands-sidebar:last-child .sidebar-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #F4D35E;
  margin-bottom: 1.1rem;
  margin-top: 0;
  text-align: left;
  letter-spacing: 0.2px;
}

.commands-container > .commands-sidebar:last-child ul {
  color: #bfc7d5;
  font-size: 1.01rem;
  list-style: disc inside;
  padding-left: 0.5em;
  margin: 0;
}

.commands-container > .commands-sidebar:last-child ul li {
  margin-bottom: 0.7em;
  line-height: 1.5;
  padding-left: 0.1em;
}

.commands-container > .commands-sidebar:last-child code {
  background: #181c24;
  color: #F4D35E;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 0.98em;
  font-family: 'Fira Mono', 'Consolas', monospace;
  margin: 0 2px;
}

.commands-container > .commands-sidebar:last-child .syntax-block {
  background: #23283a;
  border: 1px solid #393e4a;
  border-radius: 7px;
  padding: 0.7em 1em;
  margin-bottom: 1.1em;
  color: #e0e0e0;
  font-size: 0.98em;
  line-height: 1.5;
  box-shadow: 0 2px 8px #0002;
}

.commands-container > .commands-sidebar:last-child .syntax-block span {
  color: #F4D35E;
  font-weight: 600;
}

.commands-sidebar::-webkit-scrollbar {
  width: 8px;
}
.commands-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.commands-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.commands-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.sidebar-list {
  list-style: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  position: relative;
  width: 100%;
  padding: 0.75rem 1.5rem 0.75rem 2.5rem;
  margin-bottom: 1.2rem;
  background-color: #23283a;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar-item::before {
  content: "\25BA";
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  color: #8888ff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-item:hover {
  background-color: #262b38;
  color: #fff;
}
.sidebar-item:hover::before {
  transform: translateX(4px);
  color: #a0a0ff;
}

.sidebar-item.active {
  background-color: #2f2c49;
  color: #fff;
  box-shadow: none;
}
.sidebar-item.active::before {
  transform: translateX(4px) rotate(90deg);
  color: #fff;
}

.sidebar-item .cat-count {
  display: inline-block;
  margin-left: 8px;
  color: #bfc7d5;
  font-size: 0.98em;
  font-weight: 400;
  opacity: 0.65;
  background: none;
  border-radius: 8px;
  padding: 0 6px;
  letter-spacing: 0.1px;
  transition: color 0.18s, opacity 0.18s;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 768px) {
  .sidebar-item {
    font-size: 0.95rem;
    padding: 0.6rem 1rem 0.6rem 2rem;
  }
  .sidebar-item::before {
    font-size: 1rem;
    left: 0.8rem;
  }
}


.commands-content {
  flex: 1;
  background-color: #181c24;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 4.5rem;
  animation: fade-slide-in-up 0.7s cubic-bezier(.4,0,.2,1) both;
}


.commands-box {
  width: 100%;
  max-width: 800px;
  background-color: #23283a;
  border: 2px solid #393e4a;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  padding: 2rem;
  position: relative;
}

.commands-box::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  pointer-events: none;
}


.commands-box .commands-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: none;
  position: relative;
}

.commands-box .commands-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #393e4a;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}


.commands-list {
  list-style: none;
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  margin: 0;
}


.command-item {
  width: 100%;
  max-width: 800px;
  background-color: #23283a;
  border: 1px solid #393e4a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: background 0.2s, box-shadow 0.2s, opacity 0.22s, transform 0.22s, margin 0.22s, padding 0.22s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  box-sizing: border-box;
  margin-bottom: 1rem;
  opacity: 1;
  transform: translateY(0);
}

.commands-list > .command-item:not(.hidden):last-child {
  margin-bottom: 0 !important;
}

.command-item:hover {
  background-color: #262b38;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.command-item:active {
  background-color: #23283a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}


.command-item .command-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  margin-right: 1rem;
}

.command-item .command-desc {
  font-size: 0.95rem;
  color: #bfc7d5;
  line-height: 1.4;
}


.command-item.hidden {
  opacity: 0;
  transform: translateY(-16px) scale(0.98);
  pointer-events: none;
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;

  overflow: hidden;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    max-height 0.4s ease,
    margin-bottom 0.4s ease,
    padding 0.4s ease;
}


@media (max-width: 768px) {
  .commands-content {
    padding: 1rem;
  }
  .commands-box {
    padding: 1rem;
    max-width: 100%;
  }
  .commands-box .commands-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }
  .commands-list {
    gap: 0.75rem;
  }
  .command-item {
    padding: 0.75rem 1rem;
  }
  .command-item .command-name {
    font-size: 1rem;
  }
  .command-item .command-desc {
    font-size: 0.9rem;
  }
}


.commands-search-box {
  width: 100%;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.commands-search-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 2;
}
.commands-search-input {
  width: 90%;
  padding: 0.6rem 1rem 0.6rem 2.3rem;
  border-radius: 8px;
  border: 1.5px solid #393e4a;
  background: #20232a;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border 0.18s, box-shadow 0.18s;
  margin: 0 auto;
  box-shadow: 0 1px 4px #0003;
  position: relative;
  z-index: 1;
}
.commands-search-input:focus {
  border-color: #ffd600;
  box-shadow: 0 2px 8px #ffd60022;
}


@media (max-width: 1024px) {
  .commands-container > .commands-sidebar:last-child {
    display: none;
  }
}


.commands-title-highlight {
  width: 100%;
  max-width: 900px;
  margin-bottom: 2.2rem;
  padding: 0.9rem 0;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: transparent;
  border-bottom: 1.5px solid #393e4a;
  border-radius: 0;
  box-shadow: none;
  letter-spacing: 0.5px;
}


.premium-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 0.5rem;
  margin-bottom: 0;
  vertical-align: middle;
  opacity: 0.85;
  filter: grayscale(0) brightness(1.1);
  background: none;
  border-radius: 4px;
  box-shadow: none;
  transition: opacity 0.15s, filter 0.18s;
  position: relative;
  top: -1px;
}

.premium-btn .premium-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  filter: brightness(10) grayscale(1) drop-shadow(0 0 4px rgba(0,0,0,0.5));
  position: static;
}

.command-item[data-premium] {
  border-color: #ffd600;
  background: linear-gradient(90deg, #23283a 85%, #ffd60018 100%);
  position: relative;
}

.command-item[data-premium]:hover .premium-icon {
  opacity: 1;
  filter: grayscale(0) brightness(1.15);
}


.category-mini-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  margin: 2.1rem 0 0.7rem 0;
  padding: 0 0 0.2rem 0.2rem;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  border-radius: 0;
  text-transform: capitalize;
  list-style: none;
  pointer-events: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.category-mini-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #fff;
  opacity: 0.13;
  margin-left: 0.7rem;
  border: none;
  border-radius: 1px;
}

@keyframes fade-slide-in-left {
  from { opacity: 0; transform: translateX(-32px) scale(0.98);}
  to   { opacity: 1; transform: translateX(0) scale(1);}
}
@keyframes fade-slide-in-right {
  from { opacity: 0; transform: translateX(32px) scale(0.98);}
  to   { opacity: 1; transform: translateX(0) scale(1);}
}
@keyframes fade-slide-in-up {
  from { opacity: 0; transform: translateY(32px) scale(0.98);}
  to   { opacity: 1; transform: translateY(0) scale(1);}
}

@keyframes sidebar-slide-in-left {
  from { opacity: 0; transform: translateX(-80px);}
  to   { opacity: 1; transform: translateX(0);}
}
@keyframes sidebar-slide-in-right {
  from { opacity: 0; transform: translateX(80px);}
  to   { opacity: 1; transform: translateX(0);}
}

.commands-sidebar {
  animation: sidebar-slide-in-left 0.7s cubic-bezier(.4,0,.2,1) both;
}

.commands-container > .commands-sidebar:last-child {
  animation: sidebar-slide-in-right 0.7s cubic-bezier(.4,0,.2,1) both;
}


.cmd-toggle {
  display: none;
}

.cmd-extra {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.cmd-toggle:checked + .cmd-label .cmd-extra {
  max-height: 300px;
  padding: 0.5rem 1rem;
}

.cmd-label {
  display: block;
  cursor: pointer;
}

/* Warning */
.warning-banner {
    margin: 10px 0;
    font-family: sans-serif;
}

.warning-banner strong {
    color: red;
    text-transform: uppercase;
}

.warning-banner code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.warning-banner u {
    text-decoration: underline;
}

/* Sidebar Helper */
.sidebar-wrapper {
  width: 100%;
}

.syntax-block {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.syntax-header {
  font-size: 1.04rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-align: center;
  color: #fff;
}

.syntax-item {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #bfc7d5;
}

.syntax-item code {
  background: #2d3139;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffd600;
  font-family: monospace;
}

.sidebar-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-tips li {
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.tip-label {
  color: #ffd600;
  font-weight: bold;
  margin-right: 4px;
}

.cmd-emoji {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
  vertical-align: -0.25em;
  margin-right: 0.3em;
}

.command-item[data-premium="lite"] {
  border-color: #4fb6ff;
  background: linear-gradient(90deg, #23283a 85%, #4fb6ff18 100%);
}

.cmd-badge {
  margin-left: 0.5rem;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(88, 101, 242, 0.2);
  border: 1px solid rgba(88, 101, 242, 0.5);
  color: #c9cdfb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.commands-empty {
  list-style: none;
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
.commands-content {
  min-width: 0;
}

.command-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
}

@media (max-width: 1200px) {
  .commands-sidebar {
    width: 220px;
  }

  .commands-container > .commands-sidebar:last-child {
    min-width: 220px;
  }
}

@media (max-width: 860px) {
  .commands-container {
    flex-direction: column;
    margin-top: 70px;
  }

  .commands-container > .commands-sidebar:first-child {
    position: sticky;
    top: 70px;
    z-index: 20;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    padding: 12px 16px 10px;
    overflow: visible;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  }

  .commands-search-box {
    margin-bottom: 10px;
  }

  .commands-search-input {
    width: 100%;
    padding-left: 46px;
    box-sizing: border-box;
  }

  .sidebar-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .sidebar-list::-webkit-scrollbar {
    display: none;
  }

  .sidebar-item {
    flex: none;
    width: auto;
    margin: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background-color: #2b3046;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .sidebar-item::before {
    display: none;
  }

  .sidebar-item .cat-count {
    margin-left: 4px;
    padding: 0;
  }

  .commands-content {
    padding: 1.25rem 16px 3rem;
  }

  .commands-container > .commands-sidebar:last-child {
    display: flex;
    position: static;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    border-left: none;
    border-top: 2px solid #393e4a;
    padding: 1.5rem 16px 2rem;
    animation: none;
  }

  /* Mobile entrance */
  .commands-container:not(.ready) > .commands-sidebar:first-child,
  .commands-container:not(.ready) .commands-title-highlight {
    opacity: 0;
    animation: none;
  }

  .commands-container:not(.ready) .commands-content {
    min-height: 100vh;
  }

  .commands-container.ready > .commands-sidebar:first-child {
    animation: commands-bar-in 0.5s ease backwards;
  }

  .commands-content {
    animation: none;
  }

  .command-item.hidden {
    max-height: none;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border-width: 1px;
    transform: translateY(14px);
    transition: none;
  }

  .command-item:not(.hidden) {
    transition: background 0.2s, box-shadow 0.2s;
    will-change: transform, opacity;
    animation: commands-item-in 0.55s cubic-bezier(.22,1,.36,1) backwards;
  }

  .commands-container.ready .commands-title-highlight {
    will-change: transform, opacity;
    animation: commands-item-in 0.55s cubic-bezier(.22,1,.36,1) 0.05s backwards;
  }

  .commands-list > .command-item:not(.hidden):nth-child(1) { animation-delay: 0.10s; }
  .commands-list > .command-item:not(.hidden):nth-child(2) { animation-delay: 0.16s; }
  .commands-list > .command-item:not(.hidden):nth-child(3) { animation-delay: 0.22s; }
  .commands-list > .command-item:not(.hidden):nth-child(4) { animation-delay: 0.28s; }
  .commands-list > .command-item:not(.hidden):nth-child(5) { animation-delay: 0.34s; }
  .commands-list > .command-item:not(.hidden):nth-child(6) { animation-delay: 0.40s; }
}

@keyframes commands-bar-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes commands-item-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .command-item .command-name {
    flex-basis: 100%;
    margin-bottom: 4px;
  }

  .commands-title-highlight {
    font-size: 1.6rem;
  }
}

.sidebar-item .cmd-emoji {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  vertical-align: middle;
}

.category-mini-title .cmd-emoji {
  width: 34px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}


@media (max-width: 768px) {
  .command-item.hidden {
    padding: 0.75rem 1rem;
  }
}
