* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  display: flex;
  height: 100vh;
  background-color: #111b21;
  color: #e9edef;
  overflow: hidden;
}

body.bright-body {
  background-color: #f0f2f5;
  color: #111b21;
}

.login {
  display: flex;
  flex-direction: column;
  background-color: #202c33;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  border: 1px solid #2f3b43;
  margin: auto;
}

.login.bright-login {
  background-color: #ffffff;
  border: 1px solid #e1e9eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.sidebar {
  width: 300px;
  background-color: #202c33;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #2f3b43;
}

.sidebar.bright-sidebar {
  background-color: #ffffff;
  border-right: 1px solid #e1e9eb;
}

.sidebar-header {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: bold;
  font-size: 1.1rem;
  border-bottom: 1px solid #2f3b43;
  position: relative;
}

.sidebar-header.bright-sidebar-header {
  border-bottom: 1px solid #e1e9eb;
}

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #8696a0;
  padding: 16px 16px 8px 16px;
  letter-spacing: 0.5px;
}

.section-title.bright-section-title {
  color: #667781;
}

.list-container {
  flex-grow: 1;
  overflow-y: auto;
}

.list-item {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
}

.list-item:hover .delete-chat-btn {
  opacity: 0.6;
}

.list-item:hover,
.list-item.active {
  background-color: #2a3942;
}

.list-item.bright-list-item:hover,
.list-item.bright-list-item.bright-active {
  background-color: #f0f2f5;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #53bdeb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #ffffff;
  font-size: 0.9rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.avatar.bright-avatar {
  background-color: #53bdeb;
  color: #ffffff;
}

.item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-left: 16px;
  padding-right: 30px;
}

.item-name {
  font-weight: 500;
  color: #e9edef;
  font-size: 0.95rem;
}

.item-name.bright-item-name {
  color: #111b21;
}

.item-status {
  font-size: 0.8rem;
  color: #8696a0;
}

.item-status.bright-item-status {
  color: #667781;
}

.landr {
  height: 60px;
  background-color: #2a3942;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-weight: bold;
  font-size: 1.2rem;
  border-bottom: 1px solid #2f3b43;
}

.landr.bright-landr {
  background-color: #f0f2f5;
  border-bottom: 1px solid #e1e9eb;
}

.messages-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-container {
  padding: 10px 16px;
  background-color: #202c33;
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-container.bright-input-container {
  background-color: #f0f2f5;
}

.input-box {
  background-color: #2a3942;
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  flex-grow: 1;
}

.input-box.bright-input-box {
  background-color: #ffffff;
}

.input-box input {
  width: 100%;
  background: none;
  border: none;
  color: #e9edef;
  font-size: 0.95rem;
  outline: none;
}

.input-box.bright-input-box input {
  color: #111b21;
}

.input-box input::placeholder {
  color: #8696a0;
}

.input-box.bright-input-box input::placeholder {
  color: #667781;
}

.action-button {
  background-color: #00a884;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.action-button:hover {
  background-color: #008f72;
}

.action-button.bright-action-button {
  background-color: #00a884;
  color: #ffffff;
}

.action-button.bright-action-button:hover {
  background-color: #008f72;
}

.logout-button {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 10;
  background-color: #ea0038;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background-color: #c2002f;
}

.logout-button.bright-logout-button {
  background-color: #ea0038;
  color: #ffffff;
}

.logout-button.bright-logout-button:hover {
  background-color: #c2002f;
}

.main-chat {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(32, 44, 51, 0.4) 1px, transparent 0);
  background-size: 24px 24px;
}

.main-chat.bright-main-chat {
  background-color: #efeae2;
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 0);
}

.chat-header {
  height: 60px;
  background-color: #202c33;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: bold;
  border-bottom: 1px solid #2f3b43;
}

.chat-header.bright-chat-header {
  background-color: #f0f2f5;
  border-bottom: 1px solid #e1e9eb;
}

