.stage {
  position: relative;
  height: 620px;
  min-height: 620px;
  max-height: 620px;
  border-radius: 17px;
  overflow: hidden;
}

.stage .discord {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  border-radius: 17px;
  filter: none;
}

.channel-tree {
  overflow-y: auto;
  max-height: calc(100% - 70px);
  padding-bottom: 0.5rem;
}

.empty-hint {
  color: #72767d;
  font-size: 0.78rem;
  padding: 0.6rem 0.55rem;
  font-style: italic;
  transition: opacity 0.3s ease;
}

.empty-hint.hidden { display: none; }

.ch.pop,
.cat.pop {
  animation: chPop 0.45s ease both;
}

.ch.new-flash {
  background: rgba(176, 38, 255, 0.28) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 #b026ff;
}

@keyframes chPop {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Windows-style CMD overlay */
.cmd {
  position: absolute;
  right: 3.5%;
  left: auto;
  bottom: 4.5%;
  width: min(480px, 52%);
  height: min(430px, 78%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(12, 12, 12, 0.55);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid rgba(176, 38, 255, 0.35);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 40px rgba(176, 38, 255, 0.18);
  animation: cmdIn 0.6s ease both;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
}

@keyframes cmdIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cmd-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 32px;
  padding: 0 0.55rem 0 0.65rem;
  background: rgba(30, 30, 30, 0.7);
  border-bottom: 1px solid rgba(176, 38, 255, 0.2);
  color: #ddd;
  font-size: 0.72rem;
  user-select: none;
}

.cmd-icon {
  color: #b026ff;
  font-size: 0.85rem;
  line-height: 1;
}

.cmd-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-controls {
  display: flex;
  gap: 0.55rem;
  color: #aaa;
  font-size: 0.75rem;
}

.cmd-x { color: #f87171; }

.cmd-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.7rem 0.85rem 0.9rem;
  color: #e8e8e8;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  scrollbar-width: thin;
  scrollbar-color: #4a1d6b transparent;
}

.cmd-body .mag { color: #e879f9; }
.cmd-body .cyan { color: #22d3ee; }
.cmd-body .green { color: #4ade80; }
.cmd-body .yellow { color: #facc15; }
.cmd-body .white { color: #f5f5f5; }
.cmd-body .dim { color: #777; }
.cmd-body .prompt { color: #22d3ee; }
.cmd-body .caret {
  display: inline-block;
  width: 0.55ch;
  background: #ccc;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
  vertical-align: text-bottom;
  height: 1em;
}

@keyframes blink {
  50% { opacity: 0; }
}

.bot-tag {
  background: #5865f2 !important;
}

@media (max-width: 900px) {
  .cmd {
    width: min(94%, 480px);
    right: 3%;
    left: auto;
    height: min(48%, 320px);
    bottom: 3%;
  }
}
