:root {
  color-scheme: dark;
  --bg0: #07070c;
  --bg1: #0b0b13;
  --bg2: #0f0f1a;
  --panel: rgba(16, 16, 28, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f0ff;
  --muted: rgba(245, 240, 255, 0.62);
  --purple: #a855f7;
  --purple2: #e879f9;
  --red: #ff2b6b;
  --red2: #ff3b30;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji";
  background: radial-gradient(1200px 900px at 10% 8%, rgba(168, 85, 247, 0.32), transparent 60%),
    radial-gradient(900px 700px at 85% 15%, rgba(255, 43, 107, 0.22), transparent 62%),
    radial-gradient(1100px 800px at 75% 90%, rgba(232, 121, 249, 0.12), transparent 55%),
    linear-gradient(135deg, var(--bg0), var(--bg2));
  color: var(--text);
  overflow: hidden;
}

.bg-orbit {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(circle at 20% 65%, rgba(168, 85, 247, 0.16), transparent 45%),
    radial-gradient(circle at 80% 35%, rgba(255, 43, 107, 0.14), transparent 46%);
  filter: blur(0.2px);
  opacity: 0.9;
}

.app {
  height: 100vh;
  width: 100vw;
  display: grid;
  grid-template-columns: 84px 320px 1fr 320px;
  position: relative;
  z-index: 1;
}

.rail {
  background: linear-gradient(180deg, rgba(16, 16, 30, 0.92), rgba(10, 10, 16, 0.92));
  border-right: 1px solid rgba(168, 85, 247, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  gap: 14px;
}

.rail-home {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--text);
  background: radial-gradient(circle at 30% 20%, rgba(232, 121, 249, 0.25), transparent 50%),
    linear-gradient(135deg, rgba(168, 85, 247, 0.85), rgba(90, 35, 180, 0.85));
  box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.28), 0 0 24px rgba(168, 85, 247, 0.32);
  transform: translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.rail-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.38), 0 0 34px rgba(168, 85, 247, 0.46);
}

.rail-home-mark {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 12px;
}

.rail-sep {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  flex: 1;
  width: 100%;
  overflow: auto;
  padding: 2px 0;
}

.server {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
}

.server::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 12px;
  border-radius: 99px;
  background: rgba(232, 121, 249, 0);
  box-shadow: 0 0 0 rgba(232, 121, 249, 0);
  transition: height 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.server:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 121, 249, 0.26);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.2), 0 0 24px rgba(168, 85, 247, 0.25);
}

.server.is-active {
  border-color: rgba(232, 121, 249, 0.42);
  box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.24), 0 0 28px rgba(168, 85, 247, 0.42);
  background: radial-gradient(circle at 30% 20%, rgba(232, 121, 249, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(16, 16, 28, 0.6));
}

.server.is-active::after {
  height: 30px;
  background: linear-gradient(180deg, rgba(232, 121, 249, 0.95), rgba(255, 43, 107, 0.85));
  box-shadow: 0 0 18px rgba(232, 121, 249, 0.55);
}

.server-mark {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.server-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 43, 107, 0.7);
}

.rail-action {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px dashed rgba(232, 121, 249, 0.4);
  background: rgba(255, 255, 255, 0.02);
  color: var(--purple2);
  font-size: 22px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.rail-action:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 43, 107, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 43, 107, 0.18), 0 0 22px rgba(168, 85, 247, 0.28);
}

.sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(168, 85, 247, 0.16);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.sidebar-top {
  padding: 18px 18px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.server-title {
  font-weight: 800;
  letter-spacing: 0.4px;
}

.server-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  display: inline-block;
}

.dot--online {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
}

.dot--idle {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.dot--dnd {
  background: var(--red2);
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.55);
}

.dot--off {
  background: rgba(148, 163, 184, 0.65);
}

.sidebar-scroll {
  padding: 14px 12px 12px;
  overflow: auto;
  flex: 1;
}

.category {
  margin-bottom: 14px;
}

.category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(232, 121, 249, 0.8);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 8px 8px;
}

.cat-add {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(232, 121, 249, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 121, 249, 0.9);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cat-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

.channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  cursor: pointer;
  color: rgba(245, 240, 255, 0.86);
  transition: background 140ms ease, box-shadow 140ms ease;
  position: relative;
}

