* {
  box-sizing: border-box;
}

:root {
  --background: #1e1f22;
  --dark: #111214;
  --sidebar: #2b2d31;
  --sidebar2: #232428;
  --hover: #35373c;
  --input: #1e1f22;
  --text: #f2f3f5;
  --muted: #949ba4;
  --blue: #5865f2;
  --blue-hover: #4752c4;
  --green: #23a559;
  --red: #ed4245;
  --border: #3f4147;
}

* {
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}


/* AUTH */

.auth {
  width: 100vw;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background:
    radial-gradient(
      circle at 15% 10%,
      #4149d8 0,
      transparent 32%
    ),
    radial-gradient(
      circle at 85% 90%,
      #25245e 0,
      transparent 35%
    ),
    #111214;
}

.auth-card {
  width: 430px;
  padding: 38px;
  background: #313338;
  border-radius: 8px;

  box-shadow: 0 25px 80px #0009;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  font-size: 25px;
  font-weight: 900;

  margin-bottom: 30px;
}

.logo-icon {
  width: 40px;
  height: 40px;

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--blue);

  font-size: 25px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 6px;
}

.sub {
  color: var(--muted);
  text-align: center;
}

label {
  display: block;

  color: #b5bac1;

  font-size: 11px;
  font-weight: 800;

  margin: 18px 0 7px;
}

input,
textarea {
  width: 100%;

  background: var(--input);
  color: white;

  border: none;
  outline: none;

  border-radius: 4px;

  padding: 13px;
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 1px var(--blue);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.main-btn {
  width: 100%;

  border: none;
  border-radius: 4px;

  padding: 13px;

  margin-top: 20px;

  background: var(--blue);
  color: white;

  font-weight: 700;
}

.main-btn:hover {
  background: var(--blue-hover);
}

.switch {
  color: var(--muted);
  font-size: 13px;
}

.switch button {
  border: none;
  background: none;
  color: #00aff4;
}


/* APP */

#app {
  width: 100vw;
  height: 100vh;

  display: flex;
}


/* SERVERS */

.servers {
  width: 72px;

  background: var(--dark);

  padding: 12px 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 10px;
}

.home-server,
.server-icon,
.add-server {
  width: 48px;
  height: 48px;

  border: none;
  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  background: #313338;
  color: white;

  font-size: 20px;
  font-weight: 900;

  transition: .18s;
}

.home-server {
  background: var(--blue);
}

.home-server:hover,
.server-icon:hover {
  border-radius: 16px;
}

.server-icon.active {
  background: var(--blue);
  border-radius: 16px;
}

.add-server {
  color: var(--green);
  font-size: 28px;
}

.add-server:hover {
  color: white;
  background: var(--green);
  border-radius: 16px;
}

#serverList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* SIDEBAR */

.sidebar {
  width: 240px;

  background: var(--sidebar);

  display: flex;
  flex-direction: column;
}

.server-top {
  height: 48px;

  padding: 0 15px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid #1e1f22;
}

.server-top button {
  border: none;
  background: none;
  color: #aaa;
}

.server-menu {
  position: absolute;

  top: 55px;
  left: 82px;

  width: 220px;

  background: #111214;

  padding: 7px;

  border-radius: 5px;

  z-index: 30;

  box-shadow: 0 15px 40px #0009;
}

.server-menu button {
  width: 100%;

  padding: 10px;

  text-align: left;

  border: none;
  border-radius: 4px;

  background: none;
  color: #dbdee1;
}

.server-menu button:hover {
  background: var(--blue);
  color: white;
}

.channel-area {
  flex: 1;
  padding: 15px 8px;
}

.category {
  display: flex;
  justify-content: space-between;

  padding: 5px 8px;

  color: var(--muted);

  font-size: 11px;
  font-weight: 800;
}

.category button {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
}

.channel {
  padding: 9px;

  border-radius: 4px;

  color: var(--muted);

  cursor: pointer;
}

.channel:hover,
.channel.selected {
  background: var(--hover);
  color: white;
}

.channel-hash {
  color: #72767d;
  margin-right: 5px;
}


/* USER */

.user-bar {
  height: 52px;

  padding: 8px;

  background: var(--sidebar2);

  display: flex;
  align-items: center;

  gap: 8px;
}

.small-avatar {
  width: 32px;
  height: 32px;

  border-radius: 50%;

  background: var(--blue);

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  font-weight: 800;
}

