:root {
  --principal-color: #0d1117;
  --secondary-color: #161b22;
  --principal-accent: #e63946;
  --header-color: #62a5f3;
  --text-color: #ffffff;
  --header-text-color: #000000;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--principal-color);
}

header {
  background-color: var(--header-color);
}

h2 {
  font-size: 40px;
}

.menu-button img {
  display: none;
  cursor: pointer;
  filter: brightness(0);
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  transform: translateX(100%);
  transition: transform 0.4s;
}

.sidebar ul {
  color: black;
  height: 100vh;
  width: 250px;
  margin: 0;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: -10px 0px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px;
}

.sidebar.show {
  transform: translateX(0);
}

.sidebar li {
  width: 100%;
}

.sidebar li img {
  width: 50px;
  cursor: pointer;
  filter: invert(1);
}

footer a img {
  cursor: pointer;
}

footer nav {
  display: flex;
  gap: 40px;
}

footer nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

footer nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  transition: 0.3s ease;
}

footer nav ul li a:hover {
  color: var(--header-color);
}

.socials {
  display: flex;
  gap: 40px;
  filter: brightness(100);
}

.socials img {
  width: 50px;
  cursor: pointer;
  transition: 0.3s ease;
}

.socials img:hover {
  transform: scale(1.1);
}

.stories-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background-color: var(--secondary-color);
  overflow-x: visible;
  overflow-y: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin: 20px 0;
  border-radius: 16px;
  transition: 0.3s ease;
  margin: 20px 75px;
}

.stories-bar:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.stories-header {
  padding: 20px 30px;
  font-family: "Nimbus", sans-serif;
}

.stories-header h2 {
  margin: 0;
  font-family: "Nimbus", sans-serif;
  color: var(--principal-accent);
  font-size: 28px;
  border-bottom: 2px solid var(--principal-accent);
  padding-bottom: 5px;
}

.stories-content {
  display: flex;
  gap: 20px;
  padding: 20px 30px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  justify-content: flex-start;
}

.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
  justify-content: center;
  font-family: "Nimbus", sans-serif;
}

.story:hover {
  transform: scale(1.05);
}

.story-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--principal-accent);
  padding: 3px;
  background-color: white;
  transition: 0.5s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.story-avatar:hover {
  border: 3px solid orange;
  box-shadow: 0 4px 10px rgba(255, 165, 0, 0.5);
}

.story-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.story span {
  font-size: 14px;
  font-family: "Nimbus", sans-serif;
  color: var(--text-color);
  font-weight: 500;
}

main {
  display: flex;
  gap: 0;
  margin: 20px 75px;
  font-family: "Nimbus", sans-serif;
  flex-direction: row;
  flex-wrap: wrap;
}

.left-sidebar {
  width: 300px;
  background-color: var(--secondary-color);
  padding: 20px;
  overflow-y: auto;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  margin-right: 10px;
  transition: 0.5s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  max-height: 90vh;
}

.left-sidebar:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.main-content-messages {
  flex: 1;
  background-color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: 0.5s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-right: 10px;
  height: fit-content;
  flex-shrink: 0;
  min-width: 0;
}

.main-content-messages:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.right-sidebar {
  width: 350px;
  background-color: var(--secondary-color);
  padding: 20px;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  transition: 0.5s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  height: 562.5px;
  display: flex;
  flex-direction: column;
}

.right-sidebar .conversation_user {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

.right-sidebar:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.section-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--principal-accent);
}

.section-header h3 {
  margin: 0;
  font-family: "Nimbus", sans-serif;
  font-size: 24px;
  color: var(--principal-accent);
}

.notification-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.3s ease;
  background-color: rgba(255, 255, 255, 0.02);
}

.notification-item:hover {
  background-color: #4f4747;
  transform: translateX(5px);
}

.notification-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: 0.3s ease;
}

.notification-item:hover img {
  border: 2px solid var(--principal-accent);
}