.channel:hover {
  background: rgba(168, 85, 247, 0.14);
}

.channel.is-active {
  background: rgba(168, 85, 247, 0.22);
  box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.18), 0 0 22px rgba(168, 85, 247, 0.22);
}

.channel-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: rgba(232, 121, 249, 0.92);
  font-weight: 800;
}

.channel-name {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.channel-badge {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 43, 107, 0.7);
}

.userbar {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(16, 16, 28, 0.65), rgba(16, 16, 28, 0.88));
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.8px;
  font-size: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.avatar--me {
  background: radial-gradient(circle at 30% 20%, rgba(232, 121, 249, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(168, 85, 247, 0.72), rgba(44, 20, 104, 0.78));
  box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.18), 0 0 20px rgba(168, 85, 247, 0.25);
}

.avatar--bot {
  background: radial-gradient(circle at 30% 20%, rgba(255, 43, 107, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(255, 43, 107, 0.72), rgba(72, 11, 26, 0.8));
  box-shadow: 0 0 0 1px rgba(255, 43, 107, 0.18), 0 0 20px rgba(255, 43, 107, 0.24);
}

.userbar-meta {
  flex: 1;
  min-width: 0;
}

.userbar-name {
  font-weight: 800;
  font-size: 13px;
}

.userbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 240, 255, 0.92);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 121, 249, 0.22);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.22);
}

.icon-btn--red:hover {
  border-color: rgba(255, 43, 107, 0.34);
  box-shadow: 0 0 18px rgba(255, 43, 107, 0.2);
}

.icon-btn--purple:hover {
  border-color: rgba(232, 121, 249, 0.34);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.28);
}

.main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid rgba(255, 43, 107, 0.12);
  background: rgba(7, 7, 12, 0.55);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 18, 0.55);
}

.topbar-left {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, 0.22);
  background: rgba(168, 85, 247, 0.14);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.18);
  position: relative;
}

.pill-icon {
  color: rgba(232, 121, 249, 0.95);
  font-weight: 900;
}

.pill-name {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.pill-spark {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(232, 121, 249, 1), rgba(255, 43, 107, 0.9));
  box-shadow: 0 0 18px rgba(232, 121, 249, 0.5);
}

.topic {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.chat {
  overflow: auto;
  padding: 18px;
}

.chat-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.msg:hover {
  border-color: rgba(232, 121, 249, 0.18);
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.12);
}

.msg.is-new {
  animation: slideIn 180ms ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.8px;
}

.msg-avatar--user {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(44, 20, 104, 0.85));
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
}

.msg-avatar--bot {
  background: linear-gradient(135deg, rgba(255, 43, 107, 0.9), rgba(72, 11, 26, 0.85));
  box-shadow: 0 0 18px rgba(255, 43, 107, 0.22);
}

.msg-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.msg-author {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.msg-author--bot {
  color: rgba(255, 43, 107, 0.95);
  text-shadow: 0 0 14px rgba(255, 43, 107, 0.28);
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 43, 107, 0.28);
  background: rgba(255, 43, 107, 0.14);
  color: rgba(255, 190, 210, 0.92);
}

.msg-time {
  color: rgba(245, 240, 255, 0.45);
  font-size: 12px;
}

.msg-body {
  margin-top: 6px;
  color: rgba(245, 240, 255, 0.88);
  line-height: 1.55;
}

.msg-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 240, 255, 0.86);
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 121, 249, 0.22);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.18);
}

.chip.is-hot {
  border-color: rgba(255, 43, 107, 0.28);
  box-shadow: 0 0 16px rgba(255, 43, 107, 0.16);
}

.typing {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, 0.18);
  background: rgba(168, 85, 247, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 99px;
  background: rgba(245, 240, 255, 0.75);
  animation: bounce 900ms infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.typing-dots span:nth-child(3) {
  animation-delay: 240ms;
  margin-right: 0;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.typing-text {
  color: rgba(245, 240, 255, 0.7);
  font-size: 12px;
}

.composer {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 18, 0.62);
  backdrop-filter: blur(16px);
}

.composer-tray {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 6px 0;
}

.composer-add {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(232, 121, 249, 0.2);
  background: rgba(168, 85, 247, 0.1);
  color: rgba(232, 121, 249, 0.95);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.composer-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.22);
}

