:root {
  --bg: #000;
  --panel: #0d0e13;
  --panel-soft: #15161d;
  --line: rgba(255, 255, 255, .08);
  --text: #f5f6f2;
  --muted: #a9adba;
  --dim: #6f7482;
  --yellow: #ffc31c;
  --blue: #42d7ff;
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.commands-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 5vw;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.commands-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #eef7fb;
  font-weight: 800;
}

.commands-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 195, 28, .32));
}

.commands-back {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 6px;
  color: #061014;
  background: var(--yellow);
  font-size: .78rem;
  font-weight: 900;
}

.commands-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.commands-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #08090d;
  padding: 34px 14px;
}

.sidebar-list {
  display: grid;
  gap: 10px;
}

.sidebar-list p {
  margin: 22px 0 7px;
  color: var(--dim);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 7px;
  color: #c5cad8;
  font-size: .88rem;
  font-weight: 700;
}

.sidebar-list a:hover,
.sidebar-list a.is-active {
  color: #fff;
  background: var(--panel-soft);
}

.sidebar-list span {
  color: var(--dim);
  font-weight: 900;
}

.commands-doc {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 78px 64px 104px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.65rem, 5vw, 5.25rem);
  line-height: .95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.doc-lead {
  max-width: 880px;
  margin-bottom: 34px;
  color: #d7daea;
  font-size: 1.15rem;
  line-height: 1.65;
}

.doc-panel,
.command-card,
.options-block,
.preview-block,
.flow-grid article,
.screenshot-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  animation: doc-rise .55s ease both;
}

.doc-panel {
  margin-bottom: 28px;
  padding: 28px;
}

.doc-panel p,
.options-block p,
.preview-block p,
.command-card p,
.flow-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.flow-grid article {
  padding: 22px;
}

.flow-grid span {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: var(--yellow);
  font-weight: 900;
}

.flow-grid h2 {
  margin-bottom: 9px;
  font-size: 1.1rem;
}

.command-list {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.command-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
}

code {
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  padding: 3px 7px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92em;
}

.command-card code {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--yellow);
}

.command-card p {
  margin-bottom: 0;
}

.command-card > span {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.options-block,
.preview-block {
  margin-top: 28px;
  padding: 28px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.option-grid details {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 6px;
  background: rgba(255, 255, 255, .045);
}

.option-grid summary {
  display: block;
  min-width: 0;
  cursor: pointer;
  padding: 8px 9px;
}

.option-grid summary::-webkit-details-marker {
  display: none;
}

.option-grid details[open] {
  background: rgba(255, 195, 28, .08);
  border-color: rgba(255, 195, 28, .28);
}

.option-grid details p {
  margin: 0;
  padding: 0 10px 10px;
  color: #c9cdd8;
  font-size: .86rem;
  line-height: 1.45;
}

.option-grid code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin-top: 0;
  padding: 18px;
  border-radius: 8px;
  background: #22232a;
}

.screenshot-frame {
  margin-top: 18px;
  overflow: hidden;
  background: #16171d;
}

.screenshot-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #d8dce9;
  background: #0f1016;
  font-size: .78rem;
}

.screenshot-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 14px 0 #3b3d48, 28px 0 #3b3d48;
}

.preview-logo img {
  object-fit: contain;
}

.preview-card {
  max-width: 720px;
  padding: 18px;
  border-left: 4px solid var(--yellow);
  border-radius: 4px;
  background: #2b2c33;
  animation: ticket-glow 3.8s ease-in-out infinite;
}

.preview-card strong {
  font-size: .84rem;
}

.preview-card h3 {
  margin: 12px 0 8px;
}

.preview-card b {
  display: block;
  margin-top: 12px;
}

.preview-card button {
  min-height: 36px;
  margin-top: 14px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: #3b3c44;
  font: inherit;
  font-weight: 800;
}

.ticket-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 14px 0;
}

.ticket-fields b,
.ticket-fields span {
  display: block;
}

.ticket-fields span {
  margin-top: 4px;
  color: #dce0ee;
}

.preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.preview-actions .danger {
  background: #e43f55;
}

@media (max-width: 520px) {
  .commands-nav {
    padding-inline: 20px;
  }
}

@media (max-width: 900px) {
  .commands-shell {
    grid-template-columns: 1fr;
  }

  .commands-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .sidebar-list p {
    display: none;
  }

  .sidebar-list a {
    flex: 0 0 auto;
  }

  .commands-doc {
    padding: 42px 20px 70px;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .commands-back {
    min-height: 34px;
    padding-inline: 12px;
    font-size: .72rem;
  }

  .command-card {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .discord-preview {
    grid-template-columns: 1fr;
  }

  .ticket-fields {
    grid-template-columns: 1fr;
  }
}

@keyframes doc-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticket-glow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 195, 28, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 195, 28, .11);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
