body {
  padding-inline: 80px;
}

main {
  .chat {
    width: min(720px, 92%);
    height: 82svh;
    margin-inline: auto;

    border-radius: 28px;
    padding: 28px;

    display: flex;
    flex-direction: column;
    gap: 18px;

    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);

    border: 1px solid rgba(143, 29, 29, 0.13);

    box-shadow:
      0 16px 32px rgba(127, 29, 29, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);

    h1 {
      text-align: center;
      font-weight: 600;
      letter-spacing: 1px;
      opacity: 0.9;
    }

    .chat-content {
      flex: 1;

      display: flex;
      flex-direction: column;
      gap: 22px;

      overflow-y: auto;
      padding-right: 6px;

      scroll-behavior: smooth;

      &::-webkit-scrollbar {
        width: 6px;
      }

      &::-webkit-scrollbar-thumb {
        background: rgba(143, 29, 29, 0.26);
        border-radius: 20px;
      }

      .message-user {
        align-self: flex-end;

        padding: 12px 18px;

        background: linear-gradient(135deg, #8f1d1d, #b42323);

        border-radius: 18px 18px 6px 18px;

        color: #ffffff;
        font-size: 17px;
        line-height: 1.4;

        max-width: 70%;
        word-wrap: break-word;

        box-shadow:
          0 6px 20px rgba(143, 29, 29, 0.18),
          inset 0 2px 6px rgba(255, 255, 255, 0.25);
      }

      .message-ai {
        align-self: flex-start;

        padding: 12px 18px;

        max-width: 75%;

        border-radius: 18px 18px 18px 6px;

        background: rgba(249, 250, 252, 0.96);

        backdrop-filter: blur(12px);

        border: 1px solid rgba(143, 29, 29, 0.11);

        color: #2b2f36;
        font-size: 17px;
        line-height: 1.5;

        text-shadow: none;
      }

      a {
        color: rgb(143, 29, 29);
        text-decoration: underline;
      }
    }

    .chat-input {
      display: flex;
      gap: 12px;

      padding-top: 8px;

      input {
        flex: 1;
        height: 50px;
        border-radius: 25px;
        border: 1px solid rgba(143, 29, 29, 0.15);
        background: rgba(249, 250, 252, 0.96);
        backdrop-filter: blur(10px);
        padding: 0 18px;
        font-size: 17px;
        color: #2b2f36;
        transition: 0.2s;

        &:focus {
          outline: none;
          border-color: #b42323;
          box-shadow: 0 0 0 2px rgba(143, 29, 29, 0.14);
        }

        &::placeholder {
          color: rgba(43, 47, 54, 0.45);
        }
      }

      button {
        flex: 0 0 50px;
        height: 50px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        background: linear-gradient(135deg, #8f1d1d, #b42323);
        color: #ffffff;
        box-shadow: 0 6px 20px rgba(143, 29, 29, 0.2);
        transition: 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;

        svg {
          width: 26px;
          height: 26px;

          .cls-1 {
            fill: none;
          }
        }

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 10px 25px rgba(143, 29, 29, 0.25);
        }

        &:active {
          transform: scale(0.95);
        }
      }
    }

    .support-email {
      margin: 2px 0 0;
      text-align: center;
      font-size: 14px;
      color: rgba(43, 47, 54, 0.8);

      a {
        color: rgb(143, 29, 29);
        font-weight: 700;
        text-decoration: underline;
      }
    }
  }
}

@media (max-width: 900px) {
  body {
    padding-inline: 28px;
  }

  main .chat {
    .chat-content {
      .message-ai,
      .message-user {
        font-size: 16px;
      }
    }
  }
}

@media (max-width: 550px) {
  body {
    padding-inline: 16px;
  }

  main .chat {
    padding: 18px;

    .chat-input {
      input {
        height: 42px;
        font-size: 15px;
      }

      button {
        height: 42px;
        flex: 0 0 42px;

        svg {
          width: 20px;
          height: 20px;
        }
      }
    }

    .chat-content {
      .message-ai,
      .message-user {
        font-size: 15px;
      }
    }
  }
}