.composer-input {
  flex: 1;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 240, 255, 0.92);
  padding: 0 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer-input:focus {
  border-color: rgba(232, 121, 249, 0.32);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

.composer-send {
  height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(232, 121, 249, 0.24);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(232, 121, 249, 0.66));
  color: rgba(10, 10, 18, 0.95);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.composer-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.38);
}

.members {
  display: flex;
  flex-direction: column;
  background: rgba(16, 10, 16, 0.62);
  border-left: 1px solid rgba(255, 43, 107, 0.18);
  backdrop-filter: blur(16px);
}

.members-top {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.members-title {
  font-weight: 900;
  letter-spacing: 0.4px;
}

.members-count {
  margin-top: 6px;
  color: rgba(255, 190, 210, 0.7);
  font-size: 12px;
}

.members-scroll {
  padding: 14px 12px 12px;
  overflow: auto;
  flex: 1;
}

.member-group {
  margin-bottom: 14px;
}

.member-head {
  padding: 8px 8px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255, 190, 210, 0.78);
}

.member {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.member:hover {
  border-color: rgba(255, 43, 107, 0.16);
  box-shadow: 0 0 22px rgba(255, 43, 107, 0.12);
}

.member-meta {
  min-width: 0;
  flex: 1;
}

.member-name {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.member-role {
  margin-top: 4px;
  color: rgba(245, 240, 255, 0.55);
  font-size: 12px;
}

.role--owner {
  color: rgba(255, 190, 210, 0.92);
}

.role--admin {
  color: rgba(232, 121, 249, 0.92);
}

.role--dev {
  color: rgba(245, 240, 255, 0.74);
}

.role--bot {
  color: rgba(255, 43, 107, 0.9);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, 0.22);
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: rgba(245, 240, 255, 0.9);
  font-size: 13px;
  z-index: 20;
}

.drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(440px, calc(100vw - 24px));
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 18, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.7);
  z-index: 30;
  display: none;
  overflow: hidden;
}

.drawer.is-open {
  display: grid;
  grid-template-rows: auto auto 1fr;
  animation: drawerIn 160ms var(--ease-out);
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title {
  font-weight: 950;
  letter-spacing: 0.2px;
}

.drawer-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(245, 240, 255, 0.6);
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-tab {
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 240, 255, 0.82);
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.drawer-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.18);
  border-color: rgba(232, 121, 249, 0.22);
}

.drawer-tab.is-active {
  border-color: rgba(232, 121, 249, 0.26);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.drawer-body {
  overflow: auto;
  padding: 14px 16px 18px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.asset {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.asset:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 121, 249, 0.2);
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.14);
}

.asset-media {
  aspect-ratio: 16 / 10;
  width: 100%;
  display: block;
  background: rgba(0, 0, 0, 0.2);
}

.asset-meta {
  padding: 10px 10px 12px;
}

.asset-title {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.asset-sub {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(245, 240, 255, 0.6);
}

.asset-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.2px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.asset-tag.is-red {
  border-color: rgba(255, 43, 107, 0.2);
  background: rgba(255, 43, 107, 0.08);
}

.asset-tag.is-purple {
  border-color: rgba(232, 121, 249, 0.2);
  background: rgba(168, 85, 247, 0.09);
}

.tray-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.tray-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 121, 249, 0.2);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.12);
}

.tray-thumb {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.tray-name {
  font-weight: 850;
  font-size: 12px;
  color: rgba(245, 240, 255, 0.86);
}

.tray-x {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 240, 255, 0.7);
}

.att {
  margin-top: 10px;
  position: relative;
  display: block;
  width: min(540px, 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.att + .att {
  margin-top: 10px;
}

.att-media {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.att-foot {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.att-title {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(245, 240, 255, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.att-meta {
  font-size: 11px;
  color: rgba(245, 240, 255, 0.55);
}

.att-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.att-play span {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: rgba(10, 10, 18, 0.95);
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.9), rgba(255, 43, 107, 0.82));
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.24);
  font-weight: 950;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.overlay-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 18, 0.9);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.overlay-top {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-title {
  font-weight: 950;
  letter-spacing: 0.2px;
}

.overlay-body {
  overflow: auto;
  padding: 16px;
}

.viewer {
  display: grid;
  gap: 12px;
}

.viewer-media {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.player {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.player-top {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.2);
}

.player-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.player-center button {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  border: 1px solid rgba(232, 121, 249, 0.24);
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.86), rgba(255, 43, 107, 0.78));
  color: rgba(10, 10, 18, 0.95);
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(168, 85, 247, 0.24);
  transition: transform 140ms var(--ease-out);
}

.player-center button:hover {
  transform: translateY(-1px) scale(1.04);
}

.player-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
}

.player-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.9), rgba(255, 43, 107, 0.85));
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.22);
}