.notification-content {
  flex: 1;
}

.notification-content p {
  margin: 0 0 5px 0;
  font-family: "Nimbus", sans-serif;
  font-size: 14px;
  color: var(--text-color);
}

.notification-content .time {
  font-size: 12px;
  color: #888;
}

.messages-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 0;
  flex: 0 0 375px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.message.received {
  justify-content: flex-start;
}

.message.sent {
  justify-content: flex-end;
}

.message.received img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: 0.3s ease;
}

.message.received:hover img {
  border: 2px solid var(--principal-accent);
}

.message-bubble {
  max-width: 60%;
  padding: 12px 18px;
  border-radius: 18px;
  font-family: "Nimbus", sans-serif;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
  word-wrap: break-word;
}

.message-bubble:hover {
  transform: translateY(-2px);
}

.message.received .message-bubble {
  background-color: #e4e6eb;
  color: #000;
  border-bottom-left-radius: 4px;
}

.message.received .message-bubble:hover {
  box-shadow: 0 0 10px rgba(228, 230, 235, 0.8);
}

.message.sent .message-bubble {
  background-color: #0a5cc7;
  color: white;
  border-bottom-right-radius: 4px;
}

.message.sent .message-bubble:hover {
  box-shadow: 0 0 10px #0a5cc7;
}

.message-bubble p {
  margin: 0 0 5px 0;
  font-size: 15px;
}

.message-bubble .time {
  font-size: 11px;
  opacity: 0.7;
  text-align: right;
  margin-top: 4px;
}

.message-input {
  display: flex;
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 15px;
}

.message-input input {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  font-family: "Nimbus", sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.3s ease;
}

.message-input input:focus {
  border-color: var(--principal-accent);
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.3);
}

.message-input button {
  padding: 12px 30px;
  background-color: #0a5cc7;
  color: white;
  border: none;
  border-radius: 25px;
  font-family: "Nimbus", sans-serif;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 2px 5px rgba(10, 92, 199, 0.3);
}

.message-input button:hover {
  background-color: #1100fc;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(17, 0, 252, 0.5);
}

.conversation-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
  background-color: rgba(255, 255, 255, 0.02);
}

.conversation-item:hover {
  background-color: #4f4747;
  transform: translateX(5px);
}

.conversation-item.active {
  background-color: #c3aaaa;
  border-left: 3px solid var(--principal-accent);
}

.conversation-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: 0.3s ease;
}

.conversation-item:hover img {
  border: 2px solid var(--principal-accent);
}

.conversation-info {
  flex: 1;
}

.conversation-info h4 {
  margin: 0 0 5px 0;
  font-family: "Nimbus", sans-serif;
  font-size: 16px;
  color: var(--principal-accent);
}

.conversation-info p {
  margin: 0;
  font-size: 14px;
  color: #fdfcfc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--principal-accent);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(230, 57, 70, 0.5);
}

.matching {
  width: calc(50% - 10px);
  font-family: "Nimbus", sans-serif;
  transition: 0.5s ease;
  color: var(--text-color);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background-color: var(--secondary-color);
  border-radius: 16px;
  margin-top: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-right: 20px;
}

.matching_header {
  color: #e63946;
  border-bottom: 2px solid var(--principal-accent);
  margin: 20px;
  font-weight: bold;
  width: 100%;
}

.matching_header h2 {
  font-size: 24px;
  margin: 0;
}

.matching:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 15px rgba(230, 57, 70, 0.4);
}

.matching_profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 25px;
  width: calc(50% - 50px);
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
}

.matching_profile:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(230, 57, 70, 0.3);
}

.matching_profile img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--principal-accent);
}

