@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #e6e7ed;
  background: #16171b;
  font-size: 14px;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: none;
  border-radius: 6px;
}
button:hover {
  background: #ffffff0c;
  color: #fff;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
textarea {
  outline: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #9299ff;
  outline-offset: 2px;
}
input:focus,
textarea:focus {
  border-color: #7982ff;
}
a {
  color: #879aff;
}
button.primary {
  background: #5865f2;
  color: white;
  font-weight: 700;
  padding: 12px 20px;
}
button.primary:hover {
  background: #4752c4;
}
[hidden] {
  display: none !important;
}
#app {
  height: 100dvh;
  display: grid;
  grid-template-columns: 72px 240px minmax(0, 1fr) 230px;
}
.servers {
  background: #101115;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.server {
  width: 48px;
  height: 48px;
  background: #22242c;
  border-radius: 16px;
  font-size: 30px;
  position: relative;
}
.server.active {
  background: #5865f2;
  color: #fff;
  border-radius: 16px;
}
.server.active:before {
  content: "";
  position: absolute;
  width: 4px;
  height: 32px;
  left: -12px;
  top: 8px;
  background: #fff;
  border-radius: 4px;
}
.server-line {
  height: 2px;
  width: 28px;
  background: #292a32;
}
.server.add {
  color: #4bca94;
  font-size: 28px;
}
.server-bottom {
  margin-top: auto;
}
.sidebar {
  background: #1d1e24;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.server-header {
  height: 57px;
  padding: 18px 18px;
  font-weight: 700;
  border-bottom: 1px solid #111217;
  box-shadow: 0 2px 5px #0002;
  display: flex;
  justify-content: space-between;
}
.chevron {
  color: #a9abb8;
}
.channel-scroll {
  padding: 16px 9px;
  overflow: auto;
  flex: 1;
}
.server-card {
  background: linear-gradient(125deg, #2f304b, #262636);
  border: 1px solid #41415d;
  margin: 0 3px 26px;
  padding: 15px 12px;
  border-radius: 9px;
}
.server-card > span {
  color: #b4b5e9;
  font-size: 9px;
  letter-spacing: 1.1px;
  font-weight: 700;
}
.server-card strong {
  display: block;
  font-size: 14px;
  margin: 9px 0;
}
.server-card div {
  font-size: 11px;
  line-height: 1.6;
  color: #a9aaba;
}
.server-card button {
  background: #ffffff0c;
  width: 100%;
  margin-top: 12px;
  font-size: 11px;
  padding: 8px;
  text-align: left;
}
.category {
  font-size: 10px;
  letter-spacing: 0.7px;
  font-weight: 700;
  color: #9294a3;
  padding: 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.category button {
  font-size: 20px;
  color: #a5a6b4;
}
.voice-category {
  margin-top: 24px;
}
.channel {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  gap: 9px;
  color: #9d9eab;
  text-align: left;
  margin: 2px 0;
  font-weight: 500;
}
.channel .symbol {
  font-size: 21px;
  line-height: 18px;
  color: #777987;
  width: 20px;
}
.channel.selected {
  background: #343640;
  color: #fff;
}
.channel:hover {
  background: #2a2c34;
}
.voice-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 36px;
  font-size: 12px;
  color: #b7b9c7;
}
.voice-user .avatar {
  width: 23px;
  height: 23px;
  font-size: 10px;
}
.voice-user .muted {
  margin-left: auto;
  color: #ed8d9c;
}
.profile {
  height: 61px;
  background: #17181e;
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 7px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  color: #fff;
}
.profile .avatar:after,
.member.online .avatar:after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: #46c78c;
  border: 3px solid #1d1e24;
  border-radius: 50%;
}
.profile-info {
  min-width: 0;
  flex: 1;
}
.profile-info strong {
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-info span {
  font-size: 10px;
  color: #8d91a2;
}
.profile button {
  font-size: 18px;
  padding: 4px;
}
.profile button.off {
  color: #ef8494;
  background: #ef849411;
}
main {
  min-width: 0;
  min-height: 0;
  background: #17181d;
  display: flex;
  flex-direction: column;
}
.chat-header {
  height: 57px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  border-bottom: 1px solid #111217;
}
.hash {
  font-size: 25px;
  color: #737684;
}
.header-divider {
  height: 22px;
  width: 1px;
  background: #33353d;
  margin: 0 6px;
}
.channel-description {
  font-size: 12px;
  color: #898b9b;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
.header-actions button {
  font-size: 24px;
  color: #a4a6b5;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 20px;
  background: #1b1c25;
  border-bottom: 1px solid #292a35;
  color: #9396b2;
  font-size: 11px;
}
.notice b {
  font-weight: 500;
  color: #c1c3dc;
}
.notice button {
  background: #5865f2;
  color: #fff;
  padding: 6px 10px;
  font-size: 10px;
  white-space: nowrap;
}
#messages {
  flex: 1;
  overflow: auto;
  padding: 20px 0;
  scrollbar-color: #30323b transparent;
  scrollbar-width: thin;
}
.welcome {
  padding: 36px 30px 25px;
  margin-top: auto;
}
.welcome-icon {
  background: #2c2e39;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 42px;
  color: #b9bbc9;
}
.welcome h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 16px 0 8px;
}
.welcome p {
  color: #9295a4;
  line-height: 1.7;
  font-size: 13px;
  max-width: 500px;
}
.welcome .welcome-tag {
  color: #9b9df2;
  font-size: 11px;
  display: inline-block;
  background: #5865f214;
  padding: 7px 10px;
  border-radius: 5px;
  margin-top: 8px;
}
.date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #818493;
  font-size: 10px;
  padding: 16px 25px;
}
.date-divider:before,
.date-divider:after {
  content: "";
  height: 1px;
  background: #2c2e36;
  flex: 1;
}
.message-row {
  padding: 8px 26px;
  display: flex;
  gap: 14px;
}
.message-row:hover {
  background: #ffffff03;
}
.message-content {
  min-width: 0;
  flex: 1;
}
.message-meta {
  display: flex;
  gap: 9px;
  align-items: baseline;
}
.message-meta strong {
  font-size: 13px;
}
.message-meta time {
  font-size: 10px;
  color: #787b8b;
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: #c7c9d5;
  line-height: 1.7;
  margin-top: 3px;
}
.message-body a {
  word-break: break-all;
}
.video-link {
  display: block;
  max-width: 480px;
  position: relative;
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #252730;
}
.video-link img {
  width: 100%;
  display: block;
}
.video-link span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 36px;
  color: #fff;
  text-shadow: 0 2px 10px #000;
}
#composer {
  display: flex;
  align-items: center;
  margin: 10px 20px 0;
  background: #262830;
  border: 1px solid #30323e;
  border-radius: 9px;
  padding: 10px;
  gap: 9px;
}
#composer button {
  color: #b5b7c6;
  font-size: 23px;
  padding: 0 4px;
}
#message {
  background: none;
  border: 0;
  resize: none;
  color: #e2e3eb;
  flex: 1;
  min-width: 0;
  max-height: 140px;
  padding: 5px;
  font-size: 13px;
}
#message::placeholder {
  color: #777b8e;
}
.composer-hint {
  font-size: 9px;
  color: #656979;
  white-space: nowrap;
}
.chat-bottom {
  text-align: center;
  color: #555968;
  font-size: 9px;
  padding: 9px 0 11px;
}
.members {
  background: #1d1e24;
  padding: 23px 15px;
  overflow: auto;
}
.members-heading {
  font-size: 10px;
  letter-spacing: 1px;
  color: #797d8f;
  margin-bottom: 24px;
}
.member-label {
  font-size: 10px;
  color: #9497a7;
  font-weight: 700;
  margin: 20px 0 10px;
}
.member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
}
.member .avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.member strong {
  font-size: 12px;
  display: block;
  font-weight: 500;
}
.member small {
  color: #777d91;
  font-size: 10px;
}
.members-note {
  border: 1px solid #30323d;
  border-radius: 8px;
  padding: 17px 14px;
  margin-top: 30px;
}
.members-note > span {
  color: #a2a5ff;
  font-size: 25px;
  display: block;
  margin-bottom: 10px;
}
.members-note strong {
  font-size: 12px;
}
.members-note p {
  color: #858999;
  font-size: 11px;
  line-height: 1.7;
}
.members-note button {
  font-size: 11px;
  background: #2d2f3a;
  padding: 8px;
  width: 100%;
}
.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 20% 30%, #34335f88, transparent 55%),
    radial-gradient(ellipse at 90% 90%, #252c5488, transparent 50%), #111218;
  padding: 20px;
}
.auth form {
  width: 440px;
  max-width: 100%;
  background: #202129;
  border: 1px solid #343541;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 30px 100px #0006;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: #5865f2;
  border-radius: 17px;
  font-size: 39px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a2a6f9;
}
.auth h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  margin: 12px 0;
}
.subtle {
  color: #9397ab;
  font-size: 13px;
  line-height: 1.6;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 22px 0 0;
  color: #b9bccd;
}
input {
  display: block;
  width: 100%;
  background: #15161c;
  border: 1px solid #363846;
  color: #fff;
  padding: 13px 12px;
  margin-top: 8px;
  border-radius: 6px;
}
.auth .primary {
  width: 100%;
}
.auth small {
  display: block;
  text-align: center;
  color: #656a80;
  font-size: 10px;
  margin-top: 25px;
}
.switch {
  font-size: 12px;
  color: #979bb0;
}
.link {
  color: #a4abff;
  font-size: 12px;
  padding: 0;
}
#auth-error {
  color: #ff929e;
  font-size: 12px;
  min-height: 15px;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #3b4058;
  color: #fff;
  border: 1px solid #69709a;
  padding: 14px 22px;
  border-radius: 9px;
  z-index: 10;
  max-width: 90vw;
  box-shadow: 0 4px 20px #0006;
}
#voice-panel {
  padding: 12px;
  background: #192b26;
  border-top: 1px solid #2b453c;
}
#voice-panel > strong {
  color: #56d79d;
  font-size: 12px;
}
#voice-name {
  font-size: 11px;
  color: #96b9ac;
  margin-top: 4px;
}
.voice-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.voice-actions button {
  background: #ffffff09;
  padding: 8px;
  font-size: 11px;
}
.voice-actions button:first-child {
  flex: 1;
}
#screen-stage {
  padding: 12px;
  background: #111216;
  border-bottom: 1px solid #323440;
  max-height: 45vh;
  overflow: auto;
}
#screen-stage header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 10px;
}
#screens {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#screens video {
  width: 100%;
  max-height: 30vh;
  background: #08090c;
  border-radius: 8px;
}
.screen-tile {
  width: min(100%, 600px);
}
.screen-tile small {
  color: #a2a6b8;
}
#search-bar {
  display: flex;
  padding: 8px 20px;
  gap: 8px;
}
#search-bar input {
  margin: 0;
  padding: 9px;
}
#empty-search {
  padding: 20px;
  color: #aaa;
  text-align: center;
}
dialog {
  border: 1px solid #414455;
  border-radius: 12px;
  background: #23252f;
  width: 400px;
  max-width: 90vw;
  padding: 25px;
}
dialog::backdrop {
  background: #0009;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
#mobile-menu {
  display: none;
}
@media (min-width: 1600px) {
  #app {
    grid-template-columns: 72px 240px minmax(0, 1fr) 240px;
  }
  .message-row {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
@media (max-width: 1100px) {
  #app {
    grid-template-columns: 64px 220px minmax(0, 1fr);
  }
  .members {
    display: none;
  }
  .members.show {
    display: block;
    position: fixed;
    right: 0;
    top: 57px;
    bottom: 0;
    width: 230px;
    box-shadow: -8px 0 30px #0005;
    z-index: 3;
  }
  .server-card {
    margin-bottom: 15px;
  }
  .composer-hint {
    display: none;
  }
}
@media (max-width: 700px) {
  #app {
    grid-template-columns: 1fr;
  }
  .servers {
    display: none;
  }
  .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 57px;
    bottom: 0;
    width: 260px;
    z-index: 4;
    box-shadow: 10px 0 30px #0007;
  }
  .sidebar.show {
    display: flex;
  }
  #mobile-menu {
    display: block;
    font-size: 20px;
  }
  .channel-description,
  .header-divider {
    display: none;
  }
  .chat-header {
    padding: 0 14px;
  }
  .notice {
    padding: 10px 14px;
  }
  .notice span {
    font-size: 10px;
  }
  .notice button {
    font-size: 9px;
  }
  .welcome {
    padding: 25px 20px;
  }
  .welcome h1 {
    font-size: 24px;
  }
  .message-row {
    padding: 9px 16px;
    gap: 10px;
  }
  #composer {
    margin: 8px 12px 0;
  }
  .auth form {
    padding: 28px;
  }
  .chat-bottom {
    font-size: 8px;
  }
}
#server-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.servers {
  overflow-y: auto;
}
.server {
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}
.server.add {
  font-size: 28px;
}
.server-header {
  gap: 8px;
}
#server-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-server-picker {
  display: none;
}
#admin-badge {
  color: #a7aeff;
  font-size: 8px;
  letter-spacing: 1px;
}
.profile-info span {
  display: block;
}
.voice-actions button.on {
  background: #5865f2;
  color: white;
}
#screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  align-items: start;
  gap: 12px;
}
.screen-tile {
  width: 100%;
  min-width: 0;
}
.camera-tile video {
  aspect-ratio: 16/9;
  object-fit: contain;
}
.camera-tile#camera-self video {
  transform: scaleX(-1);
}
.screen-tile small {
  display: block;
  padding: 4px 0 7px;
  font-size: 11px;
}
#screen-stage {
  max-height: 55vh;
}
.voice-actions #camera {
  width: 100%;
}
#server-actions-dialog button {
  display: block;
  margin-top: 15px;
}
@media (max-width: 700px) {
  .mobile-server-picker {
    display: block;
    padding: 12px;
    border-bottom: 1px solid #30323b;
  }
  .mobile-server-picker label {
    margin: 0 0 6px;
  }
  .mobile-server-picker select {
    padding: 8px;
    width: 100%;
    border: 1px solid #414455;
    border-radius: 6px;
    background: #242630;
    color: white;
  }
  .mobile-server-picker button {
    margin-top: 8px;
    font-size: 11px;
    color: #b5bbff;
  }
  .sidebar {
    overflow: auto;
  }
  .channel-scroll {
    flex: 1;
    min-height: 180px;
  }
  .profile {
    flex-shrink: 0;
  }
  #screen-stage {
    max-height: 40vh;
  }
}
.voice-media {
  font-size: 8px;
  color: #79d5ac;
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}
#roles-dialog {
  width: min(960px, 96vw);
  max-width: 96vw;
  max-height: 92dvh;
  padding: 24px;
  background: #202128;
}
#roles-dialog h2 {
  margin: 4px 0;
}
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.settings-header small {
  color: #969abb;
}
.settings-header > button {
  font-size: 22px;
}
.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #3c3e4b;
  margin-top: 20px;
  overflow: auto;
}
.settings-tabs button {
  padding: 12px;
  white-space: nowrap;
  color: #a8adbf;
}
.settings-tabs button.selected {
  color: #fff;
  border-bottom: 3px solid #7885ff;
  border-radius: 0;
}
.role-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
}
.role-list {
  border-right: 1px solid #343642;
  padding-right: 16px;
}
.role-list > .primary {
  width: 100%;
  margin-bottom: 14px;
}
.role-order-row {
  display: flex;
  gap: 3px;
  margin: 5px 0;
}
.role-order-row button {
  padding: 9px 7px;
}
.role-order-row button:first-child {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-order-row .selected {
  background: #363945;
}
.role-editor h3 {
  margin: 0 0 14px;
}
.role-editor input[type="color"] {
  width: 75px;
  height: 40px;
  padding: 4px;
}
.role-editor fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.role-editor fieldset:disabled {
  opacity: 0.65;
}
.role-editor .primary {
  margin-top: 20px;
}
.role-editor .danger {
  margin-top: 20px;
}
.permission-row,
.check-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid #30323d;
  font-size: 13px;
}
.permission-row input,
.check-label input,
.role-chip input {
  width: 17px;
  height: 17px;
  accent-color: #7380ff;
  margin: 0;
}
.permission-row small {
  display: block;
  width: 100%;
  padding-left: 29px;
  color: #9a9db2;
  font-weight: 400;
  line-height: 1.5;
}
.member-editor {
  padding: 14px;
  border: 1px solid #393c49;
  margin: 10px 0;
  border-radius: 8px;
}
.member-editor h3 {
  margin: 0 0 12px;
}
.member-editor > button {
  background: #343846;
  margin: 12px 8px 0 0;
  padding: 8px 12px;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  background: #15161c;
  border-radius: 5px;
  margin: 5px 8px 5px 0;
}
.danger {
  color: #ff8e9c !important;
}
.overwrite-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #343642;
  font-size: 13px;
}
#settings-content select {
  padding: 10px;
  border: 1px solid #494d5d;
  background: #17181f;
  color: #ddd;
  border-radius: 6px;
}
#settings-content > select {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}
.overwrite-row select {
  min-width: 120px;
}
.delete-message {
  margin-left: auto;
  font-size: 11px;
  opacity: 0;
  color: #fb8b98;
}
.message-row:hover .delete-message,
.delete-message:focus {
  opacity: 1;
}
.member[role="button"] {
  cursor: pointer;
}
.member[role="button"]:hover {
  background: #ffffff08;
  border-radius: 6px;
}
#settings-content {
  min-height: 200px;
}
.role-editor form label {
  margin-top: 12px;
}
@media (max-width: 700px) {
  #roles-dialog {
    padding: 14px;
  }
  .settings-tabs {
    gap: 0;
  }
  .settings-tabs button {
    padding: 10px 8px;
    font-size: 11px;
  }
  .role-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .role-list {
    border-right: 0;
    border-bottom: 1px solid #383b49;
    padding: 0 0 12px;
  }
  .role-order-row {
    margin: 0;
  }
  .role-editor {
    padding-bottom: 15px;
  }
  .delete-message {
    opacity: 1;
  }
  .settings-header h2 {
    font-size: 18px;
  }
}
