:root {
  --bt-shell-blue: var(--bt-accent, #0987f7);
  --bt-shell-blue-deep: var(--bt-accent-deep, #0867c7);
  --bt-shell-accent-rgb: var(--bt-accent-rgb, 9, 135, 247);
  --bt-shell-bg: #080c12;
  --bt-shell-panel: #0d131c;
  --bt-shell-line: rgba(255, 255, 255, .08);
  --bt-shell-muted: #9ba6b6;
}

html { scroll-behavior: smooth; }

body.bt-shell-page {
  display: block;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 82% 7%, rgba(var(--bt-shell-accent-rgb), .13), transparent 30rem), var(--bt-shell-bg);
  color: #f8fafc;
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.bt-shell-skip {
  position: fixed;
  top: -80px;
  left: 260px;
  z-index: 10000;
  padding: 11px 16px;
  border-radius: 9px;
  background: #fff;
  color: #07111e;
  font-weight: 800;
  text-decoration: none;
}
.bt-shell-skip:focus { top: 12px; }

.bt-shell-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  display: flex;
  box-sizing: border-box;
  height: 72px;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  padding: 0 22px;
  border-bottom: 1px solid var(--bt-shell-line);
  background: rgba(7, 11, 17, .95);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

.bt-shell-brand {
  display: flex;
  width: 184px;
  height: 50px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}
.bt-shell-brand img {
  display: block;
  object-fit: contain;
  object-position: left center;
}
.bt-shell-brand-icon { width: 34px; height: 34px; }
.bt-shell-brand-wordmark { width: 145px; height: 38px; }

.bt-shell-main-nav { display: flex; min-width: 0; align-items: center; gap: 4px; }
.bt-shell-main-nav a,
.bt-shell-sidebar a,
.bt-shell-profile {
  color: #dce3ec;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.bt-shell-main-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.bt-shell-main-nav a:hover,
.bt-shell-main-nav a.is-active {
  background: linear-gradient(135deg, var(--bt-shell-blue-deep), var(--bt-shell-blue));
  color: #fff;
}

.bt-shell-search {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  margin-left: auto;
  transition: width .22s ease, flex-basis .22s ease;
}
.bt-shell-search.is-open {
  width: clamp(230px, 25vw, 350px);
  flex-basis: clamp(230px, 25vw, 350px);
}
.bt-shell-search input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 11px;
  outline: 0;
  background: #0e131d;
  box-shadow: none;
  color: #eef3f9;
  font: inherit;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, padding .22s ease;
}
.bt-shell-search.is-open input { padding: 0 48px 0 17px; opacity: 1; pointer-events: auto; }
.bt-shell-search input::placeholder { color: #8993a3; }
.bt-shell-search input:focus { border-color: var(--bt-shell-blue); box-shadow: 0 0 0 3px rgba(var(--bt-shell-accent-rgb), .15); }
.bt-shell-search button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 11px;
  background: #0e131d;
  color: #f4f7fb;
  font-size: 25px;
  cursor: pointer;
}
.bt-shell-search button svg { fill: currentColor; }
.bt-shell-search.is-open button { border-color: transparent; background: transparent; }

.bt-shell-profile {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  white-space: nowrap;
}
.bt-shell-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid rgba(var(--bt-shell-accent-rgb), .45);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--bt-profile-color), #111827);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .35);
  color: #fff;
}

.bt-shell-sidebar {
  position: fixed;
  inset: 72px auto 0 0;
  z-index: 900;
  display: flex;
  box-sizing: border-box;
  width: 235px;
  flex-direction: column;
  padding: 26px 14px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--bt-shell-line);
  background: linear-gradient(180deg, #0c121a 0%, #090e15 100%);
}
.bt-shell-sidebar nav { display: grid; gap: 7px; }
.bt-shell-sidebar a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 15px;
}
.bt-shell-sidebar a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(2px); }
.bt-shell-sidebar a.is-active {
  background: linear-gradient(135deg, var(--bt-shell-blue-deep), var(--bt-shell-blue));
  box-shadow: 0 7px 18px rgba(var(--bt-shell-accent-rgb), .25);
  color: #fff;
  font-weight: 750;
}
.bt-shell-sidebar-label {
  margin: 25px 12px 11px;
  padding-top: 18px;
  border-top: 1px solid var(--bt-shell-line);
  color: #8590a1;
  font-size: 13px;
}
.bt-shell-category-nav { gap: 3px !important; }
.bt-shell-category-nav a { min-height: 40px; }
.bt-shell-sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--bt-shell-line); }

.bt-shell-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.bt-shell-page > .fixed-header,
body.bt-shell-page > #back,
body.bt-shell-page > #home,
body.bt-shell-page > #reload,
body.bt-shell-page > .slider-container,
body.bt-shell-page > div[style="height: 50px;"] { display: none !important; }