.alert-box {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ea0038;
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  cursor: pointer;
  animation: moveUpDown 4s linear forwards;
}

.alert-box.bright-alert-box {
  background-color: #ea0038;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

@keyframes moveUpDown {
  0% {
    top: 20px;
  }
  90% {
    top: 20px;
  }
  100% {
    top: -60px;
  }
}

#ahaa a {
  color: #2196f3;
  text-decoration: underline;
  cursor: pointer;
}

#ahaa a:hover {
  color: #0b7dda;
}

#ahaa.bright-ahaa a {
  color: #0066cc;
}

#ahaa.bright-ahaa a:hover {
  color: #004499;
}

.login-f {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-f .input {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-f input {
  width: 100%;
  background-color: #2a3942;
  border: 1px solid #2f3b43;
  border-radius: 8px;
  padding: 12px;
  color: #e9edef;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.login-f.bright-login-f input {
  background-color: #f0f2f5;
  border: 1px solid #e1e9eb;
  color: #111b21;
}

.login-f input:focus {
  border-color: #00a884;
}

.login-f input::placeholder {
  color: #8696a0;
}

.login-f.bright-login-f input::placeholder {
  color: #667781;
}

.login-f button {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}

#login,
.action-button,
#register_redirect.action-button {
  background-color: #00a884 !important;
  color: #ffffff !important;
}

.login-f button:last-of-type {
  background-color: transparent;
  color: #00a884;
  border: 1px solid #2f3b43;
}

.login-f.bright-login-f button:last-of-type {
  border: 1px solid #e1e9eb;
  color: #00a884;
}

.login-f button:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
  }

  .login {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

.add-friend-main-button {
  position: absolute !important;
  right: 16px !important;
  background-color: #00a884 !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 24px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 30% !important;
  height: 32px !important;
  border-radius: 10px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.add-friend-main-button:hover {
  background-color: #008f72 !important;
}

.add-friend-main-button.bright-add-friend-main-button {
  background-color: #00a884 !important;
  color: #ffffff !important;
}

.new-chats-main-button {
  position: absolute !important;
  right: 16px !important;
  background-color: #00a884 !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 24px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100px !important;
  height: 32px !important;
  border-radius: 10px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.new-chats-main-button:hover {
  background-color: #008f72 !important;
}

.new-chats-main-button.bright-add-chat-main-button {
  background-color: #00a884 !important;
  color: #ffffff !important;
}

.modal-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay.bright-modal-overlay {
  background-color: rgba(255, 255, 255, 0.85);
}

.modal-hidden {
  display: none !important;
}

.modal-box {
  background-color: #222e35 !important;
  padding: 24px;
  border-radius: 12px;
  width: 360px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-box.bright-modal-box {
  background-color: #ffffff !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.modal-box h3 {
  color: #e9edef !important;
  font-size: 1.2rem;
  margin: 0;
}

.modal-box.bright-modal-box h3 {
  color: #111b21 !important;
}

.modal-box p {
  color: #8696a0 !important;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
}

.modal-box.bright-modal-box p {
  color: #667781 !important;
}

.modal-box input {
  background-color: #2a3942 !important;
  border: 1px solid #2a3942 !important;
  color: #e9edef !important;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}

.modal-box.bright-modal-box input {
  background-color: #f0f2f5 !important;
  border: 1px solid #e1e9eb !important;
  color: #111b21 !important;
}

.modal-box input:focus {
  border-color: #00a884 !important;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.modal-buttons button {
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-weight: bold !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  border: none !important;
}

.cancel-btn {
  background-color: #2a3942 !important;
  color: #ea0038 !important;
}

.cancel-btn.bright-cancel-btn {
  background-color: #f0f2f5 !important;
  color: #ea0038 !important;
}

.confirm-btn {
  background-color: #00a884 !important;
  color: #ffffff !important;
}

.user-menu-container {
  position: relative;
  padding: 12px 16px;
  background-color: #2a3942;
  border-top: 1px solid #2f3b43;
  margin-top: auto;
}

.user-menu-container.bright-user-menu-container {
  background-color: #f0f2f5;
  border-top: 1px solid #e1e9eb;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.user-dropdown {
  position: absolute;
  bottom: 70px;
  left: 10px;
  width: 200px;
  background-color: #222e35;
  border: 1px solid #2f3b43;
  border-radius: 8px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-dropdown.bright-user-dropdown {
  background-color: #ffffff;
  border: 1px solid #e1e9eb;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.dropdown-username {
  padding: 12px 16px;
  font-weight: bold;
  color: #e9edef;
  font-size: 0.95rem;
  background-color: #182229;
}

.dropdown-username.bright-dropdown-username {
  color: #111b21;
  background-color: #f0f2f5;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid #2f3b43;
  margin: 0;
}

.dropdown-divider.bright-dropdown-divider {
  border-top: 1px solid #e1e9eb;
}

.dropdown-item {
  padding: 10px 16px;
  color: #e9edef;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item.bright-dropdown-item {
  color: #111b21;
}

.dropdown-item img {
  width: 18px !important;
  height: 18px !important;
  object-fit: contain;
  flex-shrink: 0;
}

.dropdown-item:hover {
  background-color: #2a3942;
}

.dropdown-item.bright-dropdown-item:hover {
  background-color: #f0f2f5;
}

.logout-item {
  color: #ea0038;
}

.logout-item:hover {
  background-color: rgba(234, 0, 56, 0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.tos-container {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 15px 0;
  font-family: sans-serif;
  font-size: 14px;
  color: #fff;
}

.tos-container.bright-tos-container {
  color: #111b21;
}

.tos-container input[type="checkbox"] {
  all: unset;
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
  border: none !important;
  background: none !important;
}

.tos-container label {
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.tos-container a {
  color: #3897f0;
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}

.tos-container a:hover {
  text-decoration: underline;
}

button:disabled {
  background-color: #cccccc !important;
  color: #888888 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  box-shadow: none !important;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

.modal.bright-modal {
  background-color: rgba(255, 255, 255, 0.6);
}

.modal-content {
  background-color: #ffffff;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  padding: 40px;
  position: relative;
  font-family: sans-serif;
  color: #333333;
  display: flex;
  flex-direction: column;
}

.modal-content.bright-modal-content {
  background-color: #ffffff;
  color: #333333;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 24px;
  color: #111111;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.modal-content embed {
  width: 100%;
  flex-grow: 1;
  border: none;
  border-radius: 4px;
}

.close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  color: #999999;
  transition: color 0.2s ease;
  z-index: 10000;
}

.close-btn:hover {
  color: #111111;
}

.delete-chat-btn {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  color: #b5bac1;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    color 0.15s ease;
}

.delete-chat-btn:hover {
  opacity: 1 !important;
  color: #db7676;
}
.messages-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #5865f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.message-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-sender {
  color: #f2f3f5;
  font-weight: 600;
  font-size: 16px;
}

.message-timestamp {
  color: #949ba4;
  font-size: 12px;
}

.message-text {
  color: #dbdee1;
  font-size: 15px;
  line-height: 1.375rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-own .message-content-wrapper {
  align-items: flex-end;
}

.message-own .message-text {
  background-color: #00a884;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px 0px 8px 8px;
}

.message-text {
  background-color: #2a3942;
  padding: 8px 12px;
  border-radius: 0px 8px 8px 8px;
}

body.bright-body .message-text {
  background-color: #ffffff;
}

.icon-button {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button svg {
  margin-left: 3px;
}

.chat-section-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding-right: 16px;
}

.add-dm-button {
  background: none;
  border: none;
  color: #8696a0;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s;
  line-height: 1;
}

.add-dm-button:hover {
  color: #e9edef;
}

body.bright-body .add-dm-button {
  color: #667781;
}

body.bright-body .add-dm-button:hover {
  color: #111b21;
}
