@font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Thin.ttf") format("truetype");
    font-weight: 100;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-UltraLight.ttf") format("truetype");
    font-weight: 200;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-DemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Heavy.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-ExtraBlack.ttf") format("truetype");
    font-weight: 950;
    font-style: normal;
  }
  
  @font-face {
    font-family: "IRANSansX";
    src: url("/assets/font/IRANSansX-Black.ttf") format("truetype");
    font-weight: 1000;
    font-style: normal;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
    font-family: "IRANSansX", sans-serif;
  }
  
  body {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      direction: rtl;
      height: 100vh;
      width: 100%;
      background: #f9fafc;
  }
  
  a,
  input[type="text"],
  textarea{
      all: unset;
  }
  
  a {
      cursor: pointer;
  }
  
  .notice {
      width: 400px;
      max-width: 100%;
      background: #ffffff;
      border: 1px solid #f2f2f2;
      color: red;
      border-radius: 15px;
      padding: 15px;
      text-align: center;
      font-weight: 500;
      margin-bottom: 20px;
  }
  
  main {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      flex-direction: row-reverse;
      gap: 20px;
      flex-wrap: wrap;
  }
  
  .how-to-main {
      align-items: center !important;
      flex-direction: column !important;
  }
  
  .public-rooms {
      max-height: 500px;
      width: 400px;
      max-width: 100%;
      background: #ffffff;
      border: 1px solid #f2f2f2;
      border-radius: 20px;
      padding: 20px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      margin-top: 40px;
  }
  
  .public-rooms h2 {
      text-align: center;
  }
  
  .create-link {
      padding: 10px;
      text-align: center;
      color: red;
      font-size: 16px;
      font-weight: 500;
  }
  
  #chat-container {
      width: 700px;
      max-width: 60%;
      background: #ffffff;
      border: 1px solid #f2f2f2;
      border-radius: 20px;
      padding: 5px;
      overflow: hidden;
      display: flex;
      align-items: center;
      flex-direction: column;
      margin-top: 40px;
  }
  
  .chat-header {
      position: absolute;
      margin-top: 10px;
      color: #fff;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(6px);
      font-size: 8px;
      font-weight: 600;
      padding: 7px 20px;
      border-radius: 10px;
      z-index: 700;
  }
  
  #chat {
      width: 100%;
      flex-grow: 1;
      height: 400px;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 5px;
      border-bottom: 1px solid #f2f2f2;
      display: flex;
      align-items: flex-start;
      flex-direction: column;
      scroll-behavior: smooth;
  }

  
  #chat div {
      background-color: #e6f7ff;
      padding: 6px;
      border-radius: 10px;
      /* display: inline-block; */
      word-wrap: break-word;
  }
  
  .msg-no-reply, .mother-msg {
      max-width: 60% !important;
    margin-bottom: 10px;
  }
  
  .reply-con{
    width: 100%;
    border-bottom: 1px solid rgba(128, 128, 128, 0.244);
  }
  .reply-sec{
    background-color: lightgreen;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 10px;
    display: inline-block;
    max-width: 60%;
    word-wrap: break-word;

  }

  .mother-msg{
    display: flex;
    flex-direction: column;
    max-width: 60% important;
  }


  #composer{ 
    position: sticky;
     bottom: 0;
      left: 50%
      ; transform: translateX(-50%); width: min(700px,60%); }

  
  .message-text {
      display: inline-block;
      word-wrap: break-word;
      margin-bottom: 5px;
  }
  
  .timestamp {
      display: block;
      font-size: 0.8em;
      color: gray;
  }
  
  #controls {
      padding: 10px;
      display: flex;
      flex-direction: column;
      width: 100%;
  }
  
  #nickname,
  #message {
      width: 100%;
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 10px;
      background: #ffffff;
      border: 1px solid #f2f2f2;
      resize: vertical;
  }
  
  .nick-up{
    display: flex;
    flex-direction: row;
    gap: 10px;
  }
  .nick-up > button{
    background-color: blue;
    height: 50px;
    width: 75px;
  }
  button {
      padding: 10px 0;
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      font-weight: bold;
      transition: background-color 0.3s ease;
  }
  
  button:hover {
      background-color: #45a049;
  }
  
  .how-to {
      background: #ffffff;
      border: 1px solid #f2f2f2;
      padding: 20px;
      border-radius: 15px;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      flex-direction: column;
  }
  
  .how-to h1 {
      margin-bottom: 10px;
      font-weight: 800;
  }
  
  .how-to p {
      margin-top: 10px;
  }
  
  .how-to p a {
      color: blue;
      font-weight: 600;
  }
  
  header {
      position: fixed;
      z-index: 9999;
      top: 0;
      left: 0;
      width: 100%;
      border-radius: 0 0 20px 20px;
      background: #ffffff;
      border: 1px solid #f2f2f2;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 30px;
      padding: 20px 0;
  }
  
  .containerrooms {
      display: flex;
      align-items: flex-start;
      flex-direction: column;
      gap: 15px;
      margin-top: 20px;
      padding: 20px 10px;
      overflow-y: auto;
  }
  
  .childRoom {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      flex-direction: column;
  
  }
  
  .childRoom p {
      color: blue;
      font-weight: 500;
      font-size: 18px;
  }
  
  .childRoom span {
      font-size: 0.8em;
      color: gray;
  }
  
  @media (max-width: 768px) {
      body {
          height: unset;
      }
      
      main {
          align-items: center;
          flex-direction: column;
          width: 100%;
          margin-top: 90px;
      }
      
      #chat-container {
          max-width: 100%;
      }
      
      #chat-container, .how-to, .public-rooms {
          width: 90%;
      }
      
      #chat-container, .public-rooms {
          margin-top: 0;
      }
      
      #chat {
          height: 400px;
      }
      
    
    .mother-msg, .msg-no-reply{
          max-width: 80% !important;

      }
      
      .notice {
          width: 90%;
          margin-bottom: 0;
          font-size: larger;
      }
  }