.player-meta {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: rgba(245, 240, 255, 0.7);
  font-size: 12px;
}

@media (max-width: 980px) {
  .drawer {
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 84px 300px 1fr 280px;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 84px 1fr;
    grid-template-rows: auto auto;
    height: auto;
    overflow: visible;
  }

  .sidebar,
  .members {
    display: none;
  }

  .main {
    border-right: none;
  }
}

:root {
  --ease-out: cubic-bezier(0.2, 0.9, 0.2, 1);
  --ease-inout: cubic-bezier(0.45, 0, 0.15, 1);
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid rgba(232, 121, 249, 0.7);
  outline-offset: 2px;
}

.server,
.channel,
.icon-btn,
.composer-add,
.composer-send,
.chip,
.rail-action {
  -webkit-tap-highlight-color: transparent;
}

.server:active,
.channel:active,
.icon-btn:active,
.composer-add:active,
.composer-send:active,
.chip:active,
.rail-action:active {
  transform: translateY(0) scale(0.985);
}

.sidebar,
.members,
.main {
  will-change: transform;
}

.topbar {
  gap: 14px;
}

.topbar-actions .icon-btn {
  position: relative;
}

.icon-btn {
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), border-color 140ms var(--ease-out),
    background 140ms var(--ease-out);
}

.composer-input {
  letter-spacing: 0.1px;
}

.chat {
  position: relative;
  scroll-behavior: smooth;
}

.chat-inner {
  transition: opacity 140ms var(--ease-out), transform 180ms var(--ease-out), filter 180ms var(--ease-out);
}

.chat-inner.is-switching {
  opacity: 0;
  transform: translateY(6px);
  filter: blur(2px);
}

.jump {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, 0.22);
  background: rgba(10, 10, 18, 0.7);
  color: rgba(245, 240, 255, 0.92);
  cursor: pointer;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.jump:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 43, 107, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 43, 107, 0.14), 0 18px 64px rgba(0, 0, 0, 0.55);
}

.jump-count {
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: rgba(10, 10, 18, 0.95);
  background: linear-gradient(135deg, rgba(255, 43, 107, 0.95), rgba(255, 59, 48, 0.95));
  box-shadow: 0 0 18px rgba(255, 43, 107, 0.28);
}

.msg {
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out), transform 140ms var(--ease-out),
    background 140ms var(--ease-out);
}

.msg:hover {
  transform: translateY(-1px);
}

.msg-actions {
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.chip.is-active {
  border-color: rgba(232, 121, 249, 0.3);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.16);
}

.chip.is-pop {
  animation: pop 160ms var(--ease-out);
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.channel-badge {
  display: none;
}

.channel-unread {
  margin-left: auto;
  min-width: 22px;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.2px;
  color: rgba(10, 10, 18, 0.95);
  background: linear-gradient(135deg, rgba(255, 43, 107, 0.95), rgba(255, 59, 48, 0.95));
  box-shadow: 0 0 14px rgba(255, 43, 107, 0.22);
}

.server-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 11px;
  color: rgba(10, 10, 18, 0.95);
  background: linear-gradient(135deg, rgba(255, 43, 107, 0.95), rgba(255, 59, 48, 0.95));
  box-shadow: 0 0 14px rgba(255, 43, 107, 0.22);
}

.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 18, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
  color: rgba(245, 240, 255, 0.92);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.2px;
  max-width: 320px;
  z-index: 40;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

.tooltip.is-visible {
  animation: tooltipIn 120ms var(--ease-out);
}

@keyframes tooltipIn {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.42), rgba(255, 43, 107, 0.3));
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.6), rgba(255, 43, 107, 0.44));
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