.small-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-details strong,
.user-details span {
  display: block;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-details span {
  color: var(--green);
  font-size: 10px;
}

.user-bar > button {
  border: none;
  background: none;
  color: #aaa;
}


/* CHAT */

.chat {
  flex: 1;

  min-width: 0;

  display: flex;
  flex-direction: column;
}

.chat-header {
  height: 48px;

  padding: 0 16px;

  border-bottom: 1px solid #1e1f22;

  display: flex;
  align-items: center;
}

.channel-title {
  display: flex;
  gap: 6px;
  align-items: center;
}

.channel-title span {
  font-size: 23px;
  color: #949ba4;
}

.header-actions {
  margin-left: auto;

  display: flex;
  gap: 6px;
}

.header-actions button {
  border: none;

  background: transparent;

  color: #b5bac1;

  padding: 8px 10px;

  border-radius: 4px;
}

.header-actions button:hover {
  background: var(--hover);
  color: white;
}


/* MESSAGES */

.messages {
  flex: 1;

  overflow-y: auto;

  padding: 20px 24px;
}

.message {
  display: flex;

  gap: 12px;

  padding: 7px 0;
}

.message-avatar {
  width: 40px;
  height: 40px;

  min-width: 40px;

  border-radius: 50%;

  background: var(--blue);

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;

  font-weight: 800;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-author {
  font-weight: 700;
}

.message-time {
  margin-left: 6px;

  color: #72767d;

  font-size: 10px;
}

.message-content {
  margin-top: 4px;

  color: #dbdee1;

  word-break: break-word;
}

.message-input {
  margin: 0 20px 20px;

  padding: 4px;

  background: #383a40;

  border-radius: 8px;

  display: flex;
}

.message-input input {
  background: transparent;
}

.message-input button {
  width: 45px;

  border: none;

  background: transparent;

  color: #b5bac1;

  font-size: 18px;
}


/* MODAL */

.overlay {
  position: fixed;
  inset: 0;

  background: #0009;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 100;
}

.modal {
  position: relative;

  width: 650px;
  max-width: calc(100vw - 30px);
  max-height: 90vh;

  overflow: auto;

  background: #313338;

  border-radius: 8px;

  box-shadow: 0 20px 70px #0009;
}

.small {
  width: 420px;
  padding: 30px;
}

.close {
  position: absolute;

  top: 15px;
  right: 18px;

  width: 30px;
  height: 30px;

  border: 2px solid #777;
  border-radius: 50%;

  background: transparent;

  color: #aaa;

  font-size: 20px;

  z-index: 5;
}

.close:hover {
  color: white;
  border-color: white;
}


/* PROFILE */

.profile-banner {
  height: 120px;

  background:
    linear-gradient(
      135deg,
      #5865f2,
      #8b5cf6
    );
}

.profile-picture {
  position: absolute;

  top: 75px;
  left: 25px;

  width: 82px;
  height: 82px;

  border-radius: 50%;

  border: 7px solid #313338;

  background: var(--blue);

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  font-size: 30px;
  font-weight: 900;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-body {
  padding: 55px 25px 30px;
}

.profile-body hr {
  border: none;
  border-top: 1px solid var(--border);

  margin: 25px 0;
}

.profile-body h5 {
  color: #b5bac1;
}


/* NITRO */

.nitro-badge {
  display: inline-block;

  background: #9b59ff;

  padding: 4px 8px;

  border-radius: 4px;

  font-size: 10px;
  font-weight: 900;
}

.nitro-card {
  padding: 35px;

  border-radius: 10px;

  text-align: center;

  background:
    linear-gradient(
      135deg,
      #29224d,
      #171326
    );
}

.nitro-symbol {
  font-size: 45px;
  color: #b47cff;
}

.nitro-card p {
  color: #b5bac1;
}

.nitro-features {
  line-height: 2;

  color: #b5bac1;
}

.nitro-button {
  border: none;

  margin-top: 20px;

  padding: 12px 25px;

  border-radius: 5px;

  background: #9b59ff;

  color: white;

  font-weight: 800;
}


/* SETTINGS */

.settings {
  min-height: 500px;
}

.settings > h2 {
  padding: 30px;
  margin: 0;
}

.settings-layout {
  display: flex;
  min-height: 400px;
}

.settings-layout nav {
  width: 190px;

  padding: 20px 10px;

  background: #2b2d31;
}

.setting {
  width: 100%;

  padding: 10px;

  margin-bottom: 3px;

  border: none;

  border-radius: 4px;

  background: transparent;

  color: #b5bac1;

  text-align: left;
}

.setting:hover,
.setting.active {
  background: #404249;
  color: white;
}

.setting.logout {
  margin-top: 20px;
  color: var(--red);
}

.settings-content {
  flex: 1;

  padding: 20px 30px;
}

@media(max-width:700px) {

  .servers {
    width: 58px;
  }

  .sidebar {
    width: 190px;
  }

  .home-server,
  .server-icon,
  .add-server {
    width: 42px;
    height: 42px;
  }

  .settings-layout {
    flex-direction: column;
  }

  .settings-layout nav {
    width: 100%;
  }
}


/* TOAST */

#toast {
  position: fixed;

  right: 25px;
  bottom: 25px;

  padding: 13px 18px;

  border-radius: 5px;

  background: #111214;

  box-shadow: 0 10px 30px #0008;

  transform: translateY(100px);

  opacity: 0;

  transition: .25s;

  z-index: 200;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}