/* Bots hub + Discord-Bot page. Header and footer stay in shell.css. */

.bots-hero {
  position: relative;
  padding: calc(var(--cdx-nav) + 1.35rem) 0 2.5rem;
  overflow: hidden;
}
.bots-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 42% at 82% 18%, rgba(61, 158, 255, 0.14), transparent 62%),
    var(--cdx-void);
  pointer-events: none;
}
.bots-hero .cdx-wrap { position: relative; }
.bots-hero .cdx-h1 { max-width: 20ch; }
.bots-hero .cdx-lead { max-width: 38rem; }

.bot-list {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 20.5rem);
  gap: 0.7rem;
  justify-content: start;
  width: min(100%, 20.5rem);
}
.bot-list > li {
  min-width: 0;
  display: flex;
}
.bot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin: 0;
  padding: 0.8rem 0.85rem 0.9rem;
  border: 1px solid var(--cdx-line-strong);
  border-radius: 0.8rem;
  background:
    radial-gradient(ellipse 110% 72% at 18% 0%, rgba(88, 101, 242, 0.32), transparent 60%),
    #10161f;
  color: var(--cdx-text);
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transition:
    border-color var(--cdx-fast) var(--cdx-ease),
    transform var(--cdx-fast) var(--cdx-ease),
    box-shadow var(--cdx-fast) var(--cdx-ease);
}
a.bot-card:hover,
a.bot-card:focus-visible {
  color: var(--cdx-text);
  border-color: rgba(94, 200, 255, 0.62);
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  text-decoration: none;
}
a.bot-card:focus-visible {
  outline: 2px solid var(--cdx-cyan);
  outline-offset: 3px;
}
.bot-card__logo {
  width: 4.6rem;
  height: 3.2rem;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 0.55rem;
  filter: drop-shadow(0 8px 14px rgba(88, 101, 242, 0.28));
}
.bot-card__logo--twitch {
  width: 2.35rem;
  height: 3.2rem;
  padding: 0.35rem 0 0.15rem;
  object-position: left center;
  filter: drop-shadow(0 8px 14px rgba(145, 70, 255, 0.32));
}
.bot-card h2 {
  margin: 0;
  font-family: var(--cdx-display);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.bot-card__t {
  margin: 0.28rem 0 0;
  color: var(--cdx-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.bot-card__k {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  margin: 0;
  padding: 0.1rem 0.38rem;
  border: 1px solid rgba(186, 148, 255, 0.48);
  border-radius: 999px;
  background: rgba(145, 70, 255, 0.16);
  color: #e4d4ff;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bot-card--soon {
  border-style: dashed;
  border-color: rgba(168, 130, 255, 0.42);
  background:
    radial-gradient(ellipse 110% 72% at 18% 0%, rgba(145, 70, 255, 0.22), transparent 60%),
    #141c28;
}
@media (prefers-reduced-motion: reduce) {
  a.bot-card:hover,
  a.bot-card:focus-visible { transform: none; }
}

.pay-note {
  margin: 1rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(94, 200, 255, 0.28);
  border-radius: 0.5rem;
  background: rgba(26, 111, 212, 0.12);
  color: var(--cdx-text);
  font-size: 0.92rem;
}

.bot-card .bot-stats {
  width: 100%;
  margin: 0.72rem 0 0;
  padding: 0.58rem 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.bot-stats__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.48rem;
}
.bot-stats__k {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cdx-cyan);
}
.bot-stats__live {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin: 0;
  color: var(--cdx-faint);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bot-stats__live::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #6d7888;
  flex: 0 0 auto;
}
.bot-stats.is-ready .bot-stats__live { color: #c9f6df; }
.bot-stats.is-ready .bot-stats__live::before {
  background: var(--cdx-good);
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.75);
}
.bot-stats.is-error .bot-stats__live { color: #f0b4b8; }
.bot-stats.is-error .bot-stats__live::before {
  background: var(--cdx-bad);
  box-shadow: none;
}
.bot-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
  margin: 0;
}
.bot-stats__m {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0.42rem 0.42rem 0.46rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.55rem;
  background: rgba(7, 9, 13, 0.42);
}
.bot-stats__m dt {
  order: 2;
  margin: 0.22rem 0 0;
  color: var(--cdx-muted);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.bot-stats__m dd {
  order: 1;
  margin: 0;
  color: var(--cdx-text);
  font-family: var(--cdx-display);
  font-size: 1.42rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bot-stats__m--free dd { color: #d5deea; }
.bot-stats__m--prem {
  border-color: rgba(94, 200, 255, 0.28);
  background:
    radial-gradient(ellipse 120% 90% at 0% 0%, rgba(94, 200, 255, 0.16), transparent 70%),
    rgba(26, 111, 212, 0.16);
}
.bot-stats__m--prem dt { color: #b7dcff; }
.bot-stats__m--prem dd { color: #f4fbff; }
.bot-stats__bar {
  display: flex;
  height: 0.28rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.bot-stats__bar span {
  flex: 0 0 auto;
  height: 100%;
  min-width: 0;
}
.bot-stats__bar span:first-child { background: rgba(169, 184, 204, 0.72); }
.bot-stats__bar span:last-child {
  background: linear-gradient(90deg, #3d9eff, #7d6cff);
}
@media (prefers-reduced-motion: no-preference) {
  .bot-stats.is-ready .bot-stats__live::before {
    animation: bot-stats-pulse 2.4s ease-in-out infinite;
  }
}
@keyframes bot-stats-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.back-bots {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  margin: 0 0 1rem;
  padding: 0 0.9rem;
  border: 1px solid var(--cdx-line-strong);
  border-radius: 999px;
  background: #121820;
  color: var(--cdx-text);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}
.back-bots:hover,
.back-bots:focus-visible {
  color: var(--cdx-text);
  border-color: var(--cdx-cyan);
  text-decoration: none;
}

.bots-band { padding-top: 0.2rem; }
.group-label {
  margin: 1.2rem 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cdx-cyan);
}
.group-label:first-child { margin-top: 0.2rem; }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.feat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--cdx-line);
  border-radius: 0.7rem;
  background:
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(61, 158, 255, 0.1), transparent 58%),
    #10161f;
}
.feat--wide { grid-column: span 2; }
.feat--full { grid-column: 1 / -1; }
.feat__ico {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.7rem;
  border-radius: 0.7rem;
  background: rgba(61, 158, 255, 0.14);
  border: 1px solid rgba(94, 200, 255, 0.18);
  font-size: 1.2rem;
  line-height: 1;
}
.feat__k {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cdx-cyan);
}
.chip {
  margin-left: 0.4rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 200, 255, 0.4);
  color: #b7dcff;
  letter-spacing: 0.08em;
  vertical-align: 0.12em;
}
.feat h3 {
  margin: 0;
  font-family: var(--cdx-display);
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.feat p {
  margin: 0.4rem 0 0;
  color: var(--cdx-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.srv-browser { height: auto; min-height: 0; }
.srv-browser .browser__body {
  height: auto;
  overflow: visible;
  flex: none;
}
.srv {
  display: grid;
  grid-template-columns: 3.4rem minmax(13rem, 16.5rem) minmax(0, 1fr);
  min-height: 26rem;
  background: #10161e;
  color: #d7e0ec;
  font-size: 0.78rem;
}
.srv__guilds {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.4rem;
  background: #0b1016;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.srv__g {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: #1a2433;
  color: #9eb0c6;
  font-family: var(--cdx-display);
  font-size: 0.68rem;
  font-weight: 700;
}
.srv__g--on {
  border-radius: 0.55rem;
  background: #1a6fd4;
  color: #fff;
}
.srv__chans {
  padding: 0.55rem 0.5rem 0.85rem;
  background: #121820;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.srv__cat,
.srv__ch,
.srv__voice { margin: 0; }
.srv__cat {
  margin: 0.62rem 0 0.12rem;
  padding: 0 0.4rem;
  color: #8b97a8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.srv__cat:first-of-type { margin-top: 0.35rem; }
.srv__ch,
.srv__voice {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.14rem 0.4rem;
  border-radius: 0.28rem;
  color: #c5d0de;
}
.srv__ch.is-on {
  background: rgba(61, 158, 255, 0.16);
  color: #fff;
}
.srv__tag {
  margin-left: 0.35rem;
  color: #8b97a8;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #f07178;
  box-shadow: 0 0 6px rgba(240, 113, 120, 0.45);
  flex: 0 0 auto;
}
.dot--on {
  background: #3ecf8e;
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.7);
}
.srv__stage {
  padding: 0.85rem 0.95rem 1rem;
  background:
    radial-gradient(ellipse 90% 55% at 0% 0%, rgba(61, 158, 255, 0.14), transparent 62%),
    #161d28;
}
.srv__stage h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}
.srv__embed {
  margin-top: 0.7rem;
  padding: 0.75rem 0.8rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  background: #10161e;
}
.srv__embed b {
  display: block;
  margin-bottom: 0.25rem;
  color: #f2f4f7;
  font-size: 0.84rem;
}
.srv__embed p {
  margin: 0;
  color: #b7c3d2;
  font-size: 0.78rem;
  line-height: 1.4;
}
.srv__btn {
  display: inline-flex;
  margin-top: 0.6rem;
  padding: 0.32rem 0.55rem;
  border-radius: 0.35rem;
  background: #2f8f5b;
  color: #f4fff8;
  font-size: 0.7rem;
  font-weight: 700;
}
.srv__note {
  margin: 0.75rem 0 0;
  color: #93a0b2;
  font-size: 0.72rem;
}

.role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}
.role-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.7rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #121820;
  color: #d5deea;
  font-size: 0.75rem;
}
.role-row i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex: 0 0 auto;
}
.quiet-line {
  margin: 0.7rem 0 0;
  max-width: 68ch;
  color: var(--cdx-faint);
  font-size: 0.84rem;
}

#discord,
#twitchbot { scroll-margin-top: calc(var(--cdx-nav) + 0.75rem); }

@media (max-width: 980px) {
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .feat--wide { grid-column: 1 / -1; }
  .srv { grid-template-columns: 3.1rem minmax(0, 1fr); }
  .srv__stage { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.06); }
}
@media (max-width: 720px) {
  .bots-hero .cdx-h1 { max-width: none; }
  .bot-list { grid-template-columns: minmax(0, 1fr); }
  .bot-stats__m { padding: 0.38rem 0.36rem 0.42rem; }
  .bot-stats__m dd { font-size: 1.28rem; }
  .bot-stats__m dt { font-size: 0.58rem; }
  .srv { grid-template-columns: 1fr; }
  .srv__guilds {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .srv__chans { border-right: 0; }
}
@media (max-width: 560px) {
  .feat-grid { grid-template-columns: 1fr; }
}