.battle {
  width: calc(50% - 10px);
  font-family: "Nimbus", sans-serif;
  transition: 0.5s ease;
  color: var(--text-color);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background-color: var(--secondary-color);
  border-radius: 16px;
  margin-top: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.battle_header {
  color: #e63946;
  border-bottom: 2px solid var(--principal-accent);
  margin: 20px;
  font-weight: bold;
  width: 100%;
}

.battle_header h2 {
  font-size: 24px;
  margin: 0;
}

.battle:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 15px rgba(230, 57, 70, 0.4);
}

.battle_content {
  margin: 20px;
  width: calc(100% - 40px);
}

.battle_content p {
  text-align: center;
  font-size: 20px;
  color: var(--principal-accent);
  text-decoration: underline var(--principal-accent);
  text-underline-offset: 5px;
  margin: 50px 0;
  font-weight: bold;
}

.battle_profile {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}

.button1 {
  background-color: var(--principal-accent);
  padding: 10px 20px;
  width: 50%;
  margin-left: 25%;
  font-size: 30px;
  border-radius: 16px;
  transition: 0.5s ease;
  cursor: pointer;
  border: none;
  color: white;
  font-weight: bold;
  box-shadow: 0 3px 8px rgba(255, 69, 0, 0.4);
}

.button1:hover {
  transform: scale(1.01);
  box-shadow: 0 0px 15px rgba(255, 69, 0, 0.6);
}

.request {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 25px;
  width: calc(50% - 50px);
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
}

.request:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(230, 57, 70, 0.3);
}

.request img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--principal-accent);
}

.matching_battle {
  display: flex;
  flex-direction: row;
  gap: 60px;
  width: 100%;
  margin-top: 20px;
}

@media screen and (max-width: 1400px) {
  header nav ul {
    display: none;
  }

  .menu-button img {
    display: flex;
    width: 50px;
  }

  header nav ul li:hover {
    border-bottom: 2px solid transparent;
  }

  main {
    flex-direction: row;
    padding: 0 10px;
  }

  .left-sidebar {
    width: 250px;
  }

  .right-sidebar {
    width: 300px;
  }
}

@media screen and (max-width: 1200px) {
  .socials,
  footer nav img {
    display: none;
  }

  footer nav ul {
    padding: 0;
    gap: 15px;
  }

  footer {
    padding: 20px 30px;
  }
}

@media screen and (max-width: 1024px) {
  .left-sidebar {
    display: none;
  }

  .right-sidebar {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-top: 20px;
  }

  .main-content-messages {
    width: 100%;
    margin-right: 0;
    border-radius: 16px;
  }

  footer {
    flex-direction: column;
    gap: 20px;
    padding: 25px 20px;
  }

  footer nav ul {
    justify-content: center;
  }

  .matching_battle {
    flex-direction: column;
    gap: 20px;
  }

  .matching,
  .battle {
    width: 100%;
    margin-right: 0;
  }
}

@media screen and (max-width: 825px) {
  h2 {
    font-size: 30px;
  }

  header nav {
    padding: 0px 20px;
  }

  .icon-container {
    gap: 20px !important;
  }

  .profil img {
    width: 60px;
    height: 60px;
  }

  .button1 {
    font-size: 24px;
    padding: 8px 16px;
    margin-left: 0;
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  main {
    flex-direction: column;
    padding: 10px;
  }

  .matching_profile,
  .request {
    width: calc(100% - 50px);
    margin: 10px 25px;
  }

  .message-bubble {
    max-width: 85%;
  }

  footer {
    font-size: 18px;
  }
}

@media screen and (max-width: 600px) {
  #logo {
    display: none;
  }
  header nav {
    justify-content: space-between;
  }

  .icon-container {
    gap: 15px !important;
  }

  .profil img {
    width: 50px;
    height: 50px;
  }

  .stories-header h2 {
    font-size: 20px;
  }

  .story-avatar {
    width: 55px;
    height: 55px;
  }
}

@media screen and (max-width: 480px) {
  .icon-container img:not(.profil img) {
    width: 30px;
  }

  .message-input button {
    padding: 10px 15px;
    font-size: 13px;
  }
}