body.bt-shell-page > main {
  box-sizing: border-box;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: calc(100vh - 72px);
  margin: 72px 0 0 235px !important;
  padding: 30px clamp(20px, 3vw, 48px) 60px !important;
  background: transparent;
  color: #eef2f7;
  text-align: left;
}
body.bt-shell-page > main > h1:first-child,
body.bt-shell-page > main > h2:first-child { margin-top: 0; color: #f8fafc; letter-spacing: -.035em; }
body.bt-shell-page main a { color: var(--bt-shell-blue); }
body.bt-shell-page main hr { border-color: var(--bt-shell-line); }

body.bt-shell-page main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
body.bt-shell-page main select,
body.bt-shell-page main textarea {
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  outline: 0;
  background: #0f1722;
  color: #edf3fa;
  font-family: inherit;
}
body.bt-shell-page main input:focus,
body.bt-shell-page main select:focus,
body.bt-shell-page main textarea:focus { border-color: var(--bt-shell-blue); box-shadow: 0 0 0 3px rgba(var(--bt-shell-accent-rgb), .13); }
body.bt-shell-page main input[type="submit"],
body.bt-shell-page main button[type="submit"],
body.bt-shell-page main .btn,
body.bt-shell-page main .fbtn {
  border-color: transparent;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--bt-shell-blue-deep), var(--bt-shell-blue));
  box-shadow: 0 8px 20px rgba(var(--bt-shell-accent-rgb), .2);
  color: #fff;
}
body.bt-shell-page main table {
  overflow: hidden;
  border-color: var(--bt-shell-line);
  border-radius: 12px;
  background: rgba(13, 19, 28, .88);
  color: #e8edf4;
}
body.bt-shell-page main th { background: rgba(255, 255, 255, .045); }
body.bt-shell-page main td,
body.bt-shell-page main th { border-color: var(--bt-shell-line); }
body.bt-shell-page .bt-floating-action { left: auto !important; right: 16px !important; }

@media (min-width: 701px) {
  body.bt-shell-page .bt-floating-discord { bottom: 39px !important; }
  body.bt-shell-page .bt-floating-scoreboard { bottom: 94px !important; }
  body.bt-shell-page .feedbackbutton { bottom: 149px !important; }
  body.bt-shell-page .bt-floating-suggest { bottom: 204px !important; }
  body.bt-shell-page .chatbutton { bottom: 264px !important; }
  body.bt-shell-page .bug-report-button { bottom: 319px !important; }
}

body.bt-shell-page > .bt-site-footer {
  width: auto;
  margin-left: 235px;
}

@media (max-width: 1260px) {
  .bt-shell-topbar { gap: 9px; padding: 0 16px; }
  .bt-shell-brand { width: 166px; }
  .bt-shell-brand-wordmark { width: 126px; }
  .bt-shell-main-nav a { padding: 0 8px; }
  .bt-shell-search.is-open { width: clamp(210px, 25vw, 300px); flex-basis: clamp(210px, 25vw, 300px); }
}

@media (max-width: 1100px) {
  .bt-shell-main-nav a:nth-child(2),
  .bt-shell-main-nav a:nth-child(3),
  .bt-shell-main-nav a:nth-child(4) { display: none; }
}

@media (max-width: 900px) {
  .bt-shell-sidebar { width: 78px; padding-inline: 10px; }
  .bt-shell-sidebar a { justify-content: center; padding: 0; font-size: 20px; }
  .bt-shell-sidebar a span,
  .bt-shell-sidebar-label { display: none; }
  .bt-shell-sidebar-bottom { margin-top: 20px; }
  body.bt-shell-page > main { margin-left: 78px !important; }
  body.bt-shell-page > .bt-site-footer { width: auto; margin-left: 78px; }
  .bt-shell-brand { width: 138px; }
  .bt-shell-brand-wordmark { width: 98px; }
  .bt-shell-profile > span:not(.bt-shell-avatar) { display: none; }
}

@media (max-width: 680px) {
  .bt-shell-topbar { height: 64px; padding: 0 12px; }
  .bt-shell-brand { width: 145px; }
  .bt-shell-brand-wordmark { width: 101px; }
  .bt-shell-main-nav { display: none; }
  .bt-shell-search { width: 42px; height: 42px; flex: 0 0 42px; margin-left: auto; }
  .bt-shell-search.is-open { width: auto; flex: 1 1 auto; }
  .bt-shell-search input { height: 42px; font-size: 14px; }
  .bt-shell-search button { width: 42px; height: 42px; }
  .bt-shell-sidebar { display: none; }
  body.bt-shell-page > main { margin: 64px 0 0 !important; padding: 22px 14px 48px !important; }
  body.bt-shell-page > .bt-site-footer { width: auto; margin-left: 0; }
  .bt-shell-profile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bt-shell-main-nav a,
  .bt-shell-sidebar a { transition: none; }
}
